依赖:resolve和:tree解决不同的依赖关系?

时间:2014-04-17 06:42:45

标签: maven maven-dependency-plugin

当我运行依赖:我的pom.xml上的树时,我得到以下输出:

...
[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上解析我得到:

...
[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?

之间有所不同

1 个答案:

答案 0 :(得分:0)

这似乎是Maven 3.0.4中的一个错误。我更新到版本3.2.1,现在依赖:tree和:resolve正在解析相同的依赖项。