在 Maven 依赖项中显示省略的版本:树? [英] Display omitted versions in maven dependency:tree?

查看:56
本文介绍了在 Maven 依赖项中显示省略的版本:树?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在 Eclipse 中,当我转到 Maven Dependency Hierarchy 页面时,我得到的输出说明了哪些冲突导致版本被省略:

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

但是,如果我使用 dependency:tree,那就是省略,我只看到实际使用的 evrsions:

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

有没有办法让dependency:tree输出冲突时省略的版本?

Is there any way to get dependency:tree to output the versions omitted for conflict?

谢谢!

推荐答案

是的,您可以通过设置 verbose 属性为 true:

Yes, you can have the omitted artifacts by setting the verbose attribute to true:

是否在序列化依赖树中包含省略的节点.

Whether to include omitted nodes in the serialized dependency tree.

此属性默认为 false.在命令行上,你会

This attribute defaults to false. On the command line, you would have

mvn dependency:tree -Dverbose=true

这篇关于在 Maven 依赖项中显示省略的版本:树?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆