Jens Schauder
Jens Schauder

Reputation: 81862

How to find out from which pom.xml a dependency is coming

With complex builds, it can be hard to find out in which pom.xml a dependency is actually specified.

Is there a plugin or a parameter that helps to find the pom.xml that is specifying a dependency? Ideally, it would help normal dependencies as well as with plugin dependencies.

All the searches only point to the dependency plugins and ways to find which jar actually gets picked. The other alternative would be to just grep all the poms which can be difficult when they are not in a single directory tree.

dependency:tree does not work (I think). If A specifies B as the parent, and B specifies a dependency to C, in dependency:tree the dependency will seem to come from A, but I want to find B.

Upvotes: 1

Views: 814

Answers (1)

anders
anders

Reputation: 824

You can use the following command

mvn dependency:tree

Upvotes: 1

Related Questions