English 中文(简体)
如何查看Maven pom.xml文件的可传递依赖项?
原标题:How can I view transitive dependencies of a Maven pom.xml file?

有没有一个CLI工具可以用来快速查看Maven<code>pom.xml</code>文件的可传递依赖项?

最佳回答

On the CLI, use mvn dependency:tree
(Here are some additional Usage notes)

在多模块maven项目上运行dependency:tree时,请使用mvn-compile dependency:tree1

否则,M2Eclipse(Eclipse的Maven集成)非常好,它包括一个层次依赖关系视图。


1如果你不编译,你可能会收到错误无法在基于项目的项目上执行目标:无法解析项目com的依赖关系。公司:子项目:jar:1.0.0:无法找到工件。发生这种情况的原因可能是dependency:tree命令不生成项目,也不解析依赖项,而且您的项目没有安装在maven存储库中

问题回答

暂无回答




相关问题
Derby gets stuck closing?

I ve got unit tests (in maven) that use derby. At the end of the test run, there is a very long pause, with these log messages before the pause. INFO: Closing Hibernate SessionFactory Nov 16, 2009 8:...

Execute goal on parent after children complete

I have a multi-module maven project (several levels of nesting). Normally, when I execute a maven build (like mvn install or whatever), maven will run all the goals for the parent project before ...

Including dependencies in a jar with Maven

Is there a way to force maven(2.0.9) to include all the dependencies in a single jar file? I have a project the builds into a single jar file. I want the classes from dependencies to be copied into ...

Java Equivalent of distcc

Distcc makes it easy to distribute a C or C++ compile job across a number of machines, and is a godsend for working with large, frequently-built codebases. An increasing number of our large projects ...

Maven Assembly Problem

I have a maven multiple-module project, which is giving me headaches in the assembly:assembly phase. I have a module which has an assembly defined in it which works fine when I invoke mvn assembly:...

热门标签