Versions Compared

Key

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

Table of Contents


1. Install Prerequisites

Thai

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

...

  • Install the Java Development Kit (JDK)

    Thai

    ติดตั้ง Java Development Kit (JDK)

    • English
      Download the Java Development Kit (JDK) 8 from http://www.oracle.com/technetwork/java/javase/downloads/index.html
      Thai

      ดาวน์โหลด Java Development Kit (JDK) 8 จาก http://www.oracle.com/technetwork/java/javase/downloads/index.html

    • Follow the installation instructions at https://docs.oracle.com/javase/8/docs/technotes/guides/install/windows_jdk_install.html

      Thai

      ทำตามคำแนะนำการติดตั้งที่ https://docs.oracle.com/javase/8/docs/technotes/guides/install/windows_jdk_install.html

    • Set JAVA_HOME:

      Thai

      ชุด JAVA_HOME:


      • For Windows 8, go to Control Panel > System > Advanced System Settings.

        Thai

        สำหรับ Windows 8 ไปที่ Control Panel > System > Advanced System Settings.

      • For Windows 10, go to Control Panel > System and Security > System > Advanced System Settings.

        Thai

        สำหรับ Windows 10 ให้ไป Control Panel > System and Security > System > Advanced System Settings

      • Click the Environment Variables button.

        Thai

        คลิกปุ่ม Environment Variables

      • Under System Variables, click New.

        Thai

        ภายใต้ตัวแปรของระบบคลิก New

      • In the Variable Name field, enter JAVA_HOME

        Thai

        ในฟิลด์ชื่อตัวแปรป้อน JAVA_HOME

      • In the Variable Value field, enter the JDK installation path, e.g: C:\Program Files\Java\jdk1.8.0_77

      • สำหรับ Windows 8 ไปที่ Control Panel > System > Advanced System Settings
      • สำหรับ Windows 10 ไปที่ Control Panel > System and Security > System > Advanced System Settings
        Thai
      • คลิกปุ่ม Environment Variables

      • ภายใต้ตัวแปรของระบบคลิก New
      • ในฟิลด์ชื่อตัวแปรป้อน JAVA_HOME

      • ในฟิลด์ค่าตัวแปรให้ป้อนเส้นทางการติดตั้ง JDK เช่น C: \ Program Files \ Java \ jdk1.8.0_77

  • Install MySQL.

    Thai

    ติดตั้ง MySQL

  • Install Apache Maven

    Thai

    ติดตั้ง Apache Maven

    • Download Apache Maven 2.2.1 or above from https://maven.apache.org/download.cgi

      Thai

      ดาวน์โหลด Apache Maven 2.2.1 ขึ้นไป https://maven.apache.org/download.cgi

    • Follow the installation instructions at https://maven.apache.org/install.html

      Thai

      ทำตามคำแนะนำการติดตั้งที่ 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:

      Thai

      โปรดตรวจสอบให้แน่ใจว่าคำสั่ง "mvn" สามารถดำเนินการได้จากบรรทัดคำสั่งโดยเพิ่มลงใน PATH:

      • In Windows 8 go to Control Panel > System > Advanced System Settings.

        Thai

        ใน Windows 8 ไปที่ Control Panel > System > Advanced System Settings.

      • For Windows 10, go to Control Panel > System and Security > System > Advanced System Settings.

        Thai

        สำหรับ Windows 10 ไปที่ Control Panel > System and Security > System > Advanced System Settings.

      • Click the Environment Variables button.

        Thai

        คลิกปุ่ม Environment Variables

      • Under System Variables, select the variable "Path

        and

        " and click Edit.

        Thai

        ภายใต้ตัวแปรระบบให้เลือกเส้นทางตัวแปรและคลิก 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

        Thai

        ในฟิลด์ค่าตัวแปรให้เพิ่มเส้นทาง Maven (เช่น C: \ Program Files \ apache-maven-3.3.9 \ bin) ต่อท้ายเส้นทางปัจจุบัน

  • Install Git

    Thai

    ติดตั้ง Git

2. Install 3rd Party Libraries

Thai

ติดตั้งไลบรารี

Code Block
cd install-libraries
install_win.bat
Warning

Depending on your version of Apache Maven, you might get an error "BUILD FAILED" containing the message: Cannot run program "mvn.cmd"

In this case, edit the file install-libraries\lib\setup-maven_win.xml and replace all occurrences of "mvn.cmd" with "mvn.bat"

Thai

ทั้งนี้ขึ้นอยู่กับรุ่น Apache Maven ของคุณ คุณอาจได้รับข้อผิดพลาด "BUILD FAILED" ที่มีข้อความ: ไม่สามารถเรียกใช้โปรแกรม "mvn.cmd" ในกรณีนี้ให้แก้ไขไฟล์ install-libraries \ lib \ setup-maven_win.xml และแทนที่ "mvn.cmd" ด้วย "mvn.bat" ทั้งหมด

3. Obtain Source Code

Thai

รับรหัสที่มา

  • Open a Git CMD (Git Bash) window and execute the following:

    Thai

    เปิดหน้าต่าง Git CMD (Git Bash) และดำเนินการต่อไปนี้:



Code Block
mkdir joget_src
cd joget_src
git clone https://github.com/jogetworkflow/jw-community.git --branch 7.0-SNAPSHOT --depth 1

4. Configure Datasource for Test Case

Thai

กำหนดค่าแหล่งข้อมูลสำหรับกรณีทดสอบ

  • Joget contains unit test cases that requires access to a running MySQL database.

    Thai

    Joget มีกรณีทดสอบหน่วยที่ต้องการเข้าถึงฐานข้อมูล MySQL ที่ทำงานอยู่

  • 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

    Thai

    เปิด Command Prompt และสร้างฐานข้อมูล MySQL ด้วยไฟล์ SQL ใน joget_src / jw-community / wflow-install / src / main / resources / data / data / jwdb-empty.sql



Code Block
mysql -uroot -p
create database jwdb;
exit
mysql -uroot -p jwdb < joget_src/jw-community/wflow-install/src/main/resources/data/jwdb-empty.sql
  • Download the sample configuration files wflow.

    zip and

    zip and unzip it in your user home folder e.g. C:\Users\yourusername\

    Thai

    ดาวน์โหลดไฟล์การกำหนดค่าตัวอย่าง wflow.zip และคลายซิปในโฟลเดอร์โฮมของผู้ใช้ของคุณเช่น C: \ Users \ yourusername \


    View file
    namewflow.zip
    height250

  • 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


    Thai

    แก้ไขไฟล์ wflow \ app_datasource-default.properties เช่น C: \ Users \ yourusername \ wflow \ app_datasource-default.properties และตรวจสอบให้แน่ใจว่าการกำหนดค่า (เช่นชื่อผู้ใช้และรหัสผ่าน MySQL ถูกต้อง)



Code Block
workflowDriver=com.mysql.jdbc.Driver
workflowUrl=jdbc\:mysql\://localhost\:3306/jwdb?characterEncoding\=UTF-8
workflowUser=root
profileName=
workflowPassword=root
Warning

To pass unit tests which require a valid datasource, it is important to ensure that:

Thai

ในการผ่านการทดสอบซึ่งต้องการแหล่งข้อมูลที่ถูกต้องเป็นสิ่งสำคัญเพื่อให้มั่นใจว่า:

  1. the wflow folder is located in the correct path inside your user home folder, e.g: C:\Users\yourusername\wflow

    Thai

    โฟลเดอร์ wflow ตั้งอยู่ในเส้นทางที่ถูกต้องภายในโฟลเดอร์ผู้ใช้ของคุณเช่น: C: \ Users \ yourusername \ wflow

  2. the MySQL configuration settings in wflow\app_datasource-default.properties are correct

    Thai

    การตั้งค่าการกำหนดค่า MySQL ใน wflow \ app_datasource-default.properties ถูกต้อง

5. Build Project

Thai

สร้างโครงการ

  • In a Command Prompt, browse to the jw-community\wflow-app folder and execute the Maven install command

    Thai

    ใน Command Prompt ให้เรียกดูโฟลเดอร์ jw-community \ wflow-app และดำเนินการคำสั่งติดตั้ง Maven



Code Block
cd joget_src\jw-community\wflow-app\
mvn clean install

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

    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 one is 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-war-plugin:2.3:war" to fix this issue follow the steps bellow: 

Image Added

  • Open "joget_src\jw-community\wflow-consoleweb\pom.xml"
  • Make sure maven-war-plugin version according to maven-compiler-plugin

Image Added


Image Added