GS_01_Arrange_pre requisites - XLRIT/gears GitHub Wiki

1. Table of contents

2. This what you should install:

During the installation of OpenJDK you must choose the options Add to PATH, Associate .jar and Set JAVA_HOME variable as shown in the picture below.

  • Git: click https://gitforwindows.org/, download and install it. You should not have to change any settings during installation.
  • Visual Studio code (VS code): click https://code.visualstudio.com/download. Download the User installer 64 bit and do a standard installation, but during this standard installation also check both Add "Open with Code actions.
  • GEARS Language Support: click https://marketplace.visualstudio.com/items?itemName=edwin-hendriks.vscode-gears. Then click the Install button. The first time you do this it will inform you that you need VS Code. You can simply acknowledge that message and continue. Next click the button Open Visual Studio Code to complete the installation.
  • GEARS tools: which is the Generator (gears-generator-assembly-1.6.6.jar) and the Scenario runner (gears-runner-assembly-0.22.jar). These .jar files should be on your computer somewhere. We will be assuming in a folder called C:\XLRIT\GEARS. These jar files cannot be found on the internet but must be given to you by someone of XLRIT.
  • DBeaver: which is a really good free to use database tool. Click https://dbeaver.io/download/ and download and install DBeaver Community edition.

3. (Windows Only) Choose CMD as Terminal in VS Code

Recently VS Code has choosen Powershell as their default terminal on Windows. However, the VS Code GEARS Extension works with the previous default, which is the Windows Command Promp (CMD). The default Terminal can be set to CMD like this:

  1. Open VS Code
  2. Press F1,
  3. Type terminal default
  4. Choose Terminal: Select Default Profile
  5. Choose Command Prompt....

4. Add/Change environment variables:

The final step is to add environment variables. You can do that by:

  1. pressing the Windows key and typing Environment,
  2. then clicking Edit the system environment variables`.
  3. Then click button Environment Variables. You should get a screen like this:

  1. Under heading System variables click either Edit (if the environment variable already exists) or click New if it does not exist and make the following changes to them:
Environment variable Value
M2_HOME change to C:\apache-maven-3.8.6
Path Add the following 2 paths: %JAVA_HOME%\bin %M2_HOME%\bin
GEARS_RELEASES change to C:\XLRIT\GEARS

5. Configure DBeaver

  1. Open the app DBeaver. If you are asked to create a sample database, you can simply answer No
  2. If you have not yet created a connection to the H2 Database you must create one:
    • click menu Database -> New Database Connection (the first time you open DBeaver it will probably have done this for you already; if so you can skip this step).
    • search for/select H2 Embedded V.2 and click button Next
    • Set the following fields:
Field Value
Connect by URL
JDBC URL jdbc:h2:tcp://localhost:9092/mem:gears
Username sa
  1. To finish creating the connection you may have to perform these steps: (if they do not work or are not applicable simply skip them even if they give an error):
    • Click Test Connection
    • If you get a message telling you the database driver is not yet downloaded and installed, simply click the Download button and once done repeat the Test. The connection test should say you are connected
    • Click buttons OK and Finish

In the left side of DBeaver you now should have a new database connection called H2 Embedded V.2.

6. Verify if you arranged the pre-requisites

To verify if you arranged the pre-requisites correctly you can do the following:

  1. Open a command prompt (for instance by pressing the Windows key followed by typing in cmd and clicking the application Command prompt).
  2. Type in the following commands and press [ENTER].
Command Should result in
javac --version javac 16.0.2
mvn --version Apache Maven 3.8.6 followed by some more information
java -jar "%GEARS_RELEASES%"\gears-generator-assembly-1.6.6.jar -v Running GEARS Generator 1.6... Unknown command line option: -v

7. Get a Git account

With Git you have complete control over changes made on files. Both when working on your own but especially when working together on one project with multiple files. There are many companies that provide Git. We will be using GitLab. Follow these steps to create a new account with GitLab if you do not yet have an account.

  1. Go to https://www.gitlab.com.
  2. Click the Register link (on the right top of the page).
  3. Enter your information such as first, last name, a username, etc. and click the Register button.
  4. You may have to check your email to confirm your account. If so, please do that.

Great. Now you are ready to start developing software using GEARS.

⚠️ **GitHub.com Fallback** ⚠️