GS_01_Arrange_pre requisites - XLRIT/gears GitHub Wiki
- 1. Table of contents
- 2. This what you should install:
- 3. (Windows Only) Choose CMD as Terminal in VS Code
- 4. Add/Change environment variables:
- 5. Configure DBeaver
- 6. Verify if you arranged the pre-requisites
- 7. Get a Git account
- OpenJDK: click https://adoptium.net/temurin/releases/?version=16, choose the version shown in the picture below and click on the .msi button. Dowload and install it.
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.
-
Maven: click on https://dlcdn.apache.org/maven/maven-3/3.8.6/binaries/apache-maven-3.8.6-bin.zip to download the zip file. Unzip the content of this zip file somewhere on your computer. We will be assuming this location
C:\apache-maven-3.8.6
. After you are done the content of this folder should look a bit like this:
- 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 calledC:\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.
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:
- Open VS Code
- Press F1,
- Type
terminal default
- Choose Terminal: Select Default Profile
- Choose Command Prompt....
The final step is to add environment variables. You can do that by:
- pressing the Windows key and typing Environment,
- then clicking Edit the system environment variables`.
- Then click button Environment Variables. You should get a screen like this:
- 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
|
- Open the app DBeaver. If you are asked to create a sample database, you can simply answer No
- 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 |
- 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.
To verify if you arranged the pre-requisites correctly you can do the following:
- Open a command prompt (for instance by pressing the Windows key followed by typing in
cmd
and clicking the application Command prompt). - 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
|
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.
- Go to https://www.gitlab.com.
- Click the Register link (on the right top of the page).
- Enter your information such as first, last name, a username, etc. and click the Register button.
- 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.