...
We have a listener on the artifact resolver that can be used to track how the dependencies are resolved, which versions are used, and which are eliminated. Currently, only a simple textual representation is available at runtime. We want to be able to do some reporting based on this.
There will be several usage patterns for the resulting graphs.
- Identifying dependency exclusions.
Is it excluded, and where did exclusion originate. - Identifying dependency version decisions.
If maven picks another version, which one, and why? - Identifying dependency owner.
If dependency is present in project, how did it get there?
By current project, by transitive dependency, or by parent pom concepts? - Identifying transitive dependency complexity.
Multi module project is getting out of hand, what dependencies can i collapse safely into one dep? - Identify relocated dependencies.
If a dependency was relocated, identify it. - Identify missing or bad dependencies.
If dependency is not found, flag it.
How should we show the graph?
- With nodes representing a unique groupId:artifactId and the edges representing the scope/version ?
- With nodes representing a fully unique groupId:artifactId:version and the edges representing the scope?
What should be included?
- Just the active dependencies?
- The excluded dependencies, but flagged to indicate that they are excluded.
- Optional dependencies.
- All scopes? (indicate scope somehow. by color?)
Other Resources
Create A Graphviz plugin? (joakime volunteers for this)
Graphviz ( http://www.graphviz.org/ ) is an excellent package for creating graphs and graph images, but it is a native application. If this route is chosen, how do we handle graphviz? As a dependency, or as a configuration parameter to the pre-installed binary?
From Wim:
They show how to convert an xml tree structure to a SVG image.
From Joakim:
Ambitusgraph: https://svn.sventech.com/repos/joakim/projects/trunk/ambitusgraph/
Currently an interactive dependency viewer experiment.
Example of current functionality.