David Karr <davidmichaelk...@gmail.com> wrote:

> I've been struggling with trying to do this, along with trying to
> understand the output of "mvn dependency:tree" and the apparently
> functionally similar output in the "Dependency Hierarchy" view in Eclipse
> using the m2e plugin.  Although I can loosely see the hierarchical output
> from these, I find determining the actual details of where dependencies are
> coming from is very mystifying.

I recommend using the effective-pom goal of the maven-help-plugin [0] to get 
information about the effective POM that Maven ‘sees’, and if you enable 
verbose output there will be comments telling you where everything came from:

    mvn help:effective-pom -Dverbose=true

I don’t use Eclipse, but in IntelliJ IDEA there are icons in the gutter of the 
editor that jump to the place where a versionless dependency‘s version is 
declared, which can be helpful too. I don’t know if there is a similar feature 
in Eclipse. (The Maven Helper plugin [1] for IntelliJ IDEA is also nice as an 
interactive and easier to read alternative to dependency:tree, including a 
filtering option.)

Nils.

[0] https://maven.apache.org/plugins/maven-help-plugin/effective-pom-mojo.html
[1] https://plugins.jetbrains.com/plugin/7179-maven-helper

Reply via email to