org.apache.maven.plugin.dependency
Class AbstractResolveMojo

java.lang.Object
  extended by org.apache.maven.plugin.AbstractMojo
      extended by org.apache.maven.plugin.dependency.AbstractDependencyMojo
          extended by org.apache.maven.plugin.dependency.AbstractDependencyFilterMojo
              extended by org.apache.maven.plugin.dependency.AbstractResolveMojo
All Implemented Interfaces:
ContextEnabled, Mojo
Direct Known Subclasses:
GoOfflineMojo, ResolveDependenciesMojo, ResolveDependencySourcesMojo, ResolvePluginsMojo

public abstract class AbstractResolveMojo
extends AbstractDependencyFilterMojo

Version:
$Id: AbstractResolveMojo.java 1357251 2012-07-04 13:28:33Z olamy $
Author:
Brian Fox

Field Summary
protected  boolean appendOutput
          Whether to append outputs into the output file or overwrite it.
protected  MavenProjectBuilder mavenProjectBuilder
          Project builder -- builds a model from a pom.xml
protected  File outputFile
          If specified, this parameter will cause the dependencies to be written to the path specified, instead of writing to the console.
 
Fields inherited from class org.apache.maven.plugin.dependency.AbstractDependencyFilterMojo
classifier, excludeArtifactIds, excludeClassifiers, excludeGroupIds, excludeScope, excludeTransitive, excludeTypes, includeArtifactIds, includeClassifiers, includeGroupIds, includeScope, includeTypes, markersDirectory, overWriteIfNewer, overWriteReleases, overWriteSnapshots, prependGroupId, type
 
Fields inherited from class org.apache.maven.plugin.dependency.AbstractDependencyMojo
archiverManager, artifactCollector, artifactMetadataSource, factory, outputAbsoluteArtifactFilename, project, reactorProjects, remoteRepos, resolver, silent
 
Fields inherited from interface org.apache.maven.plugin.Mojo
ROLE
 
Constructor Summary
AbstractResolveMojo()
           
 
Method Summary
protected  Set<Artifact> resolveArtifactDependencies(Artifact artifact)
          This method resolves all transitive dependencies of an artifact.
protected  Set<Artifact> resolveDependencyArtifacts(MavenProject theProject)
           
 
Methods inherited from class org.apache.maven.plugin.dependency.AbstractDependencyFilterMojo
filterMarkedDependencies, getClassifierTranslatedDependencies, getDependencySets, getMarkedArtifactFilter, getMarkersDirectory, getResolvedDependencies, isPrependGroupId, setMarkersDirectory, setPrependGroupId
 
Methods inherited from class org.apache.maven.plugin.dependency.AbstractDependencyMojo
copyFile, getArchiverManager, getArtifactCollector, getArtifactMetadataSource, getFactory, getLocal, getLog, getProject, getRemoteRepos, getResolver, setArchiverManager, setArtifactCollector, setArtifactMetadataSource, setFactory, setLocal, setRemoteRepos, setResolver, unpack, unpack
 
Methods inherited from class org.apache.maven.plugin.AbstractMojo
getPluginContext, setLog, setPluginContext
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.apache.maven.plugin.Mojo
execute
 

Field Detail

mavenProjectBuilder

@Component
protected MavenProjectBuilder mavenProjectBuilder
Project builder -- builds a model from a pom.xml


outputFile

@Parameter(property="outputFile")
protected File outputFile
If specified, this parameter will cause the dependencies to be written to the path specified, instead of writing to the console.

Since:
2.0

appendOutput

@Parameter(property="appendOutput",
           defaultValue="false")
protected boolean appendOutput
Whether to append outputs into the output file or overwrite it.

Since:
2.2
Constructor Detail

AbstractResolveMojo

public AbstractResolveMojo()
Method Detail

resolveDependencyArtifacts

protected Set<Artifact> resolveDependencyArtifacts(MavenProject theProject)
                                            throws ArtifactResolutionException,
                                                   ArtifactNotFoundException,
                                                   InvalidDependencyVersionException
Throws:
ArtifactResolutionException
ArtifactNotFoundException
InvalidDependencyVersionException

resolveArtifactDependencies

protected Set<Artifact> resolveArtifactDependencies(Artifact artifact)
                                             throws ArtifactResolutionException,
                                                    ArtifactNotFoundException,
                                                    ProjectBuildingException,
                                                    InvalidDependencyVersionException
This method resolves all transitive dependencies of an artifact.

Parameters:
artifact - the artifact used to retrieve dependencies
Returns:
resolved set of dependencies
Throws:
ArtifactResolutionException
ArtifactNotFoundException
ProjectBuildingException
InvalidDependencyVersionException


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