立即试用 商务报价
Edge
安装 > 安装说明 > 源代码

本页目录

Building from sources

This guide will help you to download and build ThingsBoard Edge from sources. Instructions listed below are tested on Ubuntu 20.04 LTS and CentOS 7/8

Required tools

This section contains installation instructions for build tools.

Java

ThingsBoard is build using Java 11. You can use following instructions to install Java 11.

Maven

ThingsBoard build requires Maven 3.1.0+.

1
sudo apt-get install maven
1
sudo yum install maven

Please note that maven installation may set Java 7 as a default JVM on certain Linux machines. Use java installation instructions to fix this.

Source code

You can clone source code of the project from the official github repo.

1
2
3
# checkout latest release branch
git clone -b release-3.5 git@github.com:thingsboard/thingsboard-edge.git
cd thingsboard-edge

Build

Run the following command from the thingsboard edge folder to build the project:

1
mvn clean install -DskipTests

Build local docker images

Make sure that Docker is installed.

1
mvn clean install -DskipTests -Ddockerfile.skip=false

Build artifacts

You can find debian, rpm and windows packages in the target folder:

1
application/target

Tips and tricks

Thingsboard Edge is quite easy to build from sources on a brand-new clear environment.

Here are some tips and tricks to boost build experience:

  • clean gradle cache
    1
    
    rm -rf ~/.gradle/caches/
    
  • clean node modules
    1
    
    rm -rf ui-ngx/node_modules
    
  • build in parallel, format headers, build docker images
    1
    
    mvn -T 0.8C license:format clean install -DskipTests -Ddockerfile.skip=false