【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、最終肝出來了

 

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM