Search code examples
javaeclipsemavenpom.xmlmaven-dependency-plugin

Display omitted versions in maven dependency:tree?


In Eclipse, when I go to the Maven Dependency Hierarchy page, I get output that states what conflicts caused versions to be omitted:

eclipse maven version

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!


Solution

  • 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