org.apache.maven.plugin.dependency.tree
Class TreeMojo

java.lang.Object
  extended by org.apache.maven.plugin.AbstractMojo
      extended by org.apache.maven.plugin.dependency.tree.TreeMojo
All Implemented Interfaces:
ContextEnabled, Mojo

@Mojo(name="tree",
      requiresDependencyResolution=TEST,
      threadSafe=true)
public class TreeMojo
extends AbstractMojo

Displays the dependency tree for this project.

Since:
2.0-alpha-5
Version:
$Id: TreeMojo.html 861760 2013-05-12 17:31:26Z hboutemy $
Author:
Mark Hobson

Field Summary
 
Fields inherited from interface org.apache.maven.plugin.Mojo
ROLE
 
Constructor Summary
TreeMojo()
           
 
Method Summary
static boolean containsVersion(VersionRange allowedRange, ArtifactVersion theVersion)
          Copied from Artifact.VersionRange.
 void execute()
           
 DependencyNode getDependencyGraph()
          Gets the computed dependency graph root node for the Maven project.
 MavenProject getProject()
          Gets the Maven project used by this mojo.
 DependencyNodeVisitor getSerializingDependencyNodeVisitor(Writer writer)
           
 boolean isSkip()
           
 void setSkip(boolean skip)
           
 
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
 

Constructor Detail

TreeMojo

public TreeMojo()
Method Detail

execute

public void execute()
             throws MojoExecutionException,
                    MojoFailureException
Throws:
MojoExecutionException
MojoFailureException

getProject

public MavenProject getProject()
Gets the Maven project used by this mojo.

Returns:
the Maven project

getDependencyGraph

public DependencyNode getDependencyGraph()
Gets the computed dependency graph root node for the Maven project.

Returns:
the dependency tree root node

isSkip

public boolean isSkip()

setSkip

public void setSkip(boolean skip)

getSerializingDependencyNodeVisitor

public DependencyNodeVisitor getSerializingDependencyNodeVisitor(Writer writer)

containsVersion

public static boolean containsVersion(VersionRange allowedRange,
                                      ArtifactVersion theVersion)
Copied from Artifact.VersionRange. This is tweaked to handle singular ranges properly. Currently the default containsVersion method assumes a singular version means allow everything. This method assumes that "2.0.4" == "[2.0.4,)"

Parameters:
allowedRange - range of allowed versions.
theVersion - the version to be checked.
Returns:
true if the version is contained by the range.


Copyright © 2002-2013 The Apache Software Foundation. All Rights Reserved.