用Leiningen显示完整的依赖树 [英] Display complete dependency tree with Leiningen
问题描述
我知道lein deps :tree
显示所有项目依赖项(隐式和显式)的依赖关系树.但是,每个依赖项仅在树中显示一次".我真的很想看看不是这种情况的树,并且如果库A
和B
需要库X
,则库X
会显示在A
和B
下.
I understand that lein deps :tree
displays a dependency tree of all the project dependencies (implicit and explicit). However, "each dependency is only shown once within a tree." I'd really like to see a tree where this wasn't the case, and that if libraries A
and B
require library X
, library X
shows up under both A
and B
.
有人知道如何使用lein
或其他工具来做到这一点吗?
Does anyone know how to do this with lein
or some other tool?
推荐答案
您可以从Leiningen的项目定义中生成Maven的POM,然后使用带有verbose
选项的Maven的dependency:tree
插件,如下所示:
You can generate Maven's POM out of Leiningen's project definition and then use Maven's dependency:tree
plugin with a verbose
option, like this:
$ lein pom
$ mvn dependency:tree -Dverbose=true
这将列出由于各种原因而被省略的依赖项,例如:
This will list dependencies omitted for various reasons, e.g.:
| +- ring:ring-core:jar:1.4.0:compile
| | +- (org.clojure:clojure:jar:1.5.1:compile - omitted for conflict with 1.7.0)
| | +- (org.clojure:tools.reader:jar:0.9.1:compile - omitted for conflict with 0.10.0-alpha3)
| | +- (ring:ring-codec:jar:1.0.0:compile - omitted for duplicate)
有关dependency:tree
的更多选项,请参见其文档.
For more options to dependency:tree
see its documentation.
这篇关于用Leiningen显示完整的依赖树的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!