【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、最终肝出来了
博客版权: 本文以学习、研究和分享为主,欢迎转载和各类爬虫,但必须在文章页面明显位置给出原文链接。 如果文中有不妥或者错误的地方还望高手的您指出,以免误人子弟。如果您有更好的建议,不如留言一起讨论,共同进步! 再次感谢您耐心的读完本篇文章。
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· 物流快递公司核心技术能力-地址解析分单基础技术分享
· .NET 10首个预览版发布:重大改进与新特性概览!
· 单线程的Redis速度为什么快?
· 展开说说关于C#中ORM框架的用法!
· Pantheons:用 TypeScript 打造主流大模型对话的一站式集成库