Skip to content

Machine Setup

General

Git

The whole project is a Git repository, to do anything you'll need to have Git setup on your machine.

Tip

We highly recommend you use Git directly typing commands to your terminal, instead of relying on any GUI tools, IDE integration's whatsoever. They make life easy, sure. But do you know, what exact calls they do under the hood?

Installation

Should be part of all major systems default software distribution path.

disclaimer

This is for people having not much experience. If you e.g. use Cygwin, you could just install Git from there and ignore this^^

  • Download Git: Git-SCM
  • Installation recommendations:
    • opt-out from Enable Git Credential Manager
      We had bad experiences with it, storing wrong passwords an no one knew where to remove them as none of the pros used this thing^^

Configuration

After installing Git, you'll have to set a few information, in order to be able to work with it. Mandatory is your username and email.

Globally set your most used username and email address you'll be using.

1
2
git config --global user.name "<username>"
git config --global user.email "<email address>"

Attention

If your global email is different from the one for this projects GitLab, make sure to either add your main email address as committer email in your profile, or change the git config for this project individually after cloning it.

Clone project

As of writing, the project can be accessed with HTTPS and SSH. If this is not working, check the repository from the link in the upper right corner of the page. (Maybe the path changed and someone forgot to update this part of the docs)

1
git clone git@transfer.hft-stuttgart.de:9Lukas5/unified-ticketing.git
1
git clone https://transfer.hft-stuttgart.de/gitlab/9Lukas5/unified-ticketing.git

Java Development

The Java library is development with OpenJDK 8 and Maven 3.6

Requirements

  • Git setup
  • OpenJDK 1.8.0+
  • Maven 3.6.0+

Installation

OpenJDK

Check your specific systems package names.

Ubuntu 20.04:

1
sudo apt install openjdk-11-jdk

  • download OpenJDK: jdk.java.net
  • extract archive to permanent place
  • create/update system environment variable JAVA_HOME, to the path you extracted OpenJDK to.
  • update PATH variable including the bin folder of your newly placed OpenJDK
  • check with a terminal that java --version works

Maven

Same as before, check your specific systems package names.

Ubuntu:

1
sudo apt install maven

  • download Maven binary: maven.apache.org
  • extract archive to permanent place
  • create/update system environment variable MAVEN_HOME, to the path you extracted Maven to.
  • update PATH including bin folder of maven home
  • check that mvn --version works

Import project to IDE

Following is described, how to import the maven project to your IDE. I really hope, you're familiar enough to know how to use your IDE, so this is a just-in-case service.

Also, this does not claim to be up-to-date/correct/cover all available IDE's. You are invited to contribute to this list below if you're IDE of choice is not listed yet or has some faults.

  • Select Open or Import
  • Choose the folder you cloned the project into

MkDocs (Documentation)

This project is documented using MkDocs Material. It means we write Markdown files, organize them in a configuration file and MkDocs generates a static Website out of it we host and you are reading right now.

Requirements

  • Python 3.5+
  • pip
  • Python virtual environment (optional)

Installation

check system specific names and commands, below are some examples collected over time:

Ubuntu:

1
sudo apt install python3 python3-pip python3-venv

  • download & install Python: python.org (use executable installer version)
  • open a terminal inside the project's root directory
  • optional: create & activate new virtual environment:

    1
    2
    python3 -m venv env
    . ./env/bin/activate
    
    1
    2
    python -m venv env
    env\scripts\activate.bat
    

    execution policy

    You may have to first set the correct execution policy, before able to run the activation script.

    1
    Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser
    
    1
    2
    python -m venv env
    env\scripts\Activate.ps1
    
  • install all required packages:

    1
    pip install -Ur requirements.txt
    

Usage

To work on the documentation, the mkdocs development server has to run. On start it tells you on which port it runs (default is 8000).

Open the Browser on the shown URL and edit the Markdown files. On saving changes your Browser should automatically reload the page.

  • optional: enter python virtual environment

    1
    . ./env/bin/activate
    
    1
    env\scripts\activate.bat
    

    execution policy

    You may have to first set the correct execution policy, before able to run the activation script.

    1
    Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser
    
    1
    env\scripts\Activate.ps1
    
  • start MkDocs development server:

    1
    mkdocs serve
    

  • work
  • kill dev server by pressing ctrl+c
  • optional: exit python virtual environment:
    1
    deactivate
    

Editor/IDE

You don't need any special IDE, as a bare minimum a text editor would work (even vim is possible).
But don't you dare to use this crappy Microsoft built in editor!

Practically it's very supportive of course, to use a IDE that has good markdown support in terms of code-highlighting, table formatting, etc.
Below are collected tips for different IDE's.

recommended extensions:
these are the extension id's searchable from vscode

  • editorconfig.editorconfig
  • waderyan.gitblame
  • yzhang.markdown-all-in-one
  • jebbs.plantuml