Display omitted versions in maven dependency:tree?

扶醉桌前 提交于 2019-11-26 16:53:58

问题


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!


回答1:


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!