Maven 依赖项:解析和:树解析不同的依赖项?
在pom.xml上运行dependency:tree时,我得到以下输出:Maven 依赖项:解析和:树解析不同的依赖项?,maven,maven-dependency-plugin,Maven,Maven Dependency Plugin,在pom.xml上运行dependency:tree时,我得到以下输出: ... [INFO] --- maven-dependency-plugin:2.1:tree (default-cli) @ com.test.client --- [INFO] assemblies:com.test.client:jar:1.0.0-SNAPSHOT [INFO] +- foundation:com.test.core:jar:1.0.0:compile [INFO] | \- junit:juni
...
[INFO] --- maven-dependency-plugin:2.1:tree (default-cli) @ com.test.client ---
[INFO] assemblies:com.test.client:jar:1.0.0-SNAPSHOT
[INFO] +- foundation:com.test.core:jar:1.0.0:compile
[INFO] | \- junit:junit:jar:4.11:compile
[INFO] | \- org.hamcrest:hamcrest-core:jar:1.3:compile
[INFO] \- assemblies:com.test.security:jar:1.0.0-SNAPSHOT:compile
...
在我得到的相同pom上运行dependency:resolve时:
...
[INFO] The following files have been resolved:
[INFO] assemblies:com.test.security:jar:1.0.0-SNAPSHOT:compile
[INFO] foundation:com.test.core:jar:1.0.1-SNAPSHOT:compile
[INFO] junit:junit:jar:4.11:compile
[INFO] org.hamcrest:hamcrest-core:jar:1.3:compile
...
为什么
com.test.core
的版本不同于:resolve和:tree?这似乎是Maven 3.0.4中的一个bug。我更新到3.2.1版,现在dependency:tree和:resolve正在解析相同的依赖项