Build Source Code on Linux
1. Install Prerequisites
-
Install JDK 11 or JDK 17. Please make sure JAVA_HOME is set.
For more detail, you can refer to https://www.digitalocean.com/community/tutorials/how-to-install-java-on-ubuntu-with-apt-get
Set the JAVA_HOME by editing the file /etc/environment
In this file, add the following line:
Now reload the file and test:
- Install MySQL 5.5 or above.
-
Install Apache Maven 2.2.1 or above. Please make sure "mvn" command is able to execute from command line.
- Install Git.
2. Install 3rd Party Libraries
3. Obtain Source
4. Configure Datasource for Test Case
Prepare the database for Joget usage.
Download wflow.zip and extract in your user home.
Make sure the configuration in app_datasource-default.properties is correct.
5. Build Project
Note: If a different JDK version is already in use, the JDK version specified in the project's pom.xml file can be overridden during the project build process using the mvn (Maven) command.
For example, if the project needs to be built with JDK 17, Please write the following command:
6. Skipping Build Test
In case project build failures are encountered and would want to bypass the testing phase, please follow the below steps:
- 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
- Find maven-surefire-plugin inside the pom.xml file
- 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 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
Failed to execute goal "org.apache.maven.plugins:maven-compiler-plugin"
To fix this issue, please follow the step below:
In the terminal write:
This will automatically download and use the appropriate version of Maven defined in the project's wrapper configuration.