In Eclipse, when I go to the Maven Dependency Hierarchy page, I get output that states what conflicts caused versions to be omitted:
However, if I use dependency:tree, that's omitted and I only see the evrsions which are actually used:
| +- commons-httpclient:commons-httpclient:jar:3.1:compile
| +- commons-codec:commons-codec:jar:1.4:compile
| +- commons-io:commons-io:jar:2.4:compile
| +- commons-net:commons-net:jar:3.1:compile
| +- javax.servlet:servlet-api:jar:2.5:compile
And later on the actually referenced versions...
+- commons-collections:commons-collections:jar:3.1:compile
Is there any way to get dependency:tree to output the versions omitted for conflict?
Thanks!
Yes, you can have the omitted artifacts by setting the verbose
attribute to true
:
Whether to include omitted nodes in the serialized dependency tree.
This attribute defaults to false
. On the command line, you would have
mvn dependency:tree -Dverbose=true
来源:https://stackoverflow.com/questions/35588952/display-omitted-versions-in-maven-dependencytree