2021.11.15 周一 编译TB 3.3.2
============================

1 下载源码

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

$ git checkout v3.3.2 -b v3.3.2

2 编译源码

(cmd) ~/tmp/github/thingsboard/thingsboard (v3.3.2)$ mvn clean package -DskipTests

FAILURE: Build failed with an exception.

* What went wrong:
A problem occurred configuring root project 'java'.
> Could not resolve all artifacts for configuration ':classpath'.
   > Could not resolve org.apache.ant:ant:1.10.11.
     Required by:
         project : > nebula.ospackage:nebula.ospackage.gradle.plugin:8.6.3 > com.netflix.nebula:gradle-ospackage-plugin:8.6.3 > org.redline-rpm:redline:1.2.10
      > Could not resolve org.apache.ant:ant:1.10.11.
         > Could not get resource 'https://plugins.gradle.org/m2/org/apache/ant/ant/1.10.11/ant-1.10.11.pom'.
            > Could not HEAD 'https://jcenter.bintray.com/org/apache/ant/ant/1.10.11/ant-1.10.11.pom'.
               > No PSK available. Unable to resume.
   > Could not resolve org.bouncycastle:bcpg-jdk15on:1.69.
     Required by:
         project : > nebula.ospackage:nebula.ospackage.gradle.plugin:8.6.3 > com.netflix.nebula:gradle-ospackage-plugin:8.6.3 > org.redline-rpm:redline:1.2.10
      > Could not resolve org.bouncycastle:bcpg-jdk15on:1.69.
         > Could not get resource 'https://plugins.gradle.org/m2/org/bouncycastle/bcpg-jdk15on/1.69/bcpg-jdk15on-1.69.pom'.
            > Could not GET 'https://jcenter.bintray.com/org/bouncycastle/bcpg-jdk15on/1.69/bcpg-jdk15on-1.69.pom'.
               > No PSK available. Unable to resume.
   > Could not resolve org.apache.ant:ant:1.10.11.
     Required by:
         project : > nebula.ospackage:nebula.ospackage.gradle.plugin:8.6.3 > com.netflix.nebula:gradle-ospackage-plugin:8.6.3 > org.vafer:jdeb:1.8
      > Could not resolve org.apache.ant:ant:1.10.11.
         > Could not get resource 'https://plugins.gradle.org/m2/org/apache/ant/ant/1.10.11/ant-1.10.11.pom'.
            > Could not HEAD 'https://jcenter.bintray.com/org/apache/ant/ant/1.10.11/ant-1.10.11.pom'.
               > No PSK available. Unable to resume.
   > Could not resolve org.bouncycastle:bcpg-jdk15on:1.69.
     Required by:
         project : > nebula.ospackage:nebula.ospackage.gradle.plugin:8.6.3 > com.netflix.nebula:gradle-ospackage-plugin:8.6.3 > org.vafer:jdeb:1.8
      > Could not resolve org.bouncycastle:bcpg-jdk15on:1.69.
         > Could not get resource 'https://plugins.gradle.org/m2/org/bouncycastle/bcpg-jdk15on/1.69/bcpg-jdk15on-1.69.pom'.
            > Could not GET 'https://jcenter.bintray.com/org/bouncycastle/bcpg-jdk15on/1.69/bcpg-jdk15on-1.69.pom'.
               > No PSK available. Unable to resume.

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 36s
[INFO] Cleaning VCS Checkout Cache (/home/devusr/tmp/github/thingsboard/thingsboard/packaging/java/.gradle/vcs-1)
[INFO] Build
[INFO] Deleting unused version-specific caches in /home/devusr/tmp/github/thingsboard/thingsboard/packaging/java/.gradle
[INFO] Build
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary for Thingsboard 3.3.2:
[INFO]
[INFO] Thingsboard ........................................ SUCCESS [  0.082 s]
[INFO] Netty MQTT Client .................................. SUCCESS [  2.994 s]
[INFO] Thingsboard Server Commons ......................... SUCCESS [  0.006 s]
[INFO] Thingsboard Server Common Data ..................... SUCCESS [  6.982 s]
[INFO] Thingsboard Server Common Utils .................... SUCCESS [  0.800 s]
[INFO] Thingsboard Server Common Messages ................. SUCCESS [  1.901 s]
[INFO] Thingsboard Actor system ........................... SUCCESS [  1.032 s]
[INFO] Thingsboard Server Stats ........................... SUCCESS [  0.304 s]
[INFO] Thingsboard Server Common Cluster API .............. SUCCESS [  8.560 s]
[INFO] Thingsboard Server Queue components ................ SUCCESS [ 15.263 s]
[INFO] Thingsboard Server Common Cache .................... SUCCESS [  0.833 s]
[INFO] Thingsboard Server Commons ......................... SUCCESS [  0.004 s]
[INFO] Thingsboard Server Common Transport components ..... SUCCESS [  3.189 s]
[INFO] Thingsboard MQTT Transport Common .................. SUCCESS [  1.599 s]
[INFO] Thingsboard HTTP Transport Common .................. SUCCESS [  0.597 s]
[INFO] Thingsboard CoAP server ............................ SUCCESS [  0.617 s]
[INFO] Thingsboard CoAP Transport Common .................. SUCCESS [  1.308 s]
[INFO] Thingsboard LwM2M Transport Common ................. SUCCESS [  2.418 s]
[INFO] Thingsboard SNMP Transport Common .................. SUCCESS [  0.993 s]
[INFO] Thingsboard Server Common DAO API .................. SUCCESS [  0.980 s]
[INFO] Thingsboard Server Remote Edge wrapper ............. SUCCESS [  4.521 s]
[INFO] Thingsboard Extensions ............................. SUCCESS [  0.004 s]
[INFO] Thingsboard Rule Engine API ........................ SUCCESS [  1.105 s]
[INFO] Thingsboard Server DAO Layer ....................... SUCCESS [  8.115 s]
[INFO] Thingsboard Rule Engine Components ................. SUCCESS [  4.452 s]
[INFO] Thingsboard Server Transport Modules ............... SUCCESS [  0.004 s]
[INFO] Thingsboard HTTP Transport Service ................. FAILURE [10:47 min]
[INFO] Thingsboard MQTT Transport Service ................. SKIPPED
[INFO] Thingsboard CoAP Transport Service ................. SKIPPED
[INFO] Thingsboard LwM2m Transport Service ................ SKIPPED
[INFO] Thingsboard SNMP Transport Service ................. SKIPPED
[INFO] ThingsBoard Server UI .............................. SKIPPED
[INFO] Thingsboard Server Tools ........................... SKIPPED
[INFO] Thingsboard Rest Client ............................ SKIPPED
[INFO] ThingsBoard Server Application ..................... SKIPPED
[INFO] ThingsBoard Microservices .......................... SKIPPED
[INFO] ThingsBoard Docker Images .......................... SKIPPED
[INFO] ThingsBoard JavaScript Executor Microservice ....... SKIPPED
[INFO] ThingsBoard Web UI Microservice .................... SKIPPED
[INFO] ThingsBoard Node Microservice ...................... SKIPPED
[INFO] ThingsBoard Transport Microservices ................ SKIPPED
[INFO] ThingsBoard MQTT Transport Microservice ............ SKIPPED
[INFO] ThingsBoard HTTP Transport Microservice ............ SKIPPED
[INFO] ThingsBoard COAP Transport Microservice ............ SKIPPED
[INFO] ThingsBoard LWM2M Transport Microservice ........... SKIPPED
[INFO] ThingsBoard SNMP Transport Microservice ............ SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  11:57 min
[INFO] Finished at: 2021-11-15T11:55:56+08:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.thingsboard:gradle-maven-plugin:1.0.11:invoke (default) on project http: org.gradle.tooling.BuildException: Could not execute build using connection to Gradle distribution 'https://services.gradle.org/distributions/gradle-7.1.1-bin.zip'. -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
[ERROR]
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR]   mvn <args> -rf org.thingsboard.transport:http
(cmd) ~/tmp/github/thingsboard/thingsboard (v3.3.2)$

2.1 编译至【27/46】HTTP Transport Service 报错!

原因是网络问题:下载 gradle-7.1.1-bin.zip 失败!
解决方法:继续编译

(cmd) ~/tmp/github/thingsboard/thingsboard (v3.3.2)$ mvn package -DskipTests

[INFO] Build
[INFO] Deleting unused version-specific caches in /home/devusr/tmp/github/thingsboard/thingsboard/packaging/java/.gradle
[INFO] Build

FAILURE: Build failed with an exception.

* What went wrong:
A problem occurred configuring root project 'java'.
> Could not resolve all artifacts for configuration ':classpath'.
   > Could not download bcpg-jdk15on-1.69.jar (org.bouncycastle:bcpg-jdk15on:1.69)
      > Could not get resource 'https://plugins.gradle.org/m2/org/bouncycastle/bcpg-jdk15on/1.69/bcpg-jdk15on-1.69.jar'.
         > Could not GET 'https://jcenter.bintray.com/org/bouncycastle/bcpg-jdk15on/1.69/bcpg-jdk15on-1.69.jar'.
            > peer not authenticated

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 14s
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary for Thingsboard 3.3.2:
[INFO]
[INFO] Thingsboard ........................................ SUCCESS [  0.018 s]
[INFO] Netty MQTT Client .................................. SUCCESS [  0.936 s]
[INFO] Thingsboard Server Commons ......................... SUCCESS [  0.002 s]
[INFO] Thingsboard Server Common Data ..................... SUCCESS [  0.961 s]
[INFO] Thingsboard Server Common Utils .................... SUCCESS [  0.034 s]
[INFO] Thingsboard Server Common Messages ................. SUCCESS [  3.975 s]
[INFO] Thingsboard Actor system ........................... SUCCESS [  0.055 s]
[INFO] Thingsboard Server Stats ........................... SUCCESS [  0.042 s]
[INFO] Thingsboard Server Common Cluster API .............. SUCCESS [  9.578 s]
[INFO] Thingsboard Server Queue components ................ SUCCESS [  0.323 s]
[INFO] Thingsboard Server Common Cache .................... SUCCESS [  0.046 s]
[INFO] Thingsboard Server Commons ......................... SUCCESS [  0.001 s]
[INFO] Thingsboard Server Common Transport components ..... SUCCESS [  3.298 s]
[INFO] Thingsboard MQTT Transport Common .................. SUCCESS [  0.105 s]
[INFO] Thingsboard HTTP Transport Common .................. SUCCESS [  0.060 s]
[INFO] Thingsboard CoAP server ............................ SUCCESS [  0.054 s]
[INFO] Thingsboard CoAP Transport Common .................. SUCCESS [  1.715 s]
[INFO] Thingsboard LwM2M Transport Common ................. SUCCESS [  0.157 s]
[INFO] Thingsboard SNMP Transport Common .................. SUCCESS [  0.090 s]
[INFO] Thingsboard Server Common DAO API .................. SUCCESS [  0.087 s]
[INFO] Thingsboard Server Remote Edge wrapper ............. SUCCESS [  5.202 s]
[INFO] Thingsboard Extensions ............................. SUCCESS [  0.002 s]
[INFO] Thingsboard Rule Engine API ........................ SUCCESS [  0.065 s]
[INFO] Thingsboard Server DAO Layer ....................... SUCCESS [  0.491 s]
[INFO] Thingsboard Rule Engine Components ................. SUCCESS [  0.532 s]
[INFO] Thingsboard Server Transport Modules ............... SUCCESS [  0.001 s]
[INFO] Thingsboard HTTP Transport Service ................. FAILURE [ 15.827 s]
[INFO] Thingsboard MQTT Transport Service ................. SKIPPED
[INFO] Thingsboard CoAP Transport Service ................. SKIPPED
[INFO] Thingsboard LwM2m Transport Service ................ SKIPPED
[INFO] Thingsboard SNMP Transport Service ................. SKIPPED
[INFO] ThingsBoard Server UI .............................. SKIPPED
[INFO] Thingsboard Server Tools ........................... SKIPPED
[INFO] Thingsboard Rest Client ............................ SKIPPED
[INFO] ThingsBoard Server Application ..................... SKIPPED
[INFO] ThingsBoard Microservices .......................... SKIPPED
[INFO] ThingsBoard Docker Images .......................... SKIPPED
[INFO] ThingsBoard JavaScript Executor Microservice ....... SKIPPED
[INFO] ThingsBoard Web UI Microservice .................... SKIPPED
[INFO] ThingsBoard Node Microservice ...................... SKIPPED
[INFO] ThingsBoard Transport Microservices ................ SKIPPED
[INFO] ThingsBoard MQTT Transport Microservice ............ SKIPPED
[INFO] ThingsBoard HTTP Transport Microservice ............ SKIPPED
[INFO] ThingsBoard COAP Transport Microservice ............ SKIPPED
[INFO] ThingsBoard LWM2M Transport Microservice ........... SKIPPED
[INFO] ThingsBoard SNMP Transport Microservice ............ SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  44.560 s
[INFO] Finished at: 2021-11-15T14:32:55+08:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.thingsboard:gradle-maven-plugin:1.0.11:invoke (default) on project http: org.gradle.tooling.BuildException: Could not execute build using connection to Gradle distribution 'https://services.gradle.org/distributions/gradle-7.1.1-bin.zip'. -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
[ERROR]
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR]   mvn <args> -rf org.thingsboard.transport:http
(cmd) ~/tmp/github/thingsboard/thingsboard (v3.3.2)$

2.2 编译至【27/46】HTTP Transport Service 报错!

原因是网络问题:下载 bcpg-jdk15on-1.69.jar 失败!
解决方法:继续编译

(cmd) ~/tmp/github/thingsboard/thingsboard (v3.3.2)$ mvn package -DskipTests

[INFO] --------------------< org.thingsboard:rest-client >---------------------
[INFO] Building Thingsboard Rest Client 3.3.2                           [34/46]
[INFO] --------------------------------[ jar ]---------------------------------
[INFO]
[INFO] --- maven-resources-plugin:2.7:resources (default-resources) @ rest-client ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 1 resource
[INFO]
[INFO] --- maven-compiler-plugin:3.8.1:compile (default-compile) @ rest-client ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 2 source files to /home/devusr/tmp/github/thingsboard/thingsboard/rest-client/target/classes
compiler message file broken: key=compiler.misc.msg.bug arguments=11, {1}, {2}, {3}, {4}, {5}, {6}, {7}
java.lang.NullPointerException
        at jdk.compiler/com.sun.tools.javac.comp.Flow$FlowAnalyzer.visitApply(Flow.java:1235)
        at jdk.compiler/com.sun.tools.javac.tree.JCTree$JCMethodInvocation.accept(JCTree.java:1634)
        at jdk.compiler/com.sun.tools.javac.tree.TreeScanner.scan(TreeScanner.java:49)
        at jdk.compiler/com.sun.tools.javac.comp.Flow$BaseAnalyzer.scan(Flow.java:398)
        at jdk.compiler/com.sun.tools.javac.comp.Flow$FlowAnalyzer.visitReturn(Flow.java:1210)
        at jdk.compiler/com.sun.tools.javac.tree.JCTree$JCReturn.accept(JCTree.java:1546)
        at jdk.compiler/com.sun.tools.javac.tree.TreeScanner.scan(TreeScanner.java:49)
        at jdk.compiler/com.sun.tools.javac.comp.Flow$BaseAnalyzer.scan(Flow.java:398)
        at jdk.compiler/com.sun.tools.javac.tree.TreeScanner.scan(TreeScanner.java:57)
        at jdk.compiler/com.sun.tools.javac.comp.Flow$FlowAnalyzer.visitBlock(Flow.java:997)
        at jdk.compiler/com.sun.tools.javac.tree.JCTree$JCBlock.accept(JCTree.java:1020)
        at jdk.compiler/com.sun.tools.javac.tree.TreeScanner.scan(TreeScanner.java:49)
        at jdk.compiler/com.sun.tools.javac.comp.Flow$BaseAnalyzer.scan(Flow.java:398)
        at jdk.compiler/com.sun.tools.javac.comp.Flow$FlowAnalyzer.visitMethodDef(Flow.java:964)
        at jdk.compiler/com.sun.tools.javac.tree.JCTree$JCMethodDecl.accept(JCTree.java:866)
        at jdk.compiler/com.sun.tools.javac.tree.TreeScanner.scan(TreeScanner.java:49)
        at jdk.compiler/com.sun.tools.javac.comp.Flow$BaseAnalyzer.scan(Flow.java:398)
        at jdk.compiler/com.sun.tools.javac.comp.Flow$FlowAnalyzer.visitClassDef(Flow.java:927)
        at jdk.compiler/com.sun.tools.javac.tree.JCTree$JCClassDecl.accept(JCTree.java:774)
        at jdk.compiler/com.sun.tools.javac.tree.TreeScanner.scan(TreeScanner.java:49)
        at jdk.compiler/com.sun.tools.javac.comp.Flow$BaseAnalyzer.scan(Flow.java:398)
        at jdk.compiler/com.sun.tools.javac.comp.Flow$FlowAnalyzer.analyzeTree(Flow.java:1327)
        at jdk.compiler/com.sun.tools.javac.comp.Flow$FlowAnalyzer.analyzeTree(Flow.java:1317)
        at jdk.compiler/com.sun.tools.javac.comp.Flow.analyzeTree(Flow.java:218)
        at jdk.compiler/com.sun.tools.javac.main.JavaCompiler.flow(JavaCompiler.java:1401)
        at jdk.compiler/com.sun.tools.javac.main.JavaCompiler.flow(JavaCompiler.java:1375)
        at jdk.compiler/com.sun.tools.javac.main.JavaCompiler.compile(JavaCompiler.java:973)
        at jdk.compiler/com.sun.tools.javac.api.JavacTaskImpl.lambda$doCall$0(JavacTaskImpl.java:104)
        at jdk.compiler/com.sun.tools.javac.api.JavacTaskImpl.handleExceptions(JavacTaskImpl.java:147)
        at jdk.compiler/com.sun.tools.javac.api.JavacTaskImpl.doCall(JavacTaskImpl.java:100)
        at jdk.compiler/com.sun.tools.javac.api.JavacTaskImpl.call(JavacTaskImpl.java:94)
        at org.codehaus.plexus.compiler.javac.JavaxToolsCompiler.compileInProcess(JavaxToolsCompiler.java:126)
        at org.codehaus.plexus.compiler.javac.JavacCompiler.performCompile(JavacCompiler.java:174)
        at org.apache.maven.plugin.compiler.AbstractCompilerMojo.execute(AbstractCompilerMojo.java:1134)
        at org.apache.maven.plugin.compiler.CompilerMojo.execute(CompilerMojo.java:187)
        at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:137)
        at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:210)
        at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:156)
        at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:148)
        at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:117)
        at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:81)
        at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:56)
        at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128)
        at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:305)
        at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:192)
        at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:105)
        at org.apache.maven.cli.MavenCli.execute(MavenCli.java:957)
        at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:289)
        at org.apache.maven.cli.MavenCli.main(MavenCli.java:193)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.base/java.lang.reflect.Method.invoke(Method.java:566)
        at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:282)
        at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:225)
        at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:406)
        at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:347)
[INFO] -------------------------------------------------------------
[ERROR] COMPILATION ERROR :
[INFO] -------------------------------------------------------------
[ERROR] An unknown compilation problem occurred
[INFO] 1 error
[INFO] -------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary for Thingsboard 3.3.2:
[INFO]
[INFO] Thingsboard ........................................ SUCCESS [  0.018 s]
[INFO] Netty MQTT Client .................................. SUCCESS [  0.807 s]
[INFO] Thingsboard Server Commons ......................... SUCCESS [  0.001 s]
[INFO] Thingsboard Server Common Data ..................... SUCCESS [  0.978 s]
[INFO] Thingsboard Server Common Utils .................... SUCCESS [  0.051 s]
[INFO] Thingsboard Server Common Messages ................. SUCCESS [  4.095 s]
[INFO] Thingsboard Actor system ........................... SUCCESS [  0.050 s]
[INFO] Thingsboard Server Stats ........................... SUCCESS [  0.041 s]
[INFO] Thingsboard Server Common Cluster API .............. SUCCESS [ 10.017 s]
[INFO] Thingsboard Server Queue components ................ SUCCESS [  0.301 s]
[INFO] Thingsboard Server Common Cache .................... SUCCESS [  0.047 s]
[INFO] Thingsboard Server Commons ......................... SUCCESS [  0.001 s]
[INFO] Thingsboard Server Common Transport components ..... SUCCESS [  3.278 s]
[INFO] Thingsboard MQTT Transport Common .................. SUCCESS [  0.070 s]
[INFO] Thingsboard HTTP Transport Common .................. SUCCESS [  0.051 s]
[INFO] Thingsboard CoAP server ............................ SUCCESS [  0.048 s]
[INFO] Thingsboard CoAP Transport Common .................. SUCCESS [  1.542 s]
[INFO] Thingsboard LwM2M Transport Common ................. SUCCESS [  0.110 s]
[INFO] Thingsboard SNMP Transport Common .................. SUCCESS [  0.055 s]
[INFO] Thingsboard Server Common DAO API .................. SUCCESS [  0.069 s]
[INFO] Thingsboard Server Remote Edge wrapper ............. SUCCESS [  5.201 s]
[INFO] Thingsboard Extensions ............................. SUCCESS [  0.001 s]
[INFO] Thingsboard Rule Engine API ........................ SUCCESS [  0.064 s]
[INFO] Thingsboard Server DAO Layer ....................... SUCCESS [  0.350 s]
[INFO] Thingsboard Rule Engine Components ................. SUCCESS [  0.497 s]
[INFO] Thingsboard Server Transport Modules ............... SUCCESS [  0.001 s]
[INFO] Thingsboard HTTP Transport Service ................. SUCCESS [ 26.432 s]
[INFO] Thingsboard MQTT Transport Service ................. SUCCESS [ 19.490 s]
[INFO] Thingsboard CoAP Transport Service ................. SUCCESS [ 18.511 s]
[INFO] Thingsboard LwM2m Transport Service ................ SUCCESS [ 20.509 s]
[INFO] Thingsboard SNMP Transport Service ................. SUCCESS [ 17.158 s]
[INFO] ThingsBoard Server UI .............................. SUCCESS [05:01 min]
[INFO] Thingsboard Server Tools ........................... SUCCESS [  0.537 s]
[INFO] Thingsboard Rest Client ............................ FAILURE [  0.797 s]
[INFO] ThingsBoard Server Application ..................... SKIPPED
[INFO] ThingsBoard Microservices .......................... SKIPPED
[INFO] ThingsBoard Docker Images .......................... SKIPPED
[INFO] ThingsBoard JavaScript Executor Microservice ....... SKIPPED
[INFO] ThingsBoard Web UI Microservice .................... SKIPPED
[INFO] ThingsBoard Node Microservice ...................... SKIPPED
[INFO] ThingsBoard Transport Microservices ................ SKIPPED
[INFO] ThingsBoard MQTT Transport Microservice ............ SKIPPED
[INFO] ThingsBoard HTTP Transport Microservice ............ SKIPPED
[INFO] ThingsBoard COAP Transport Microservice ............ SKIPPED
[INFO] ThingsBoard LWM2M Transport Microservice ........... SKIPPED
[INFO] ThingsBoard SNMP Transport Microservice ............ SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  07:13 min
[INFO] Finished at: 2021-11-15T14:47:35+08:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.8.1:compile (default-compile) on project rest-client: Compilation failure
[ERROR] An unknown compilation problem occurred
[ERROR]
[ERROR] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
[ERROR]
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR]   mvn <args> -rf :rest-client
(cmd) ~/tmp/github/thingsboard/thingsboard (v3.3.2)$

2.3 编译至【34/46】Rest Client 报错!

原因是工具问题:JDK11版本太旧,导致编译报错 java.lang.NullPointerException
解决方法:更新JDK11版本

根据官网文档【https://thingsboard.io/docs/user-guide/install/windows/】

Step 1. Install Java 11 (OpenJDK)

ThingsBoard service is running on Java 11. Follow this instructions to install OpenJDK 11.

  • Visit Open JDK Download Page to download latest OpenJDK 11 (LTS) MSI package.
  • Run the downloaded MSI package and follow the instructions. Make sure you have selected “Add to PATH” and “Set JAVA_HOME variable” options to “Will be installed on local hard drive” state.

Open JDK Download Page目前已经不能下载,需转到adoptium.net网站下载!

https://adoptopenjdk.net/index.html

Latest release | Adoptium - Open source, prebuilt OpenJDK binarieshttps://adoptium.net/releases.html?variant=openjdk11

Latest release | Adoptium - Open source, prebuilt OpenJDK binariesEclipse Adoptium provides prebuilt OpenJDK binaries from a fully open source set of build scripts and infrastructure. Supported platforms include Linux, macOS, Windows, ARM, Solaris, and AIX.https://adoptium.net/releases.html?variant=openjdk11

2.3.1 下载OpenJDK11U-jdk_x64_linux_hotspot_11.0.13_8.tar.gz

Linux版本:OpenJDK11U-jdk_x64_linux_hotspot_11.0.13_8.tar.gz
https://github.com/adoptium/temurin11-binaries/releases/download/jdk-11.0.13%2B8/OpenJDK11U-jdk_x64_linux_hotspot_11.0.13_8.tar.gz

Windows版本:OpenJDK11U-jdk_x64_windows_hotspot_11.0.13_8.zip
https://github.com/adoptium/temurin11-binaries/releases/download/jdk-11.0.13%2B8/OpenJDK11U-jdk_x64_windows_hotspot_11.0.13_8.zip

2.3.2 解压得jdk-11.0.13+8

2.3.3 设置环境变量

# JDK11
export JAVA_HOME=/home/devusr/tools/jdk-11.0.13+8
export PATH=$JAVA_HOME/bin:$PATH

# Apache Maven
export M2_HOME=/home/devusr/tools/apache-maven-3.6.3
export PATH=$M2_HOME/bin:$PATH

# NodeJS
export PATH=/home/devusr/tools/node-v12.16.1-linux-x64/bin:$PATH

2.3.4 验证jdk安装配置是否成功

(cmd) ~/tmp/github/thingsboard/thingsboard (v3.3.2)$ java --version

openjdk 11.0.13 2021-10-19
OpenJDK Runtime Environment Temurin-11.0.13+8 (build 11.0.13+8)
OpenJDK 64-Bit Server VM Temurin-11.0.13+8 (build 11.0.13+8, mixed mode)
(cmd) ~/tmp/github/thingsboard/thingsboard (v3.3.2)$ node --version
v12.16.1
(cmd) ~/tmp/github/thingsboard/thingsboard (v3.3.2)$
(cmd) ~/tmp/github/thingsboard/thingsboard (v3.3.2)$ yarn --version
1.22.11

2.3.5 继续编译

(cmd) ~/tmp/github/thingsboard/thingsboard (v3.3.2)$ mvn package -DskipTests

[INFO] ------------------< org.thingsboard.msa:js-executor >-------------------
[INFO] Building ThingsBoard JavaScript Executor Microservice 3.3.2      [38/46]
[INFO] --------------------------------[ pom ]---------------------------------
[INFO]
[INFO] --- maven-dependency-plugin:2.8:copy (copy-protoc) @ js-executor ---
[INFO] Configured Artifact: com.google.protobuf:protoc:linux-x86_64:3.17.2:exe
[INFO] Copying protoc-3.17.2-linux-x86_64.exe to /home/devusr/tmp/github/thingsboard/thingsboard/msa/js-executor/target/protoc-3.17.2-linux-x86_64.exe
[INFO]
[INFO] --- frontend-maven-plugin:1.12.0:install-node-and-yarn (install node and yarn) @ js-executor ---
[INFO] Installing node version v12.16.1
[INFO] Unpacking /home/devusr/tools/apache-maven-3.6.3/repo/com/github/eirslett/node/12.16.1/node-12.16.1-linux-x64.tar.gz into /home/devusr/tmp/github/thingsboard/thingsboard/msa/js-executor/target/node/tmp
[INFO] Copying node binary from /home/devusr/tmp/github/thingsboard/thingsboard/msa/js-executor/target/node/tmp/node-v12.16.1-linux-x64/bin/node to /home/devusr/tmp/github/thingsboard/thingsboard/msa/js-executor/target/node/node
[INFO] Installed node locally.
[INFO] Installing Yarn version v1.22.4
[INFO] Unpacking /home/devusr/tools/apache-maven-3.6.3/repo/com/github/eirslett/yarn/1.22.4/yarn-1.22.4.tar.gz into /home/devusr/tmp/github/thingsboard/thingsboard/msa/js-executor/target/node/yarn
[INFO] Installed Yarn locally.
[INFO]
[INFO] --- frontend-maven-plugin:1.12.0:yarn (yarn install) @ js-executor ---
[INFO] Running 'yarn install' in /home/devusr/tmp/github/thingsboard/thingsboard/msa/js-executor
[INFO] yarn install v1.22.4
[INFO] [1/5] Validating package.json...
[INFO] [2/5] Resolving packages...
[INFO] [3/5] Fetching packages...
[INFO] info fsevents@2.1.3: The platform "linux" is incompatible with this module.
[INFO] info "fsevents@2.1.3" is an optional dependency and failed compatibility check. Excluding it from installation.
[INFO] [4/5] Linking dependencies...
[INFO] [5/5] Building fresh packages...
[INFO] $ pkg -t node12-linux-x64,node12-win-x64 --out-path ./target . && node install.js
[INFO] > pkg@5.3.1
[INFO] > Fetching base Node.js binaries to PKG_CACHE_PATH
[INFO]
[INFO]
[INFO] > Not found in remote cache:
[INFO]   {"tag":"v3.2","name":"node-v12.22.2-win-x64"}
[INFO] > Building base binary from source:
[INFO]   built-v12.22.2-win-x64
[INFO] > Error! Not able to build for 'win' here, only for 'linux'
[INFO] error Command failed with exit code 2.
[INFO] error Command failed with exit code 2.info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary for Thingsboard 3.3.2:
[INFO]
[INFO] Thingsboard ........................................ SUCCESS [  0.018 s]
[INFO] Netty MQTT Client .................................. SUCCESS [  0.924 s]
[INFO] Thingsboard Server Commons ......................... SUCCESS [  0.002 s]
[INFO] Thingsboard Server Common Data ..................... SUCCESS [  0.996 s]
[INFO] Thingsboard Server Common Utils .................... SUCCESS [  0.049 s]
[INFO] Thingsboard Server Common Messages ................. SUCCESS [  4.058 s]
[INFO] Thingsboard Actor system ........................... SUCCESS [  0.064 s]
[INFO] Thingsboard Server Stats ........................... SUCCESS [  0.046 s]
[INFO] Thingsboard Server Common Cluster API .............. SUCCESS [ 10.046 s]
[INFO] Thingsboard Server Queue components ................ SUCCESS [  0.359 s]
[INFO] Thingsboard Server Common Cache .................... SUCCESS [  0.060 s]
[INFO] Thingsboard Server Commons ......................... SUCCESS [  0.001 s]
[INFO] Thingsboard Server Common Transport components ..... SUCCESS [  3.802 s]
[INFO] Thingsboard MQTT Transport Common .................. SUCCESS [  0.100 s]
[INFO] Thingsboard HTTP Transport Common .................. SUCCESS [  0.061 s]
[INFO] Thingsboard CoAP server ............................ SUCCESS [  0.058 s]
[INFO] Thingsboard CoAP Transport Common .................. SUCCESS [  1.590 s]
[INFO] Thingsboard LwM2M Transport Common ................. SUCCESS [  0.128 s]
[INFO] Thingsboard SNMP Transport Common .................. SUCCESS [  0.060 s]
[INFO] Thingsboard Server Common DAO API .................. SUCCESS [  0.070 s]
[INFO] Thingsboard Server Remote Edge wrapper ............. SUCCESS [  4.686 s]
[INFO] Thingsboard Extensions ............................. SUCCESS [  0.002 s]
[INFO] Thingsboard Rule Engine API ........................ SUCCESS [  0.064 s]
[INFO] Thingsboard Server DAO Layer ....................... SUCCESS [  0.481 s]
[INFO] Thingsboard Rule Engine Components ................. SUCCESS [  0.414 s]
[INFO] Thingsboard Server Transport Modules ............... SUCCESS [  0.001 s]
[INFO] Thingsboard HTTP Transport Service ................. SUCCESS [ 28.818 s]
[INFO] Thingsboard MQTT Transport Service ................. SUCCESS [ 21.177 s]
[INFO] Thingsboard CoAP Transport Service ................. SUCCESS [ 18.219 s]
[INFO] Thingsboard LwM2m Transport Service ................ SUCCESS [ 19.420 s]
[INFO] Thingsboard SNMP Transport Service ................. SUCCESS [ 19.318 s]
[INFO] ThingsBoard Server UI .............................. SUCCESS [03:12 min]
[INFO] Thingsboard Server Tools ........................... SUCCESS [  0.059 s]
[INFO] Thingsboard Rest Client ............................ SUCCESS [  0.934 s]
[INFO] ThingsBoard Server Application ..................... SUCCESS [16:08 min]
[INFO] ThingsBoard Microservices .......................... SUCCESS [  0.001 s]
[INFO] ThingsBoard Docker Images .......................... SUCCESS [  0.716 s]
[INFO] ThingsBoard JavaScript Executor Microservice ....... FAILURE [19:31 min]
[INFO] ThingsBoard Web UI Microservice .................... SKIPPED
[INFO] ThingsBoard Node Microservice ...................... SKIPPED
[INFO] ThingsBoard Transport Microservices ................ SKIPPED
[INFO] ThingsBoard MQTT Transport Microservice ............ SKIPPED
[INFO] ThingsBoard HTTP Transport Microservice ............ SKIPPED
[INFO] ThingsBoard COAP Transport Microservice ............ SKIPPED
[INFO] ThingsBoard LWM2M Transport Microservice ........... SKIPPED
[INFO] ThingsBoard SNMP Transport Microservice ............ SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  41:10 min
[INFO] Finished at: 2021-11-15T21:18:37+08:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal com.github.eirslett:frontend-maven-plugin:1.12.0:yarn (yarn install) on project js-executor: Failed to run task: 'yarn install' failed. org.apache.commons.exec.ExecuteException: Process exited with an error: 2 (Exit value: 2) -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
[ERROR]
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR]   mvn <args> -rf :js-executor
(cmd) ~/tmp/github/thingsboard/thingsboard (v3.3.2)$

2.4 编译至【38/46】JavaScript Executor Microservice 报错!

原因是工具问题:yarn版本过高,导致'yarn install'失败!
解决方法:更新yarn版本为ThingsBoard要求的版本1.22.4

2.4.1 卸载yarn

(cmd) ~/tools$ npm uninstall -g yarn

2.4.2 安装指定版本的yarn

(cmd) ~/tools$ npm install -g yarn@1.22.4
/home/devusr/tools/node-v12.16.1-linux-x64/bin/yarn -> /home/devusr/tools/node-v12.16.1-linux-x64/lib/node_modules/yarn/bin/yarn.js
/home/devusr/tools/node-v12.16.1-linux-x64/bin/yarnpkg -> /home/devusr/tools/node-v12.16.1-linux-x64/lib/node_modules/yarn/bin/yarn.js
+ yarn@1.22.4
added 1 package in 1.642s
(cmd) ~/tools$ yarn --version
1.22.4
(cmd) ~/tools$

2.4.3 清理缓存

(cmd) ~/tmp/github/thingsboard/thingsboard/ (v3.3.2)$ yarn cache clean
yarn cache v1.22.4
success Cleared cache.
Done in 11.81s.

2.4.4 配置yarn镜像仓库

(cmd) ~/tmp/github/thingsboard/thingsboard/ (v3.3.2)$ yarn config set registry https://registry.npm.taobao.org
yarn config v1.22.4
success Set "registry" to "https://registry.npm.taobao.org".
Done in 0.06s.

2.4.5 继续编译

(cmd) ~/tmp/github/thingsboard/thingsboard (v3.3.2)$ mvn package -DskipTests

[INFO] --- frontend-maven-plugin:1.12.0:yarn (yarn install) @ js-executor ---
[INFO] Running 'yarn install' in /home/devusr/tmp/github/thingsboard/thingsboard/msa/js-executor
[INFO] yarn install v1.22.4
[INFO] warning package-lock.json found. Your project contains lock files generated by tools other than Yarn. It is advised not to mix package managers in order to avoid resolution inconsistencies caused by unsynchronized lock files. To clear this warning, remove package-lock.json.
[INFO] [1/5] Validating package.json...
[INFO] [2/5] Resolving packages...
[INFO] success Already up-to-date.
[INFO] $ pkg -t node12-linux-x64,node12-win-x64 --out-path ./target . && node install.js
[INFO] > pkg@5.3.1
[INFO] > Fetching base Node.js binaries to PKG_CACHE_PATH
[INFO] > Not found in remote cache:
[INFO]   {"tag":"v3.2","name":"node-v12.22.2-win-x64"}
[INFO] > Building base binary from source:
[INFO]   built-v12.22.2-win-x64
[INFO] > Error! Not able to build for 'win' here, only for 'linux'
[INFO] error Command failed with exit code 2.
[INFO] info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary for Thingsboard 3.3.2:
[INFO]
[INFO] Thingsboard ........................................ SUCCESS [  0.027 s]
[INFO] Netty MQTT Client .................................. SUCCESS [  0.902 s]
[INFO] Thingsboard Server Commons ......................... SUCCESS [  0.002 s]
[INFO] Thingsboard Server Common Data ..................... SUCCESS [  0.927 s]
[INFO] Thingsboard Server Common Utils .................... SUCCESS [  0.051 s]
[INFO] Thingsboard Server Common Messages ................. SUCCESS [  4.202 s]
[INFO] Thingsboard Actor system ........................... SUCCESS [  0.045 s]
[INFO] Thingsboard Server Stats ........................... SUCCESS [  0.060 s]
[INFO] Thingsboard Server Common Cluster API .............. SUCCESS [  9.621 s]
[INFO] Thingsboard Server Queue components ................ SUCCESS [  0.351 s]
[INFO] Thingsboard Server Common Cache .................... SUCCESS [  0.050 s]
[INFO] Thingsboard Server Commons ......................... SUCCESS [  0.001 s]
[INFO] Thingsboard Server Common Transport components ..... SUCCESS [  3.818 s]
[INFO] Thingsboard MQTT Transport Common .................. SUCCESS [  0.101 s]
[INFO] Thingsboard HTTP Transport Common .................. SUCCESS [  0.063 s]
[INFO] Thingsboard CoAP server ............................ SUCCESS [  0.078 s]
[INFO] Thingsboard CoAP Transport Common .................. SUCCESS [  1.808 s]
[INFO] Thingsboard LwM2M Transport Common ................. SUCCESS [  0.122 s]
[INFO] Thingsboard SNMP Transport Common .................. SUCCESS [  0.055 s]
[INFO] Thingsboard Server Common DAO API .................. SUCCESS [  0.070 s]
[INFO] Thingsboard Server Remote Edge wrapper ............. SUCCESS [  4.932 s]
[INFO] Thingsboard Extensions ............................. SUCCESS [  0.002 s]
[INFO] Thingsboard Rule Engine API ........................ SUCCESS [  0.043 s]
[INFO] Thingsboard Server DAO Layer ....................... SUCCESS [  0.371 s]
[INFO] Thingsboard Rule Engine Components ................. SUCCESS [  0.428 s]
[INFO] Thingsboard Server Transport Modules ............... SUCCESS [  0.001 s]
[INFO] Thingsboard HTTP Transport Service ................. SUCCESS [ 19.624 s]
[INFO] Thingsboard MQTT Transport Service ................. SUCCESS [ 18.418 s]
[INFO] Thingsboard CoAP Transport Service ................. SUCCESS [ 19.108 s]
[INFO] Thingsboard LwM2m Transport Service ................ SUCCESS [ 18.437 s]
[INFO] Thingsboard SNMP Transport Service ................. SUCCESS [ 17.721 s]
[INFO] ThingsBoard Server UI .............................. SUCCESS [03:38 min]
[INFO] Thingsboard Server Tools ........................... SUCCESS [  0.045 s]
[INFO] Thingsboard Rest Client ............................ SUCCESS [  0.028 s]
[INFO] ThingsBoard Server Application ..................... SUCCESS [ 30.851 s]
[INFO] ThingsBoard Microservices .......................... SUCCESS [  0.002 s]
[INFO] ThingsBoard Docker Images .......................... SUCCESS [  1.751 s]
[INFO] ThingsBoard JavaScript Executor Microservice ....... FAILURE [04:37 min]
[INFO] ThingsBoard Web UI Microservice .................... SKIPPED
[INFO] ThingsBoard Node Microservice ...................... SKIPPED
[INFO] ThingsBoard Transport Microservices ................ SKIPPED
[INFO] ThingsBoard MQTT Transport Microservice ............ SKIPPED
[INFO] ThingsBoard HTTP Transport Microservice ............ SKIPPED
[INFO] ThingsBoard COAP Transport Microservice ............ SKIPPED
[INFO] ThingsBoard LWM2M Transport Microservice ........... SKIPPED
[INFO] ThingsBoard SNMP Transport Microservice ............ SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  10:50 min
[INFO] Finished at: 2021-11-15T21:58:29+08:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal com.github.eirslett:frontend-maven-plugin:1.12.0:yarn (yarn install) on project js-executor: Failed to run task: 'yarn install' failed. org.apache.commons.exec.ExecuteException: Process exited with an error: 2 (Exit value: 2) -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
[ERROR]
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR]   mvn <args> -rf :js-executor
(cmd) ~/tmp/github/thingsboard/thingsboard (v3.3.2)$

[INFO] ThingsBoard JavaScript Executor Microservice ....... FAILURE [04:37 min]

[INFO] $ pkg -t node12-linux-x64,node12-win-x64 --out-path ./target . && node install.js

Error! Not able to build for 'win' here, only for 'linux'

2.5 编译至【38/46】JavaScript Executor Microservice 报错!

原因是网络问题:下载 node12-linux-x64,node12-win-x64 失败!
解决方法:继续编译

2021.11.16 周二 【250】编译TB 3.3.2
===================================

[INFO] ------------------< org.thingsboard.msa:js-executor >-------------------
[INFO] Building ThingsBoard JavaScript Executor Microservice 3.3.2      [38/46]
[INFO] --------------------------------[ pom ]---------------------------------
[INFO]
[INFO] --- maven-dependency-plugin:2.8:copy (copy-protoc) @ js-executor ---
[INFO] Configured Artifact: com.google.protobuf:protoc:linux-x86_64:3.17.2:exe
[INFO] Copying protoc-3.17.2-linux-x86_64.exe to /home/devusr/tmp/github/thingsboard/thingsboard/msa/js-executor/target/protoc-3.17.2-linux-x86_64.exe
[INFO]
[INFO] --- frontend-maven-plugin:1.12.0:install-node-and-yarn (install node and yarn) @ js-executor ---
[INFO] Node v12.16.1 is already installed.
[INFO] Yarn 1.22.4 is already installed.
[INFO]
[INFO] --- frontend-maven-plugin:1.12.0:yarn (yarn install) @ js-executor ---
[INFO] Running 'yarn install' in /home/devusr/tmp/github/thingsboard/thingsboard/msa/js-executor
[INFO] yarn install v1.22.4
[INFO] warning package-lock.json found. Your project contains lock files generated by tools other than Yarn. It is advised not to mix package managers in order to avoid resolution inconsistencies caused by unsynchronized lock files. To clear this warning, remove package-lock.json.
[INFO] [1/5] Validating package.json...
[INFO] [2/5] Resolving packages...
[INFO] success Already up-to-date.
[INFO] $ pkg -t node12-linux-x64 --out-path ./target . && node install.js
[INFO] > pkg@5.3.1
[INFO] > Warning Failed to make bytecode node12-x64 for file /snapshot/js-executor/node_modules/@opencensus/web-types/build/src/index.js
[INFO] (node:15618) UnhandledPromiseRejectionWarning: Error: ENOENT: no such file or directory, lstat '/home/devusr/tmp/github/thingsboard/thingsboard/msa/js-executor/target/thingsboard-js-executor-linux'
[INFO] (node:15618) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
[INFO] (node:15618) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
[INFO] Done in 23.27s.
[INFO]
[INFO] --- maven-resources-plugin:2.7:copy-resources (copy-conf) @ js-executor ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory /home/devusr/tmp/github/thingsboard/thingsboard/msa/js-executor/src/main/resources
[INFO] skip non existing resourceDirectory /home/devusr/tmp/github/thingsboard/thingsboard/msa/js-executor/src/main/resources
[INFO]
[INFO] --- maven-resources-plugin:2.7:copy-resources (copy-service-conf) @ js-executor ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory /home/devusr/tmp/github/thingsboard/thingsboard/msa/js-executor/src/main/conf
[INFO]
[INFO] --- maven-resources-plugin:2.7:copy-resources (copy-linux-conf) @ js-executor ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 4 resources
[INFO]
[INFO] --- maven-resources-plugin:2.7:copy-resources (copy-linux-init) @ js-executor ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 1 resource
[INFO]
[INFO] --- maven-resources-plugin:2.7:copy-resources (copy-win-conf) @ js-executor ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory /home/devusr/tmp/github/thingsboard/thingsboard/msa/js-executor/src/main/resources
[INFO] skip non existing resourceDirectory /home/devusr/tmp/github/thingsboard/thingsboard/msa/js-executor/src/main/resources
[INFO] skip non existing resourceDirectory /home/devusr/tmp/github/thingsboard/thingsboard/msa/js-executor/src/main/conf
[INFO]
[INFO] --- maven-resources-plugin:2.7:copy-resources (copy-control) @ js-executor ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 9 resources
[INFO]
[INFO] --- maven-resources-plugin:2.7:copy-resources (copy-install) @ js-executor ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory /home/devusr/tmp/github/thingsboard/thingsboard/msa/js-executor/../../packaging/js/scripts/install
[INFO]
[INFO] --- maven-resources-plugin:2.7:copy-resources (copy-windows-control) @ js-executor ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 3 resources
[INFO]
[INFO] --- maven-resources-plugin:2.7:copy-resources (copy-windows-install) @ js-executor ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory /home/devusr/tmp/github/thingsboard/thingsboard/msa/js-executor/../../packaging/js/scripts/install
[INFO]
[INFO] --- maven-resources-plugin:2.7:copy-resources (copy-data) @ js-executor ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory /home/devusr/tmp/github/thingsboard/thingsboard/msa/js-executor/src/main/data
[INFO] skip non existing resourceDirectory /home/devusr/tmp/github/thingsboard/thingsboard/msa/js-executor/../dao/src/main/resources
[INFO] skip non existing resourceDirectory /home/devusr/tmp/github/thingsboard/thingsboard/msa/js-executor/../common/transport/lwm2m/src/main/resources
[INFO]
[INFO] --- maven-resources-plugin:2.7:copy-resources (copy-lwm2m-resources) @ js-executor ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory /home/devusr/tmp/github/thingsboard/thingsboard/msa/js-executor/../common/transport/lwm2m/src/main/resources
[INFO]
[INFO] --- maven-resources-plugin:2.7:copy-resources (copy-docker-config) @ js-executor ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 2 resources
[INFO]
[INFO] --- maven-dependency-plugin:2.8:copy (copy-winsw-service) @ js-executor ---
[INFO] Configured Artifact: com.sun.winsw:winsw:bin:?:exe
[INFO] com.sun.winsw:winsw:bin:2.0.1:exe already exists in /home/devusr/tmp/github/thingsboard/thingsboard/msa/js-executor/target/package/windows
[INFO]
[INFO] --- gradle-maven-plugin:1.0.11:invoke (default) @ js-executor ---
[INFO] jvmArgs: [Ljava.lang.String;@8f8aa74
[INFO] gradleProjectDirectory: /home/devusr/tmp/github/thingsboard/thingsboard/msa/js-executor/../../packaging/js
[INFO] Build
[INFO] Connecting to Gradle Daemon
[INFO] Build
[INFO] Run build
[INFO] Evaluate settings
[INFO] Run build
[INFO] Configure build
[INFO] Load projects
[INFO] Configure build
[INFO] Configure project :
[INFO] Resolve dependencies of detachedConfiguration1
[INFO] Configure project :
[INFO] Resolve dependencies of :classpath
[INFO] Configure project :
[INFO] Resolve files of :classpath
[INFO] Configure project :
[INFO] Resolve files of :classpath
[INFO] Configure project :
[INFO] Configure build
[INFO] Run build
[INFO] Run main tasks
[INFO] Run tasks
[INFO] Task :assemble
[INFO] Run tasks
[INFO] Task :check
[INFO] Run tasks
[INFO] Task :build
[INFO] Run tasks
[INFO] Task :buildDeb
[INFO] Run tasks
[INFO] Task :buildRpm
[INFO] Run tasks
[INFO] Run main tasks
[INFO] Run build
[INFO] Build model 'java.lang.Void' for root project 'js'
[INFO] Run build
[INFO] Build
[INFO] Deleting unused version-specific caches in /home/devusr/tmp/github/thingsboard/thingsboard/packaging/js/.gradle
[INFO] Build
> Task :assemble UP-TO-DATE
> Task :check UP-TO-DATE
> Task :build UP-TO-DATE
> Task :buildDeb UP-TO-DATE
> Task :buildRpm UP-TO-DATE

BUILD SUCCESSFUL in 897ms
2 actionable tasks: 2 up-to-date
[INFO]
[INFO] gradle execution complete
[INFO]
[INFO] --- maven-assembly-plugin:3.0.0:single (assembly) @ js-executor ---
[INFO] Reading assembly descriptor: /home/devusr/tmp/github/thingsboard/thingsboard/msa/js-executor/../../packaging/js/assembly/windows.xml
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary for Thingsboard 3.3.2:
[INFO]
[INFO] Thingsboard ........................................ SUCCESS [  0.023 s]
[INFO] Netty MQTT Client .................................. SUCCESS [  0.800 s]
[INFO] Thingsboard Server Commons ......................... SUCCESS [  0.002 s]
[INFO] Thingsboard Server Common Data ..................... SUCCESS [  0.962 s]
[INFO] Thingsboard Server Common Utils .................... SUCCESS [  0.054 s]
[INFO] Thingsboard Server Common Messages ................. SUCCESS [  4.084 s]
[INFO] Thingsboard Actor system ........................... SUCCESS [  0.042 s]
[INFO] Thingsboard Server Stats ........................... SUCCESS [  0.036 s]
[INFO] Thingsboard Server Common Cluster API .............. SUCCESS [ 10.126 s]
[INFO] Thingsboard Server Queue components ................ SUCCESS [  9.264 s]
[INFO] Thingsboard Server Common Cache .................... SUCCESS [  0.047 s]
[INFO] Thingsboard Server Commons ......................... SUCCESS [  0.001 s]
[INFO] Thingsboard Server Common Transport components ..... SUCCESS [  3.634 s]
[INFO] Thingsboard MQTT Transport Common .................. SUCCESS [  0.111 s]
[INFO] Thingsboard HTTP Transport Common .................. SUCCESS [  0.072 s]
[INFO] Thingsboard CoAP server ............................ SUCCESS [  0.063 s]
[INFO] Thingsboard CoAP Transport Common .................. SUCCESS [  1.657 s]
[INFO] Thingsboard LwM2M Transport Common ................. SUCCESS [  0.136 s]
[INFO] Thingsboard SNMP Transport Common .................. SUCCESS [  0.061 s]
[INFO] Thingsboard Server Common DAO API .................. SUCCESS [  0.108 s]
[INFO] Thingsboard Server Remote Edge wrapper ............. SUCCESS [  4.878 s]
[INFO] Thingsboard Extensions ............................. SUCCESS [  0.001 s]
[INFO] Thingsboard Rule Engine API ........................ SUCCESS [  0.056 s]
[INFO] Thingsboard Server DAO Layer ....................... SUCCESS [  0.480 s]
[INFO] Thingsboard Rule Engine Components ................. SUCCESS [  0.379 s]
[INFO] Thingsboard Server Transport Modules ............... SUCCESS [  0.000 s]
[INFO] Thingsboard HTTP Transport Service ................. SUCCESS [ 32.171 s]
[INFO] Thingsboard MQTT Transport Service ................. SUCCESS [ 21.199 s]
[INFO] Thingsboard CoAP Transport Service ................. SUCCESS [ 19.161 s]
[INFO] Thingsboard LwM2m Transport Service ................ SUCCESS [ 18.941 s]
[INFO] Thingsboard SNMP Transport Service ................. SUCCESS [ 18.998 s]
[INFO] ThingsBoard Server UI .............................. SUCCESS [03:01 min]
[INFO] Thingsboard Server Tools ........................... SUCCESS [  0.045 s]
[INFO] Thingsboard Rest Client ............................ SUCCESS [  0.028 s]
[INFO] ThingsBoard Server Application ..................... SUCCESS [ 30.887 s]
[INFO] ThingsBoard Microservices .......................... SUCCESS [  0.003 s]
[INFO] ThingsBoard Docker Images .......................... SUCCESS [  2.141 s]
[INFO] ThingsBoard JavaScript Executor Microservice ....... FAILURE [ 25.137 s]
[INFO] ThingsBoard Web UI Microservice .................... SKIPPED
[INFO] ThingsBoard Node Microservice ...................... SKIPPED
[INFO] ThingsBoard Transport Microservices ................ SKIPPED
[INFO] ThingsBoard MQTT Transport Microservice ............ SKIPPED
[INFO] ThingsBoard HTTP Transport Microservice ............ SKIPPED
[INFO] ThingsBoard COAP Transport Microservice ............ SKIPPED
[INFO] ThingsBoard LWM2M Transport Microservice ........... SKIPPED
[INFO] ThingsBoard SNMP Transport Microservice ............ SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  06:27 min
[INFO] Finished at: 2021-11-16T08:34:25+08:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-assembly-plugin:3.0.0:single (assembly) on project js-executor: Failed to create assembly: Error adding file to archive: /home/devusr/tmp/github/thingsboard/thingsboard/msa/js-executor/target/package/windows/bin/tb-js-executor.exe -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
[ERROR]
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR]   mvn <args> -rf :js-executor
(cmd) ~/tmp/github/thingsboard/thingsboard (v3.3.2)$

2.5.1 网络问题,继续编译

(cmd) ~/tmp/github/thingsboard/thingsboard (v3.3.2)$ mvn package -DskipTests

[INFO] gradleProjectDirectory: /home/devusr/tmp/github/thingsboard/thingsboard/msa/js-executor/../../packaging/js
[INFO] Build
[INFO] Connecting to Gradle Daemon
[INFO] Build
[INFO] Run build
[INFO] Evaluate settings
[INFO] Run build
[INFO] Configure build
[INFO] Load projects
[INFO] Configure build
[INFO] Configure project :
[INFO] Resolve dependencies of detachedConfiguration1
[INFO] Configure project :
[INFO] Resolve dependencies of :classpath
[INFO] Configure project :
[INFO] Resolve files of :classpath
[INFO] Configure project :
[INFO] Resolve files of :classpath
[INFO] Configure project :
[INFO] Configure build
[INFO] Run build
[INFO] Run main tasks
[INFO] Run tasks
[INFO] Task :assemble
[INFO] Run tasks
[INFO] Task :check
[INFO] Run tasks
[INFO] Task :build
[INFO] Run tasks
[INFO] Task :buildDeb
[INFO] Run tasks
[INFO] Task :buildRpm
[INFO] Run tasks
[INFO] Run main tasks
[INFO] Run build
[INFO] Build model 'java.lang.Void' for root project 'js'
[INFO] Run build
[INFO] Build
[INFO] Deleting unused version-specific caches in /home/devusr/tmp/github/thingsboard/thingsboard/packaging/js/.gradle
[INFO] Build
> Task :assemble UP-TO-DATE
> Task :check UP-TO-DATE
> Task :build UP-TO-DATE
> Task :buildDeb UP-TO-DATE
> Task :buildRpm UP-TO-DATE

BUILD SUCCESSFUL in 897ms
2 actionable tasks: 2 up-to-date
[INFO]
[INFO] gradle execution complete
[INFO]
[INFO] --- maven-assembly-plugin:3.0.0:single (assembly) @ js-executor ---
[INFO] Reading assembly descriptor: /home/devusr/tmp/github/thingsboard/thingsboard/msa/js-executor/../../packaging/js/assembly/windows.xml
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary for Thingsboard 3.3.2:
[INFO]
[INFO] Thingsboard ........................................ SUCCESS [  0.023 s]
[INFO] Netty MQTT Client .................................. SUCCESS [  0.800 s]
[INFO] Thingsboard Server Commons ......................... SUCCESS [  0.002 s]
[INFO] Thingsboard Server Common Data ..................... SUCCESS [  0.962 s]
[INFO] Thingsboard Server Common Utils .................... SUCCESS [  0.054 s]
[INFO] Thingsboard Server Common Messages ................. SUCCESS [  4.084 s]
[INFO] Thingsboard Actor system ........................... SUCCESS [  0.042 s]
[INFO] Thingsboard Server Stats ........................... SUCCESS [  0.036 s]
[INFO] Thingsboard Server Common Cluster API .............. SUCCESS [ 10.126 s]
[INFO] Thingsboard Server Queue components ................ SUCCESS [  9.264 s]
[INFO] Thingsboard Server Common Cache .................... SUCCESS [  0.047 s]
[INFO] Thingsboard Server Commons ......................... SUCCESS [  0.001 s]
[INFO] Thingsboard Server Common Transport components ..... SUCCESS [  3.634 s]
[INFO] Thingsboard MQTT Transport Common .................. SUCCESS [  0.111 s]
[INFO] Thingsboard HTTP Transport Common .................. SUCCESS [  0.072 s]
[INFO] Thingsboard CoAP server ............................ SUCCESS [  0.063 s]
[INFO] Thingsboard CoAP Transport Common .................. SUCCESS [  1.657 s]
[INFO] Thingsboard LwM2M Transport Common ................. SUCCESS [  0.136 s]
[INFO] Thingsboard SNMP Transport Common .................. SUCCESS [  0.061 s]
[INFO] Thingsboard Server Common DAO API .................. SUCCESS [  0.108 s]
[INFO] Thingsboard Server Remote Edge wrapper ............. SUCCESS [  4.878 s]
[INFO] Thingsboard Extensions ............................. SUCCESS [  0.001 s]
[INFO] Thingsboard Rule Engine API ........................ SUCCESS [  0.056 s]
[INFO] Thingsboard Server DAO Layer ....................... SUCCESS [  0.480 s]
[INFO] Thingsboard Rule Engine Components ................. SUCCESS [  0.379 s]
[INFO] Thingsboard Server Transport Modules ............... SUCCESS [  0.000 s]
[INFO] Thingsboard HTTP Transport Service ................. SUCCESS [ 32.171 s]
[INFO] Thingsboard MQTT Transport Service ................. SUCCESS [ 21.199 s]
[INFO] Thingsboard CoAP Transport Service ................. SUCCESS [ 19.161 s]
[INFO] Thingsboard LwM2m Transport Service ................ SUCCESS [ 18.941 s]
[INFO] Thingsboard SNMP Transport Service ................. SUCCESS [ 18.998 s]
[INFO] ThingsBoard Server UI .............................. SUCCESS [03:01 min]
[INFO] Thingsboard Server Tools ........................... SUCCESS [  0.045 s]
[INFO] Thingsboard Rest Client ............................ SUCCESS [  0.028 s]
[INFO] ThingsBoard Server Application ..................... SUCCESS [ 30.887 s]
[INFO] ThingsBoard Microservices .......................... SUCCESS [  0.003 s]
[INFO] ThingsBoard Docker Images .......................... SUCCESS [  2.141 s]
[INFO] ThingsBoard JavaScript Executor Microservice ....... FAILURE [ 25.137 s]
[INFO] ThingsBoard Web UI Microservice .................... SKIPPED
[INFO] ThingsBoard Node Microservice ...................... SKIPPED
[INFO] ThingsBoard Transport Microservices ................ SKIPPED
[INFO] ThingsBoard MQTT Transport Microservice ............ SKIPPED
[INFO] ThingsBoard HTTP Transport Microservice ............ SKIPPED
[INFO] ThingsBoard COAP Transport Microservice ............ SKIPPED
[INFO] ThingsBoard LWM2M Transport Microservice ........... SKIPPED
[INFO] ThingsBoard SNMP Transport Microservice ............ SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  06:27 min
[INFO] Finished at: 2021-11-16T08:34:25+08:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-assembly-plugin:3.0.0:single (assembly) on project js-executor: Failed to create assembly: Error adding file to archive: /home/devusr/tmp/github/thingsboard/thingsboard/msa/js-executor/target/package/windows/bin/tb-js-executor.exe -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
[ERROR]
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR]   mvn <args> -rf :js-executor

2.5.2 网络问题,继续编译

(cmd) ~/tmp/github/thingsboard/thingsboard (v3.3.2)$ mvn package -DskipTests

[INFO] --- maven-resources-plugin:2.7:copy-resources (copy-docker-config) @ snmp ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 2 resources
[INFO]
[INFO] --- maven-dependency-plugin:2.8:copy (copy-tb-snmp-transport-deb) @ snmp ---
[INFO] Configured Artifact: org.thingsboard.transport:snmp:deb:?:deb
[INFO] Copying snmp-3.3.2-deb.deb to /home/devusr/tmp/github/thingsboard/thingsboard/msa/transport/snmp/target/tb-snmp-transport.deb
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary for Thingsboard 3.3.2:
[INFO]
[INFO] Thingsboard ........................................ SUCCESS [  0.019 s]
[INFO] Netty MQTT Client .................................. SUCCESS [  0.924 s]
[INFO] Thingsboard Server Commons ......................... SUCCESS [  0.002 s]
[INFO] Thingsboard Server Common Data ..................... SUCCESS [  0.944 s]
[INFO] Thingsboard Server Common Utils .................... SUCCESS [  0.051 s]
[INFO] Thingsboard Server Common Messages ................. SUCCESS [  4.127 s]
[INFO] Thingsboard Actor system ........................... SUCCESS [  0.051 s]
[INFO] Thingsboard Server Stats ........................... SUCCESS [  0.051 s]
[INFO] Thingsboard Server Common Cluster API .............. SUCCESS [  9.692 s]
[INFO] Thingsboard Server Queue components ................ SUCCESS [  0.327 s]
[INFO] Thingsboard Server Common Cache .................... SUCCESS [  0.062 s]
[INFO] Thingsboard Server Commons ......................... SUCCESS [  0.002 s]
[INFO] Thingsboard Server Common Transport components ..... SUCCESS [  3.867 s]
[INFO] Thingsboard MQTT Transport Common .................. SUCCESS [  0.096 s]
[INFO] Thingsboard HTTP Transport Common .................. SUCCESS [  0.059 s]
[INFO] Thingsboard CoAP server ............................ SUCCESS [  0.054 s]
[INFO] Thingsboard CoAP Transport Common .................. SUCCESS [  1.672 s]
[INFO] Thingsboard LwM2M Transport Common ................. SUCCESS [  0.134 s]
[INFO] Thingsboard SNMP Transport Common .................. SUCCESS [  0.073 s]
[INFO] Thingsboard Server Common DAO API .................. SUCCESS [  0.074 s]
[INFO] Thingsboard Server Remote Edge wrapper ............. SUCCESS [  4.748 s]
[INFO] Thingsboard Extensions ............................. SUCCESS [  0.001 s]
[INFO] Thingsboard Rule Engine API ........................ SUCCESS [  0.053 s]
[INFO] Thingsboard Server DAO Layer ....................... SUCCESS [  0.590 s]
[INFO] Thingsboard Rule Engine Components ................. SUCCESS [  0.478 s]
[INFO] Thingsboard Server Transport Modules ............... SUCCESS [  0.001 s]
[INFO] Thingsboard HTTP Transport Service ................. SUCCESS [ 20.607 s]
[INFO] Thingsboard MQTT Transport Service ................. SUCCESS [ 19.928 s]
[INFO] Thingsboard CoAP Transport Service ................. SUCCESS [ 19.444 s]
[INFO] Thingsboard LwM2m Transport Service ................ SUCCESS [ 20.114 s]
[INFO] Thingsboard SNMP Transport Service ................. SUCCESS [ 18.301 s]
[INFO] ThingsBoard Server UI .............................. SUCCESS [03:20 min]
[INFO] Thingsboard Server Tools ........................... SUCCESS [  0.064 s]
[INFO] Thingsboard Rest Client ............................ SUCCESS [  0.033 s]
[INFO] ThingsBoard Server Application ..................... SUCCESS [ 30.763 s]
[INFO] ThingsBoard Microservices .......................... SUCCESS [  0.002 s]
[INFO] ThingsBoard Docker Images .......................... SUCCESS [  1.838 s]
[INFO] ThingsBoard JavaScript Executor Microservice ....... SUCCESS [ 58.682 s]
[INFO] ThingsBoard Web UI Microservice .................... SUCCESS [ 33.553 s]
[INFO] ThingsBoard Node Microservice ...................... SUCCESS [  0.151 s]
[INFO] ThingsBoard Transport Microservices ................ SUCCESS [  0.001 s]
[INFO] ThingsBoard MQTT Transport Microservice ............ SUCCESS [  0.099 s]
[INFO] ThingsBoard HTTP Transport Microservice ............ SUCCESS [  0.108 s]
[INFO] ThingsBoard COAP Transport Microservice ............ SUCCESS [  0.096 s]
[INFO] ThingsBoard LWM2M Transport Microservice ........... SUCCESS [  0.099 s]
[INFO] ThingsBoard SNMP Transport Microservice ............ SUCCESS [  0.092 s]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  07:34 min
[INFO] Finished at: 2021-11-16T09:47:55+08:00
[INFO] ------------------------------------------------------------------------
(cmd) ~/tmp/github/thingsboard/thing

2.5.3 编译成功!

2.6 编译输出文件

输出文件如下,可以进行docker镜像构建!

2.6.1 web-ui输出文件

(cmd) ~/tmp/github/thingsboard/thingsboard/msa (v3.3.2)$ ll web-ui/target/
total 82748
drwxrwxr-x 10 devusr devusr     4096 Nov 16 09:47 ./
drwxrwxr-x  6 devusr devusr     4096 Nov 16 09:53 ../
drwxrwxr-x  2 devusr devusr     4096 Nov 16 09:47 archive-tmp/
drwxrwxr-x  4 devusr devusr     4096 Nov 16 09:47 control/
drwxrwxr-x  2 devusr devusr     4096 Nov 16 09:47 debian/
drwxrwxr-x  2 devusr devusr     4096 Nov 16 09:47 dependency-maven-plugin-markers/
-rw-rw-r--  1 devusr devusr      969 Nov 16 09:47 Dockerfile
drwxrwxr-x  3 devusr devusr     4096 Nov 16 09:47 node/
drwxrwxr-x  4 devusr devusr     4096 Nov 16 09:47 package/
-rw-rw-r--  1 devusr devusr  5318488 Nov 16 09:47 protoc-3.17.2-linux-x86_64.exe
-rw-rw-r--  1 devusr devusr      895 Nov 16 09:47 start-web-ui.sh
-rw-rw-r--  1 devusr devusr      520 Nov 16 09:47 tb-web-ui.changes
-rw-rw-r--  1 devusr devusr 27225814 Nov 16 09:47 tb-web-ui.deb
-rw-rw-r--  1 devusr devusr 27246806 Nov 16 09:47 tb-web-ui.rpm
-rw-rw-r--  1 devusr devusr 24879119 Nov 16 09:47 tb-web-ui-windows.zip
drwxrwxr-x  4 devusr devusr     4096 Nov 16 09:47 tmp/
drwxrwxr-x  4 devusr devusr     4096 Nov 16 09:47 web/

2.6.2 js-executor输出文件

(cmd) ~/tmp/github/thingsboard/thingsboard/msa (v3.3.2)$ ll js-executor/target/
total 198400
drwxrwxr-x 8 devusr devusr      4096 Nov 16 09:47 ./
drwxrwxr-x 8 devusr devusr      4096 Nov 16 09:53 ../
drwxrwxr-x 2 devusr devusr      4096 Nov 15 22:11 archive-tmp/
drwxrwxr-x 4 devusr devusr      4096 Nov 15 22:11 control/
drwxrwxr-x 2 devusr devusr      4096 Nov 16 09:47 debian/
-rw-rw-r-- 1 devusr devusr      1014 Nov 16 09:47 Dockerfile
drwxrwxr-x 3 devusr devusr      4096 Nov 15 21:53 node/
drwxrwxr-x 4 devusr devusr      4096 Nov 15 22:11 package/
-rw-rw-r-- 1 devusr devusr   5318488 Nov 16 09:46 protoc-3.17.2-linux-x86_64.exe
-rw-rw-r-- 1 devusr devusr       938 Nov 16 09:47 start-js-executor.sh
-rw-rw-r-- 1 devusr devusr       560 Nov 16 09:47 tb-js-executor.changes
-rw-rw-r-- 1 devusr devusr  29679814 Nov 16 09:47 tb-js-executor.deb
-rw-rw-r-- 1 devusr devusr  29682689 Nov 16 09:47 tb-js-executor.rpm
-rw-rw-r-- 1 devusr devusr  27287099 Nov 16 09:47 tb-js-executor-windows.zip
-rwxrwxr-x 1 devusr devusr 111138030 Nov 16 08:34 thingsboard-js-executor*
drwxrwxr-x 4 devusr devusr      4096 Nov 15 22:11 tmp/
(cmd) ~/tmp/github/thingsboard/thingsboard/msa (v3.3.2)$

2.6.3 tb-node输出文件

(cmd) ~/tmp/github/thingsboard/thingsboard/msa (v3.3.2)$ ll tb-node/target/
total 171044
drwxrwxr-x 2 devusr devusr      4096 Nov 16 09:47 ./
drwxrwxr-x 4 devusr devusr      4096 Nov 16 09:56 ../
-rw-rw-r-- 1 devusr devusr      1123 Nov 16 09:47 Dockerfile
-rw-rw-r-- 1 devusr devusr   5318488 Nov 16 09:47 protoc-3.17.2-linux-x86_64.exe
-rw-rw-r-- 1 devusr devusr      2564 Nov 16 09:47 start-tb-node.sh
-rw-rw-r-- 1 devusr devusr 169804976 Nov 16 09:47 thingsboard.deb

2.6.4 transport输出文件

(cmd) ~/tmp/github/thingsboard/thingsboard/msa (v3.3.2)$ ll transport/
coap/    http/    lwm2m/   mqtt/    pom.xml  snmp/
(cmd) ~/tmp/github/thingsboard/thingsboard/msa (v3.3.2)$ ll transport/mqtt/target/
total 105764
drwxrwxr-x 2 devusr devusr      4096 Nov 16 09:47 ./
drwxrwxr-x 4 devusr devusr      4096 Nov 16 09:47 ../
-rw-rw-r-- 1 devusr devusr      1059 Nov 16 09:47 Dockerfile
-rw-rw-r-- 1 devusr devusr   5318488 Nov 16 09:47 protoc-3.17.2-linux-x86_64.exe
-rw-rw-r-- 1 devusr devusr      1219 Nov 16 09:47 start-tb-mqtt-transport.sh
-rw-rw-r-- 1 devusr devusr 102958690 Nov 16 09:47 tb-mqtt-transport.deb
(cmd) ~/tmp/github/thingsboard/thingsboard/msa (v3.3.2)$ ll transport/http/target/
total 101672
drwxrwxr-x 2 devusr devusr     4096 Nov 16 09:47 ./
drwxrwxr-x 4 devusr devusr     4096 Nov 16 09:47 ../
-rw-rw-r-- 1 devusr devusr     1059 Nov 16 09:47 Dockerfile
-rw-rw-r-- 1 devusr devusr  5318488 Nov 16 09:47 protoc-3.17.2-linux-x86_64.exe
-rw-rw-r-- 1 devusr devusr     1219 Nov 16 09:47 start-tb-http-transport.sh
-rw-rw-r-- 1 devusr devusr 98767994 Nov 16 09:47 tb-http-transport.deb
(cmd) ~/tmp/github/thingsboard/thingsboard/msa (v3.3.2)$ ll transport/coap/target/
total 101804
drwxrwxr-x 2 devusr devusr     4096 Nov 16 09:47 ./
drwxrwxr-x 4 devusr devusr     4096 Nov 16 09:47 ../
-rw-rw-r-- 1 devusr devusr     1059 Nov 16 09:47 Dockerfile
-rw-rw-r-- 1 devusr devusr  5318488 Nov 16 09:47 protoc-3.17.2-linux-x86_64.exe
-rw-rw-r-- 1 devusr devusr     1219 Nov 16 09:47 start-tb-coap-transport.sh
-rw-rw-r-- 1 devusr devusr 98902942 Nov 16 09:47 tb-coap-transport.deb
(cmd) ~/tmp/github/thingsboard/thingsboard/msa (v3.3.2)$ ll transport/lwm2m/target/
total 105464
drwxrwxr-x 2 devusr devusr      4096 Nov 16 09:47 ./
drwxrwxr-x 4 devusr devusr      4096 Nov 16 09:47 ../
-rw-rw-r-- 1 devusr devusr      1068 Nov 16 09:47 Dockerfile
-rw-rw-r-- 1 devusr devusr   5318488 Nov 16 09:47 protoc-3.17.2-linux-x86_64.exe
-rw-rw-r-- 1 devusr devusr      1226 Nov 16 09:47 start-tb-lwm2m-transport.sh
-rw-rw-r-- 1 devusr devusr 102650132 Nov 16 09:47 tb-lwm2m-transport.deb
(cmd) ~/tmp/github/thingsboard/thingsboard/msa (v3.3.2)$ ll transport/snmp/target/
total 102168
drwxrwxr-x 2 devusr devusr     4096 Nov 16 09:47 ./
drwxrwxr-x 4 devusr devusr     4096 Nov 16 09:47 ../
-rw-rw-r-- 1 devusr devusr     1059 Nov 16 09:47 Dockerfile
-rw-rw-r-- 1 devusr devusr  5318488 Nov 16 09:47 protoc-3.17.2-linux-x86_64.exe
-rw-rw-r-- 1 devusr devusr     1219 Nov 16 09:47 start-tb-snmp-transport.sh
-rw-rw-r-- 1 devusr devusr 99279864 Nov 16 09:47 tb-snmp-transport.deb
(cmd) ~/tmp/github/thingsboard/thingsboard/msa (v3.3.2)$

2.6.5 其他输出文件

(cmd) ~/tmp/github/thingsboard/thingsboard/msa (v3.3.2)$ ls -l black-box-tests/target/
total 20
-rw-rw-r-- 1 devusr devusr 2478 May  7  2021 black-box-tests-3.2.2.jar
drwxrwxr-x 3 devusr devusr 4096 May  7  2021 generated-test-sources
drwxrwxr-x 2 devusr devusr 4096 May  7  2021 maven-archiver
drwxrwxr-x 3 devusr devusr 4096 May  7  2021 maven-status
drwxrwxr-x 3 devusr devusr 4096 May  7  2021 test-classes
(cmd) ~/tmp/github/thingsboard/thingsboard/msa (v3.3.2)$ ls tb -R
tb:
docker  docker-cassandra  docker-postgres  docker-tb  pom.xml  README.md  targettb/docker:
install-tb.sh  logback.xml  start-tb.sh  thingsboard.conf  upgrade-tb.shtb/docker-cassandra:
Dockerfile  start-db.sh  stop-db.shtb/docker-postgres:
Dockerfile  start-db.sh  stop-db.shtb/docker-tb:
Dockerfile  start-db.sh  stop-db.shtb/target:
docker-cassandra  docker-postgres  docker-tb  protoc-3.17.2-linux-x86_64.exetb/target/docker-cassandra:
Dockerfile  install-tb.sh  logback.xml  start-db.sh  start-tb.sh  stop-db.sh  thingsboard.conf  thingsboard.deb  upgrade-tb.shtb/target/docker-postgres:
Dockerfile  install-tb.sh  logback.xml  start-db.sh  start-tb.sh  stop-db.sh  thingsboard.conf  thingsboard.deb  upgrade-tb.shtb/target/docker-tb:
Dockerfile  install-tb.sh  logback.xml  start-db.sh  start-tb.sh  stop-db.sh  thingsboard.conf  thingsboard.deb  upgrade-tb.sh
(cmd) ~/tmp/github/thingsboard/thingsboard/msa (v3.3.2)$

3 总结

3.1 jdk11版本,最好使用最新版本,太低了编译“Rest Client”时会报错!

注意要看官网上的文档
https://thingsboard.io/docs/user-guide/install/windows/
https://thingsboard.io/docs/user-guide/install/building-from-source/

jdk11下载网址:https://adoptium.net/releases.html?variant=openjdk11

OpenJDK11U-jdk_x64_linux_hotspot_11.0.13_8.tar.gz
https://github.com/adoptium/temurin11-binaries/releases/download/jdk-11.0.13%2B8/OpenJDK11U-jdk_x64_linux_hotspot_11.0.13_8.tar.gz

解压得jdk-11.0.13+8

设置环境变量:
# JDK11
export JAVA_HOME=/home/devusr/tools/jdk-11.0.13+8
export PATH=$JAVA_HOME/bin:$PATH

(cmd) ~/tmp/github/thingsboard/thingsboard (v3.3.2)$ java --version
openjdk 11.0.13 2021-10-19
OpenJDK Runtime Environment Temurin-11.0.13+8 (build 11.0.13+8)
OpenJDK 64-Bit Server VM Temurin-11.0.13+8 (build 11.0.13+8, mixed mode)

OpenJDK11U-jdk_x64_windows_hotspot_11.0.13_8.zip
https://github.com/adoptium/temurin11-binaries/releases/download/jdk-11.0.13%2B8/OpenJDK11U-jdk_x64_windows_hotspot_11.0.13_8.zip

3.2 NodeJS版本要根据TB的要求来:node(v12.16.1) yarn(v1.22.4)

官网下载地址:https://nodejs.org/dist/v12.16.1/

https://nodejs.org/dist/v12.16.1/node-v12.16.1-linux-x64.tar.gz
https://nodejs.org/dist/v12.16.1/node-v12.16.1-win-x64.zip

解压得node-v12.16.1-linux-x64

设置环境变量:
# NodeJS
export PATH=/home/devusr/tools/node-v12.16.1-linux-x64/bin:$PATH

(cmd) ~/tmp/github/thingsboard/thingsboard (v3.3.2)$ node --version
v12.16.1

卸载yarn:
$ npm uninstall -g yarn

安装指定版本的yarn:
(cmd) ~/tools$ npm install -g yarn@1.22.4
/home/devusr/tools/node-v12.16.1-linux-x64/bin/yarn -> /home/devusr/tools/node-v12.16.1-linux-x64/lib/node_modules/yarn/bin/yarn.js
/home/devusr/tools/node-v12.16.1-linux-x64/bin/yarnpkg -> /home/devusr/tools/node-v12.16.1-linux-x64/lib/node_modules/yarn/bin/yarn.js
+ yarn@1.22.4
added 1 package in 1.642s
(cmd) ~/tools$ yarn --version
1.22.4
(cmd) ~/tools$

设置仓库镜像:
yarn config set registry https://registry.npm.taobao.org
npm config set registry https://registry.npm.taobao.org

3.3 剩下的就是网络的问题了,一旦出错,继续执行

$ mvn package -DskipTests       <-- 注意:这时候就不要加clean,不然之前编译好了的又得重新编译,乱费时间。

编译ThingsBoard V3.3.2源码相关推荐

  1. ThingsBoard——v3.3.3源码编译

    要二次开发,肯定少不了编译源码.编译的难点就是坑多,因为我们的环境不可能跟源码作者的一样,当然你的跟我的也可能不一样.我的环境:系统:macOS10.15.5,CPU i7 1 准备工作 1.1 编译 ...

  2. ThingsBoard 3.3.1源码编译-windows版

    ThingsBoard 3.3.1源码编译-windows版 前期环境准备 环境版本尽量保持一致: 建议先把文章看完再操作,不要直接看一步操作一步! 编译过程要有耐心!不要看到执行到哪一步很久不动了, ...

  3. NanoPi NEO Air使用七:获取并编译U-boot和Linux的源码

    NanoPi NEO Air使用一:介绍 NanoPi NEO Air使用二:固件烧录 NanoPi NEO Air使用三:OverlayFS.CPU温度和频率.wifi.蓝牙.npi-config ...

  4. 智慧城市php源码,智慧城市本地O2O系统NIUCMS商业版V3.4完整源码

    NIUCMS V3.4 完整 最新牛NIUCMS 此次 NIUCMS V3.4 完整源码截图 NIUCMS V3.4 完整源码安装 本程序运行环境:apache下php5.3/5.4+Mysql(环境 ...

  5. android 3.10. 内核,编译android 3.10内核源码时出错

    最近我尝试为我的xiaomi mi4c交叉编译android内核. 要做到这一点,我已经下载并这样配置的工具链:从这里编译android 3.10内核源码时出错 git clone https://a ...

  6. Ubuntu16.04编译Android 6.0系统源码过程简要记录总结

    一,安装VMware Workstation,百度网盘下载(内含注册机) 链接: https://pan.baidu.com/s/1wz4hdNQBikTvyUMNokSVYg 提取码: yed7 V ...

  7. 关于编译WebRTC Linux/Android版源码的说明

     关于编译WebRTC Linux/Android版源码的说明 分享下,Linux/Android版本,默认必须在Ubuntu上编译,Debian和Ubuntu是同类型OS,应该也可以,不过我没试 ...

  8. 在Eclipse中导入编译MTK平台Android6.0源码的原生Gallery2应用

    源码下载地址 由于工作的需要,需要在Eclipse中调试MTK平台Android6.0的原生Gallery2应用, 网上已经有很多类似的技术文章了,步骤都差不多, 但是MTK在google原生的Gal ...

  9. windows本地编译调试hbase-3.0.0-alpha-2-SNAPSHOT源码

    windows本地编译调试hbase-3.0.0-alpha-2-SNAPSHOT源码 前言 代码下载,编译与调试 问题解决 前言 研究hbase的原因有两方面:一是自己是做大数据相关的开发工作,hb ...

最新文章

  1. 独家 | 5个机器学习开源项目来挑战你的数据科学技能!(附链接)
  2. Modelsim仿真流程
  3. tinypng upload一键压缩上传工具
  4. 联想成为中国女排主赞助商,却被自媒体攻击?网友:还好没赞助国足
  5. Python-----包和日志的使用
  6. win8 怎么桌面计算机图标不见了,win8系统桌面图标不见了怎么办?如何恢复
  7. mysql查询范围数据_MySQL通过POIN数据类型查询指定范围内数据
  8. 广科计算机专业学费,电子科技大学各专业收费明细表
  9. 太原今年实施一批大数据重大项目
  10. 进行的vistor实验
  11. 人才数据报告不会写?指标不明晰?这套人力资源方案帮你统统解决
  12. 烦烦烦,天天这样的日子
  13. 豆瓣读书top250爬取
  14. CMD以及运行命令整理
  15. ffmpeg基础四:RTP协议
  16. aria2c rpc php,让Aria2(aria2c)恢复通过RPC添加的文件的下载
  17. linux 串口 中断方式,设置在linux下串口中断(setting serial port interruption in
  18. 万豪因数据泄露被罚款1840万英镑
  19. 标志位的作用c语言,标志位作用及操作(转)
  20. 工具篇(一)Axmath的使用

热门文章

  1. LT8522EX 是 Lontium 的矩阵开关芯片基于两路输入,输出 (VGA 和 HDMI)
  2. maximo邮件配置
  3. MATLAB 复杂网络蓄意攻击代码
  4. ROS安装与机器人环境配置总结
  5. 360安全卫士造成Sharepoint文档库”使用资源管理器打开“异常
  6. 跨境知道快讯:Anker出新招,一个月进账600万美金
  7. 开源物联网监控告警平台JAVA开发
  8. 诈骗又出新套路,微信借钱语音确认仍被骗
  9. 计算机应用技术职业生涯规划书5000字,计算机应用职业生涯规划书5000字
  10. 企业六大要素指标采集—人财物