org.apache.maven.plugin.dependency
Class TreeMojo
java.lang.Object
org.apache.maven.plugin.AbstractMojo
org.apache.maven.plugin.dependency.TreeMojo
- All Implemented Interfaces:
- org.apache.maven.plugin.ContextEnabled, org.apache.maven.plugin.Mojo
@Mojo(name="tree",
requiresDependencyResolution=TEST)
public class TreeMojo- extends org.apache.maven.plugin.AbstractMojo
Displays the dependency tree for this project.
- Since:
- 2.0-alpha-5
- Version:
- $Id: TreeMojo.java 1365269 2012-07-24 20:24:01Z hboutemy $
- Author:
- Mark Hobson
| Fields inherited from interface org.apache.maven.plugin.Mojo |
ROLE |
|
Method Summary |
static boolean |
containsVersion(org.apache.maven.artifact.versioning.VersionRange allowedRange,
org.apache.maven.artifact.versioning.ArtifactVersion theVersion)
Copied from Artifact.VersionRange. |
void |
execute()
|
org.apache.maven.shared.dependency.graph.DependencyNode |
getDependencyGraph()
Gets the computed dependency graph root node for the Maven project. |
org.apache.maven.project.MavenProject |
getProject()
Gets the Maven project used by this mojo. |
org.apache.maven.shared.dependency.graph.traversal.DependencyNodeVisitor |
getSerializingDependencyNodeVisitor(Writer writer)
|
| 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 |
TreeMojo
public TreeMojo()
execute
public void execute()
throws org.apache.maven.plugin.MojoExecutionException,
org.apache.maven.plugin.MojoFailureException
- Throws:
org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoFailureException
getProject
public org.apache.maven.project.MavenProject getProject()
- Gets the Maven project used by this mojo.
- Returns:
- the Maven project
getDependencyGraph
public org.apache.maven.shared.dependency.graph.DependencyNode getDependencyGraph()
- Gets the computed dependency graph root node for the Maven project.
- Returns:
- the dependency tree root node
getSerializingDependencyNodeVisitor
public org.apache.maven.shared.dependency.graph.traversal.DependencyNodeVisitor getSerializingDependencyNodeVisitor(Writer writer)
containsVersion
public static boolean containsVersion(org.apache.maven.artifact.versioning.VersionRange allowedRange,
org.apache.maven.artifact.versioning.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-2012 The Apache Software Foundation. All Rights Reserved.