Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there a Maven equivalent of "gradle dependencyInsight"?

Tags:

maven

gradle

In gradle, the command gradle dependencyInsight --dependency <artifact-name> prints a reverse dependency graph for a specific artifact.

Is there something equivalent in Maven?

I'm aware of mvn dependency:tree. This is the equivalent of gradle dependencies. However this is not what I'm asking about.

like image 993
Doron Gold Avatar asked Nov 26 '25 06:11

Doron Gold


1 Answers

One way is to use filtering with maven dependency plugin

mvn dependency:tree -Dincludes=[groupId]:[artifactId]:[type]:[version]

Check the link, there is an example. The output isn't actually in reverse but it shouldn't be too hard to read it in reverse by yourself.

Eclipse-IDE has some nice features which allows dependencies to tracked without using command line. Open pom.xml, open dependency hierarchy tab and there, dependencies can be filtered. Other IDEs might have similar features as well.

like image 162
Teemu Avatar answered Nov 29 '25 00:11

Teemu