有没有一个 CLI 工具可以用来快速查看 Maven 的传递依赖关系pom.xml
file?
在 CLI 上,使用mvn dependency:tree http://maven.apache.org/plugins/maven-dependency-plugin/tree-mojo.html
(这里有一些额外的使用说明 http://maven.apache.org/plugins/maven-dependency-plugin/usage.html#The_dependency:tree_Mojo)
When running dependency:tree
on multi-module maven project, use mvn compile dependency:tree
instead1.
否则,POM 编辑器中M2Eclipse http://m2eclipse.sonatype.org/(Eclipse 的 Maven 集成)非常好,并且它包含分层依赖关系视图。
1If you don't compile, you might get error Failed to execute goal on project baseproject: Could not resolve dependencies for project com.company:childproject:jar:1.0.0: Could not find artifact
. This might happen because dependency:tree
command doesn't build projects and doesn't resolve dependencies, and your projects are not installed in maven repository.
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)