开发者

How to find the artifacts that depend on another artifact?

开发者 https://www.devze.com 2023-02-04 05:47 出处:网络
We are using Maven to build our projects and Nexus as repository m开发者_如何学Canager. Is there a way to know where an artifact is a dependency of another artifact?

We are using Maven to build our projects and Nexus as repository m开发者_如何学Canager.

Is there a way to know where an artifact is a dependency of another artifact?

For example, we want to know which of the artifacts in our Release repository have a dependency on commons-io 1.2, or version x.y of our framework2, or ...


mvn dependency:tree should help you get this info.


Have you looked at the Maven Site plugin in conjunction with the dependencies and dependencies-convergence report from the Maven Project Info Reports plugin?

This will generate an html report that shows all the artifacts that the project uses and what other artifacts that are dependent on that artifact.


The Maven client will only tell you the dependencies of a single project. I'd recommend using Sonar as part of your build process. It's primarily used for source code analysis, but it will also report usage of a particular library by other projects in the same Sonar database.

0

精彩评论

暂无评论...
验证码 换一张
取 消