【IoT】thingsboard3.3.3-后端痛苦编译

1、maven-compiler-plugin:3.8.1-- Fatal error compiling

 

 [ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.8.1:compile (default-compile) on project netty-mqtt: Fatal error compiling: 无效的标记: --release

 -> [Help 1]

 

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.8.1:compile (default-compile) on project data: Compilation failure -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.8.1:compile (default-compile) on project data: Co
mpilation failure
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:215)

 

Executing pre-compile tasks...
Loading Ant configuration...
Running Ant tasks...
Running 'before' tasks
Checking sources
Copying resources... [netty-mqtt]
Parsing java... [netty-mqtt]
java: 警告: 源发行版 11 需要目标发行版 11
java: Errors occurred while compiling module 'netty-mqtt'
Checking dependencies... [netty-mqtt]
Dependency analysis found 0 affected files
javac 11 was used to compile java sources
Finished, saving caches...
Compilation failed: errors: 1; warnings: 0
Executing post-compile tasks...
Loading Ant configuration...
Running Ant tasks...
Synchronizing output directories...
2022/2/27 4:34 - Build completed with 1 error and 0 warnings in 5 sec, 700 ms

 可能问题:

---JDK 需要11版本,见下图

---IDEA的环境配置,需要切换到11,清理其他JDK版本

---IDEA的MVN版本、Java编译版本

 

 

 

 

 

2、thingsboard3.3.3的环境

jdk11:jdk-11.0.14_windows-x64_bin.exe

mvn:apache-maven-3.6.3

idea:2020

 

 

 

3、settings.xml 打开注释、关闭注释,需要镜像下载资源

E:\1000_Java\apache-maven-3.6.3\conf\settings.xml

 

 

 

 

 

4、License 检查不通过

[ERROR] Failed to execute goal com.mycila:license-maven-plugin:3.0:check (default) on project thingsboard: Some files do not have the expected license header -> [Help 1]

https://www.iotschool.com/wiki/tbinstall:搜索 license-maven-plugin,将整个 plugin 都注释掉

 

5、编译命令

mvn clean install -DskipTests

如果使用的是 mvn clean install -DskipTests 命令进行编译,那么就多尝试几次,每次编译前,要清理环境。

 

 

6、gradle-maven-plugin和settings.xml的仓库配置有关,见1和csdn链接

thingsboard:gradle-maven-plugin:1.0.10:invoke (default) on project http: Execution default of goal

https://blog.csdn.net/NightHulk/article/details/107182412

 

 

Failed to execute goal org.thingsboard:gradle-maven-plugin:1.0.10:invoke (default) on project http: Execution default of goal org.thingsboard:gradle-maven-plugin:1.0.10:invoke failed: Plugin org.thingsboard:gradle-maven-plugin:1.0.10 or one of its dependencies could not be resolved: Could not find artifact org.gradle:gradle-tooling-api:jar:6.3 in nexus-aliyun (http://maven.aliyun.com/nexus/content/groups/public)
————————————————
版权声明:本文为CSDN博主「NightHulk」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。
原文链接:https://blog.csdn.net/NightHulk/article/details/107182412

 

 

 

7、问题切图

 

 

 

 

 

 

 

8、最终肝出来了

 

 

posted @ 2022-03-01 16:17  咸鱼翻身  阅读(2548)  评论(1编辑  收藏  举报