我收到以下错误。 “依赖路径”指的是什么?为什么有 3 个位置?
我几乎没有 Maven 经验。
Missing:
----------
1) com.sun.jmx:jmxri:jar:1.2.1
Try downloading the file manually from the project website.
Then, install it using the command:
mvn install:install-file -DgroupId=com.sun.jmx -DartifactId=jmxri -Dversion=1.2.1 -Dpackaging=jar -Dfile=/path/to/file
Alternatively, if you host your own repository you can deploy the file there:
mvn deploy:deploy-file -DgroupId=com.sun.jmx -DartifactId=jmxri -Dversion=1.2.1 -Dpackaging=jar -Dfile=/path/to/file -Durl=[url] -DrepositoryId=[id]
Path to dependency:
1) com.services:Common:jar:1.0.0.0
2) log4j:log4j:jar:1.2.15
3) com.sun.jmx:jmxri:jar:1.2.1
最佳答案
Common 需要 Log4J。 Log4J 需要 JMX。存在三个“位置”,因为这就是依赖路径的长度。依赖关系是路径(或多或少)“是什么让我想要这个库?”
(但事实并非如此;升级或降级您的 Log4J 依赖项 - IIRC 这已在 1.2.16 中修复,并且在 1.2.mumble 之前不存在。)
关于maven - 我如何解释依赖路径?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10404226/