org.apache.maven.plugin.dependency.resolvers
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.fromDependencies.AbstractDependencyFilterMojo
              extended by org.apache.maven.plugin.dependency.resolvers.AbstractResolveMojo
All Implemented Interfaces:
ContextEnabled, Mojo
Direct Known Subclasses:
GoOfflineMojo, ResolveDependenciesMojo, ResolvePluginsMojo

public abstract class AbstractResolveMojo
extends AbstractDependencyFilterMojo

Version:
$Id: AbstractResolveMojo.html 862013 2013-05-14 22:24:45Z hboutemy $
Author:
Brian Fox

Field Summary
protected  boolean appendOutput
          Whether to append outputs into the output file or overwrite it.
protected  boolean excludeReactor
          Don't resolve plugins that are in the current reactor.
protected  boolean ignorePermissions
          not used in this goal
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.
protected  boolean useJvmChmod
          not used in this goal
 
Fields inherited from class org.apache.maven.plugin.dependency.fromDependencies.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  FilterArtifacts getPluginArtifactsFilter()
           
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.fromDependencies.AbstractDependencyFilterMojo
filterMarkedDependencies, getClassifierTranslatedDependencies, getDependencySets, getDependencySets, getMarkedArtifactFilter, getMarkersDirectory, getResolvedDependencies, isPrependGroupId, setMarkersDirectory, setPrependGroupId
 
Methods inherited from class org.apache.maven.plugin.dependency.AbstractDependencyMojo
copyFile, doExecute, execute, getArchiverManager, getArtifactCollector, getArtifactMetadataSource, getFactory, getLocal, getLog, getProject, getRemoteRepos, getResolver, isSkip, isUseJvmChmod, setArchiverManager, setArtifactCollector, setArtifactMetadataSource, setFactory, setLocal, setRemoteRepos, setResolver, setSkip, setUseJvmChmod, 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
 

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

excludeReactor

@Parameter(property="excludeReactor",
           defaultValue="true")
protected boolean excludeReactor
Don't resolve plugins that are in the current reactor. Only works for plugins at the moment.

Since:
2.7

useJvmChmod

@Parameter
protected boolean useJvmChmod
not used in this goal


ignorePermissions

@Parameter
protected boolean ignorePermissions
not used in this goal

Constructor Detail

AbstractResolveMojo

public AbstractResolveMojo()
Method Detail

getPluginArtifactsFilter

protected FilterArtifacts getPluginArtifactsFilter()

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-2013 The Apache Software Foundation. All Rights Reserved.