Mac编译dubbo失败找不到tools:jar

[INFO] ------------------------------------------------------------------------

[INFO] Reactor Summary for dubbo-admin 0.6.0:

[INFO]

[INFO] dubbo-admin ........................................ SUCCESS [ 2.576 s]

[INFO] dubbo-admin-ui ..................................... SUCCESS [01:18 min]

[INFO] dubbo-admin-server ................................. FAILURE [ 0.617 s]

[INFO] dubbo-admin-distribution ........................... SKIPPED

[INFO] dubbo-admin-test ................................... SKIPPED

[INFO] ------------------------------------------------------------------------

[INFO] BUILD FAILURE

[INFO] ------------------------------------------------------------------------

[INFO] Total time: 01:21 min

[INFO] Finished at: 2023-12-02T20:57:35+08:00

[INFO] ------------------------------------------------------------------------

[ERROR] Failed to execute goal on project dubbo-admin-server: Could not resolve dependencies for project org.apache.dubbo:dubbo-admin-server:jar:0.6.0: Could not find artifact com.sun:tools:jar:1.8.0 at specified path /Library/Internet Plug-Ins/JavaAppletPlugin.plugin/Contents/Home/../lib/tools.jar -> [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/DependencyResolutionException

[ERROR]

[ERROR] After correcting the problems, you can resume the build with the command

[ERROR] mvn <goals> -rf :dubbo-admin-server

解决方案:

1、安装 JDK 1.8

2、vim ~/.bash_profile

export JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk-1.8.jdk/Contents/Home

3、source ~/.bash_profile

4、mvn --projects dubbo-admin-server spring-boot:run or

cd dubbo-admin-distribution/target; java -jar dubbo-admin-${project.version}.jar

5、访问http://localhost:38080

相关推荐
y5236482 分钟前
解决OpenJDK用maven构建项目,出现的SSL以及SpringBoot端口一直被占用问题
java·maven·ssl
桃花加酥20 分钟前
js笔记(二进制由0和1两个数字组成)
java·javascript
拾光师20 分钟前
POI操作EXCEL插入图片
java
Leighteen27 分钟前
Java8四大函数接口
java·开发语言
会洗碗的CV工程师31 分钟前
828华为云征文 | 使用Flexus X实例搭建Dubbo-Admin服务
java·linux·服务器·华为云·dubbo
cc77521033 分钟前
Tomcat后台弱口令部署war包
java·tomcat
聂 可 以34 分钟前
解决IDEA每次创建新项目时都要指定Maven仓库和Maven配置文件的问题
java·intellij-idea
BYSJMG1 小时前
计算机毕业设计推荐-基于python的白酒销售数据可视化分析
java·开发语言·数据库·python·信息可视化·毕业设计·课程设计
程序员阿鹏1 小时前
Map和Set有什么区别?
java·开发语言·数据结构·eclipse·intellij-idea
守护者1701 小时前
JAVA学习-练习试用Java实现“给表达式添加运算符”
java·学习