Build Source Code on Windows
1. Install Prerequisites
Install the Java Development Kit (JDK)
-
- Depending on your Joget DX 8 version, download either one of the following JDK versions:
For Joget DX 8, either download JDK 11 or 17:
-
-
- Java Development Kit (JDK) 11 from https://www.oracle.com/java/technologies/downloads/#java11 or https://adoptium.net/en-GB/temurin/releases/?version=11.
OR - Java Development Kit (JDK) 17 from https://www.oracle.com/java/technologies/downloads/#java17 or https://adoptium.net/en-GB/temurin/releases/?version=17.
- Java Development Kit (JDK) 11 from https://www.oracle.com/java/technologies/downloads/#java11 or https://adoptium.net/en-GB/temurin/releases/?version=11.
-
For Joget DX 8.1, download JDK 11, 17 or 21:
-
-
- Java Development Kit (JDK)
21 from https://www.oracle.com/java/technologies/downloads/#java21 or https://adoptium.net/en-GB/temurin/releases/?version=21.
- Java Development Kit (JDK)
-
-
- Follow the installation instructions at https://docs.oracle.com/javase/8/docs/technotes/guides/install/windows_jdk_install.html.
- Set JAVA_HOME:
- For Windows 8, go to Control Panel > System > Advanced System Settings.
- For Windows 10, go to Control Panel > System and Security > System > Advanced System Settings.
- Click the Environment Variables button.
- Under System Variables, click New.
- In the Variable Name field, enter JAVA_HOME
- In the Variable Value field, enter the JDK installation path, e.g:
C:\Program Files\Java\jdk-11.x.xx.x
Install MySQL
-
- Download MySQL Server 5.5 or above from http://dev.mysql.com/downloads/mysql/.
- Follow the installation instructions at http://dev.mysql.com/doc/en/windows-installation.html.
Install Apache Maven
-
- Download Apache Maven 2.2.1 or above from https://maven.apache.org/download.cgi.
- Follow the installation instructions at https://maven.apache.org/install.html.
- Please ensure that the "mvn" command can be executed from the command line by adding it to the PATH:
- In Windows 8 go to Control Panel > System > Advanced System Settings.
- For Windows 10, go to Control Panel > System and Security > System > Advanced System Settings.
- Click the Environment Variables button.
- Under System Variables, select the variable
Path
and click Edit. - In the Variable Value field, append the Maven path (e.g.
C:\Program Files\apache-maven-3.3.9\bin
) to the current path.
Install Git
Download and install the Git client from https://git-scm.com/download/win.
2. Install 3rd Party Libraries
- Download the 3rd party libraries ZIP from https://jogetdoc.int.joget.cloud/community/download/attachments/19104566/install-libraries.zip.
- Unzip the file.
- Open a Command Prompt to execute the
install_win.bat
file.
3. Obtain Source Code
Open a Git CMD (Git Bash) window and execute the following:
4. Configure Datasource for Test Case
- Joget contains unit test cases that require access to a running MySQL database.
- Open a Command Prompt, and create a MySQL database with the SQL file in
joget_src/jw-community/wflow-install/src/main/resources/data/jwdb-empty.sql.
- Download the sample configuration files wflow.zip and unzip it in your user home folder e.g.
C:\Users\yourusername\
: - Edit the
wflow\app_datasource-default.properties
file (e.g.C:\Users\yourusername\wflow\app_datasource-default.properties
) and ensure that the configuration (e.g. MySQL username and password) is correct.
5. Build Project
In a Command Prompt, browse to the jw-community\wflow-app folder and execute the Maven install command.
6. Skipping Build Test
Sometimes building the project will fail, if one wish to skip the build test, one can follow the instructions below:
- If for example wflow-commons build has failed, head to the cloned directory of joget_src performed during 3. Obtain Source Code.
- Then, browse to jw-community\wflow-commons.
- Edit the pom.xml file by opening with a notepad or other similar app that one wish to use.
- Press Ctrl + F then type maven-surefire-plugin then press enter.
- Set
<skipTests>false</skipTests> to <skipTests>true</skipTests>
. -
If maven-surefire-plugin is not found, copy and paste from other
pom.xml
or copy paste the code below under plugin section of the pom.
- If one is still unsure where to paste, paste under other
</plugin>
lines as shown in the figure below.
- Repeat for any other build section that has failed
- If the maven-surefire-plugin skipTests has been set to true and still fails
- Set maven-war-plugin
<version>x.x.x</version>
to the version of maven-compiler-plugin's
7. Fixing Plugin Version
If the "Failed to execute goal org.apache.maven.plugins:maven-war-plugin:2.3:war
" error message is returned, follow the steps below to resolve it:
-
- Open "joget_src\jw-community\wflow-consoleweb\pom.xml"
- Ensure maven-war-plugin version is according to maven-compiler-plugin