mavendependency-managementtycho

Dependency report for tycho based build


Maven dependency reports can easily be created like described in this question.

However, if I try to apply the solutions given there to a Tycho based build, I either get an empty report or even NullPointerExceptions during the build. Is there any way to create a (transitive) dependency report for Tycho based builds?


Solution

  • The goal dependency:tree of the maven-dependency-plugin should work for Tycho projects. IIRC, you need to call the plug-in together with at least the default lifecycle phase package, e.g. as mvn clean package dependency:tree.

    Then you'll get something like this:

    [INFO] --- maven-dependency-plugin:2.1:tree (default-cli) @ org.example.bundle ---
    [INFO] org.example.group:org.example.bundle:eclipse-plugin:1.0.0-SNAPSHOT
    [INFO] +- org.example.group:org.example.otherbundle:eclipse-plugin:1.0.0-SNAPSHOT:provided
    [INFO] +- p2.eclipse-plugin:org.eclipse.osgi:jar:3.8.0.v20120430-1750:system
    [INFO] +- p2.eclipse-plugin:org.eclipse.equinox.common:jar:3.6.100.v20120209-1951:system
    

    Artifacts from p2 repositories can be recognized by the system scope; artifacts from the reactor by the provided scope. Note that the list of dependencies includes all transitive dependencies, but these are shown as flat list.