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
Thai ในฟิลด์ค่าตัวแปรให้ป้อนเส้นทางการติดตั้ง JDK เช่น C: \ Program Files \ Java \ jdk1.8.0_77
Install MySQL.
Thai ติดตั้ง MySQL
Download MySQL Server 5.5 or above from http://dev.mysql.com/downloads/mysql/
Thai ดาวน์โหลด MySQL Server 5.5 หรือสูงกว่าจาก http://dev.mysql.com/downloads/mysql/
Follow the installation instructions at http://dev.mysql.com/doc/en/windows-installation.html
Thai ทำตามคำแนะนำการติดตั้งที่ http://dev.mysql.com/doc/en/windows-installation.html
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
Download and install the Git client from https://git-scm.com/download/win
Thai ดาวน์โหลดและติดตั้งไคลเอนต์ Git จาก https://git-scm.com/download/win
2. Install 3rd Party Libraries
Thai |
---|
ติดตั้งไลบรารี |
Download the 3rd party libraries ZIP from httphttps://dev.joget.org/community/download/attachments/19104566/install-libraries.zip
Thai ดาวน์โหลด ZIP ห้องสมุดบุคคลที่สามจาก https://dev.joget.org/community/download/attachments/19104566/install-libraries.zip
Unzip the file
Thai แตกไฟล์
Open a Command Prompt to execute the install_win.bat file
Thai เปิด Command Prompt เพื่อเรียกใช้งานไฟล์ install_win.bat
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"
|
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 andzip and unzip it in your user home folder e.g. C:\Users\yourusername\
Thai ดาวน์โหลดไฟล์การกำหนดค่าตัวอย่าง wflow.zip และคลายซิปในโฟลเดอร์โฮมของผู้ใช้ของคุณเช่น C: \ Users \ yourusername \
View file name wflow.zip height 250 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:
|
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.
- 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:
- Open "joget_src\jw-community\wflow-consoleweb\pom.xml"
- Make sure maven-war-plugin version according to maven-compiler-plugin