Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Thai

ติดตั้งข้อกำหนดเบื้องต้น

  • Install JDK 811 or JDK 17. Please make sure JAVA_HOME is set.

    Thai

    ติดตั้ง JDK 8 โปรดตรวจสอบให้แน่ใจว่าได้ตั้งค่า JAVA_HOME

    Code Block
    $ sudo apt-get update
    $ sudo apt-get install default-jdk

    For more detail, you can refer to https://www.digitalocean.com/community/tutorials/how-to-install-java-on-ubuntu-with-apt-get

    Thai

    สำหรับรายละเอียดเพิ่มเติมสามารถอ้าง 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

    Thai
    ตั้งค่า JAVA_HOME โดยแก้ไขไฟล์ / etc / environment



    Code Block
    $ sudo nano /etc/environment

    In this file, add the following line :

    Thai

    ในไฟล์นี้เพิ่มบรรทัดต่อไปนี้:

    Code Block
    JAVA_HOME="/usr/lib/jvm/java-8-11-openjdk-amd64"  //For JDK 11
    
    JAVA_HOME="/usr/lib/jvm/java-17-openjdk-amd64"  //For JDK 17

    Now reload the file and test:

    Thai

    ตอนนี้ทำการรีโหลดไฟล์และทดสอบ:

    Code Block
    $ source /etc/environment
    $ echo $JAVA_HOME
  • Install MySQL 5.5 or above.

    Thai

    ติดตั้ง MySQL 5.5 หรือสูงกว่า

    Code Block
    $ sudo apt-get install mysql-server
    $ sudo service mysql start
  • Install Apache Maven 2.2.1 or above. Please make sure "mvn" command is able to execute from command line.

    Thai

    ติดตั้ง Apache Maven 2.2.1 ขึ้นไป โปรดตรวจสอบให้แน่ใจว่าคำสั่ง "mvn" สามารถเรียกใช้จากบรรทัดคำสั่งได้

    Code Block
    $ sudo apt-get install maven
    $ mvn -version
  • Install Git.

    Thai

    ติดตั้ง Git


    Code Block
    $ sudo apt-get install git
    $ git --version

...

Code Block
$ cd ~/joget_src/jw-community/wflow-app/
$ mvn clean install


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 :

Code Block
$ mvn -Dmaven.compiler.source=17 -Dmaven.compiler.target=17 clean install

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


    Code Block
    <plugin>
    
    <groupId>org.apache.maven.plugins</groupId>
    
    <artifactId>maven-surefire-plugin</artifactId>
    
    <version>2.4.3</version>
    
    <configuration>
    
    <skipTests>true</skipTests>
    
    </configuration>
    
    </plugin>


    If still unsure where to paste, paste under other </plugin>lines as shown in the figure below.

    Image Added

  • 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"

Image Added


In the terminal write:

Code Block
$ mvn wrapper:wrapper

This will automatically download and use the appropriate version of Maven defined in the project's wrapper configuration.