maven - 我如何解释依赖路径?

标签 maven jar dependency-management

我收到以下错误。 “依赖路径”指的是什么?为什么有 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/

相关文章:

java - Eclipse 中缺少类路径条目

java - 创建一个用于 Android 项目的 Java jar 库

java - 找不到具有 starter-security 依赖项的 springframework.security 包?

java - Gradle 能否以任何方式帮助解决 jar hell?

maven - 如何重命名最新快照版本以包含版本号

java - 排除 MANIFEST.MF 中的条目

java - CLASSPATH、Java 构建路径 (eclipse) 和 WEB-INF\LIB : what to use, 何时以及为什么?

maven - Teradata JDBC驱动程序的Maven依赖关系

java - Maven:仅复制构建 jar,而不构建 poms

Maven部署到相对目录路径