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

相关推荐
南宫生44 分钟前
力扣每日一题【算法学习day.132】
java·学习·算法·leetcode
计算机毕设定制辅导-无忧学长1 小时前
Maven 基础环境搭建与配置(一)
java·maven
风与沙的较量丶2 小时前
Java中的局部变量和成员变量在内存中的位置
java·开发语言
m0_748251722 小时前
SpringBoot3 升级介绍
java
极客先躯3 小时前
说说高级java每日一道面试题-2025年2月13日-数据库篇-请说说 MySQL 数据库的锁 ?
java·数据库·mysql·数据库的锁·模式分·粒度分·属性分
程序员侠客行3 小时前
Spring事务原理 二
java·后端·spring
小猫猫猫◍˃ᵕ˂◍4 小时前
备忘录模式:快速恢复原始数据
android·java·备忘录模式
liuyuzhongcc4 小时前
List 接口中的 sort 和 forEach 方法
java·数据结构·python·list
五月茶4 小时前
Spring MVC
java·spring·mvc
sjsjsbbsbsn4 小时前
Spring Boot定时任务原理
java·spring boot·后端