MAVEN PLUGIN(S) SERIES - Generate a Visual Dependency Tree
Maven Dependency Plugin
org.apache.maven.plugins:maven-dependency-plugin:2.8:tree
The Maven dependency:tree goal produces a helpful report of all jars coming from in our projects. The default output is text but, sometimes, we would want something more visual. Here is what we have to doGenerate graphml output
Since the version 2.1 the Dependency plugin supports different output formats, one of them the GraphML, which is an XML-based file format for graphs.
To achieve this is very simple it is enough .. cd in your project and run:
To achieve this is very simple it is enough .. cd in your project and run:
> mvn dependency:tree -DoutputType=graphml -DoutputFile=dependency.graphml
yEd a GraphML tool
To visualize your dependency tree using yEd, follow the steps outlined below
- Open yEd (It's also possible launch it using java web start)
- Select: Open Document > dependency.graphml > OK.
- Select: Layout > Hierarchical > Orientation > Left to Right > OK (this should adjust layout)
- Select :Tools > Fit Note to Label … > OK. (This should adjust the labels)
Comments
Post a Comment