org.fusesource.mvnplugins.graph
Class ProjectMojo

java.lang.Object
  extended by org.apache.maven.plugin.AbstractMojo
      extended by org.fusesource.mvnplugins.graph.ProjectMojo
All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled, org.apache.maven.plugin.Mojo
Direct Known Subclasses:
ProjectReportMojo, ReactorMojo

public class ProjectMojo
extends org.apache.maven.plugin.AbstractMojo

Generates a graph image of the dependencies of the project using the graphviz tool 'dot'. You must have the 'dot' executable installed and in your path before using this goal.

Author:
Hiram Chirino

Field Summary
protected  org.apache.maven.artifact.resolver.ArtifactCollector artifactCollector
           
protected  org.apache.maven.artifact.factory.ArtifactFactory artifactFactory
           
protected  org.apache.maven.artifact.metadata.ArtifactMetadataSource artifactMetadataSource
           
protected  org.apache.maven.artifact.resolver.ArtifactResolver artifactResolver
           
protected  boolean cascade
          If true then the 'test scope' and 'optional' attributes are cascaded down to the dependencies of the original node.
protected  String direction
          The direction that the graph will be laid out in.
protected  boolean hideExternal
          If set to true if dependencies external to the reactor project should be hidden.
protected  boolean hideGroupId
          If set to true then the group id label will not be drawn.
protected  boolean hideOmitted
          If set to true, omitted dependencies will not be drawn.
protected  boolean hideOptional
          If set to true optional dependencies are not drawn.
protected  boolean hidePoms
          If set to true pom dependencies are not drawn.
protected  String hideScopes
          A comma separated list of scopes.
protected  boolean hideTransitive
          If set to true then dependencies not explicitly defined in the projects pom will not be drawn.
protected  boolean hideType
          If set to true then the module type label will not be drawn.
protected  boolean hideVersion
          If set to true then the version label will not be drawn.
protected  boolean keepDot
          If set to true then the intermediate dot file will not be deleted.
protected  String label
          The label for the graph.
protected  org.apache.maven.artifact.repository.ArtifactRepository localRepository
           
protected  org.apache.maven.project.MavenProject project
           
protected  File target
          The file the diagram will be written to.
protected  org.apache.maven.shared.dependency.tree.DependencyTreeBuilder treeBuilder
           
 
Fields inherited from interface org.apache.maven.plugin.Mojo
ROLE
 
Constructor Summary
ProjectMojo()
           
 
Method Summary
protected  void collectProjects(ArrayList<org.apache.maven.project.MavenProject> projects)
           
 void execute()
           
 File getTarget()
           
 
Methods inherited from class org.apache.maven.plugin.AbstractMojo
getLog, getPluginContext, setLog, setPluginContext
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

project

protected org.apache.maven.project.MavenProject project
Since:
1.0

localRepository

protected org.apache.maven.artifact.repository.ArtifactRepository localRepository
Since:
1.0

artifactResolver

protected org.apache.maven.artifact.resolver.ArtifactResolver artifactResolver
Since:
1.0

artifactFactory

protected org.apache.maven.artifact.factory.ArtifactFactory artifactFactory
Since:
1.0

artifactMetadataSource

protected org.apache.maven.artifact.metadata.ArtifactMetadataSource artifactMetadataSource
Since:
1.0

artifactCollector

protected org.apache.maven.artifact.resolver.ArtifactCollector artifactCollector

treeBuilder

protected org.apache.maven.shared.dependency.tree.DependencyTreeBuilder treeBuilder
Since:
1.0

target

protected File target
The file the diagram will be written to. Must use a file extension that the dot command supports or just the '.dot' extension.


hideOmitted

protected boolean hideOmitted
If set to true, omitted dependencies will not be drawn. Dependencies are marked as omitted if it would result in a resolution conflict.


hideOptional

protected boolean hideOptional
If set to true optional dependencies are not drawn.


hideExternal

protected boolean hideExternal
If set to true if dependencies external to the reactor project should be hidden.


hidePoms

protected boolean hidePoms
If set to true pom dependencies are not drawn.


hideScopes

protected String hideScopes
A comma separated list of scopes. Dependencies which match the specified scopes will not be drawn.
For example: runtime,test


hideTransitive

protected boolean hideTransitive
If set to true then dependencies not explicitly defined in the projects pom will not be drawn.


hideVersion

protected boolean hideVersion
If set to true then the version label will not be drawn.


hideGroupId

protected boolean hideGroupId
If set to true then the group id label will not be drawn.


hideType

protected boolean hideType
If set to true then the module type label will not be drawn.


keepDot

protected boolean keepDot
If set to true then the intermediate dot file will not be deleted.


label

protected String label
The label for the graph.


cascade

protected boolean cascade
If true then the 'test scope' and 'optional' attributes are cascaded down to the dependencies of the original node.


direction

protected String direction
The direction that the graph will be laid out in. it can be one of the following values:
TB LR BT RL
top to bottom, from left to right, from bottom to top, and from right to left, respectively

Constructor Detail

ProjectMojo

public ProjectMojo()
Method Detail

execute

public void execute()
             throws org.apache.maven.plugin.MojoExecutionException
Throws:
org.apache.maven.plugin.MojoExecutionException

collectProjects

protected void collectProjects(ArrayList<org.apache.maven.project.MavenProject> projects)

getTarget

public File getTarget()


Copyright © 2009-2011 FuseSource. All Rights Reserved.