Thingsboard development environment to build

The first part: JDK

1, download the JDK,

JDK Address: https://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html

This machine is Win10 64, select a bottom

2, the installation JDK, select the JDK installation to the default folder, if you need to install in a different folder, please remember to use a path English

 

3, configure the environment variables

Increase JAVA_HOME, that is the JDK installation address: C: \ Program Files \ the Java \ jdk1.8.0_221

 

Increase CLASSPATH, namely JDK installation address in the file: ;.% JAVA_HOME% \ lib;% JAVA_HOME% \ lib \ dt.jar;% JAVA_HOME% \ lib \ tools.jar

 

Modify Path, increase JDK address: % JAVA_HOME% \ bin;% JAVA_HOME% \ jre \ bin;

 

 

JDK installation test results, use the command-line tool

 

Enter the command java -version, if the following message can appear that the installation is complete

 

 


 

 

The second part: maven

1, download maven, enter the address: http://maven.apache.org/download.cgi

 

2, downloaded to a designated address: for example d: / tb, and decompress

 

32, configure the environment variables

Increase MAVEN_HOME, namely maven address: D: \ TB \ apache-maven-3.6.1-bin , please note that if direct decompression, there may be two apache-maven-3.6.1-bin

 

Environment variable settings

 

MAVEN_OPTS, the parameter is  -Xms128m -Xmx1024m

 

Modify Path, an increase of address Maven % MAVEN_HOME% \ bin; 

 

Testing Maven installed, open a command-line tool. Use the command mvn -v, if the following prompt that the installation was successful

 

 


 

 

Part III: Nodejs installation

1, download the installation package Nodejs, Nodejs official website address: https://nodejs.org/en/download/

 

 

2. After installation is complete, use the command to see if Nodejs installation has been completed, the following tips can have a successful installation instructions

 

 


 

 

Part IV: install git

1, download the installation package git, git official website address is: https://git-scm.com/download/win

 

2, after the installation is complete, using the command line test git

 

 

 


 

 

Part V: npm install global trust

1, using the command line, execute the following command

#npm environment read environment variables package 
npm install -g Cross- env

#webpack packaging tools npm install -g WebPACK

Installation depends

 

 

 


 

 

Part VI: Clone Source thingsboard

In d: / tb folder, right click and select Git Bash Here

 

Git clone command input source

git clone https://github.com/thingsboard/thingsboard.git

 

Allow time for the ultimate success download

 

 

 


 

 

Part VII: switching branch git

1, after viewing the source code of all branches of the project, download the source code, you need to go to the folder thingsboard

 

2, switching branch, when we look at the branch, found that the latest release of version 2.4

 

Input command to switch to the branch 2.4

git checkout release-2.4

 Switching branch success

 

 

 


 

 

Part VIII: Notes plug-in

Open the project file in the source code to see which check-ins, open the root directory thingsboard

 

Use notepad ++ open pom.xml, find the license-maven-plugin content

 

The entire node plug-ins can be written off

 

 


 

 

Part IX: Compile Project

If there is no local maven repository application dependencies, you need to extract networking application dependencies, compile it before, it is best to connect the network outside, the next is a long wait (indeed a long time)

Use the command began to compile the project, command, we skipped the test module, in order to successfully compile, use the administrator to run the command

mvn clean install -Dmaven.test.skip=true

 

After a long wait, compiled, if you have problems like him to try several times

If you encounter problems, need to be recompiled, you need to run the command

taskkill /f /im java.exe

 

Into the project application \ target folder, view the project has been compiled

 

 

 

Glass Great God article addresses " thingsboard from the build environment to install and deploy, to installation error, or failure to install a small partner site to write again (revised edition) "

 

Guess you like

Origin www.cnblogs.com/weschen/p/11465103.html