2014-04-17 322 views
0

當我運行的依賴性:在我的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?

回答

0

這似乎是Maven 3.0.4中的一個錯誤。我更新到3.2.1版,現在依賴關係:樹和:解決方案解決了相同的依賴關係。