Class GoOfflineMojo
java.lang.Object
org.apache.maven.plugin.AbstractMojo
org.apache.maven.plugins.dependency.AbstractDependencyMojo
org.apache.maven.plugins.dependency.fromDependencies.AbstractDependencyFilterMojo
org.apache.maven.plugins.dependency.resolvers.GoOfflineMojo
- All Implemented Interfaces:
- org.apache.maven.plugin.ContextEnabled,- org.apache.maven.plugin.Mojo
@Mojo(name="go-offline",
      threadSafe=true)
public class GoOfflineMojo
extends AbstractDependencyFilterMojo
Goal that resolves all project dependencies, including plugins and reports and their dependencies.
- Since:
- 2.0
- Author:
- Brian Fox, Maarten Mulders, Lisa Hardy
- 
Field SummaryFieldsModifier and TypeFieldDescriptionprotected booleanDon't resolve plugins and artifacts that are in the current reactor.Fields inherited from class org.apache.maven.plugins.dependency.fromDependencies.AbstractDependencyFilterMojoclassifier, excludeArtifactIds, excludeClassifiers, excludeGroupIds, excludeScope, excludeTransitive, excludeTypes, includeArtifactIds, includeClassifiers, includeGroupIds, includeScope, includeTypes, markersDirectory, overWriteIfNewer, overWriteReleases, overWriteSnapshots, prependGroupId, typeFields inherited from class org.apache.maven.plugins.dependency.AbstractDependencyMojoreactorProjects, sessionFields inherited from interface org.apache.maven.plugin.MojoROLE
- 
Constructor SummaryConstructorsConstructorDescriptionGoOfflineMojo(org.apache.maven.execution.MavenSession session, org.sonatype.plexus.build.incremental.BuildContext buildContext, org.apache.maven.project.MavenProject project, ResolverUtil resolverUtil, org.apache.maven.project.ProjectBuilder projectBuilder, org.apache.maven.artifact.handler.manager.ArtifactHandlerManager artifactHandlerManager) 
- 
Method SummaryModifier and TypeMethodDescriptionprotected voidMain entry into mojo.protected org.apache.maven.shared.artifact.filter.collection.FilterArtifactsprotected org.apache.maven.shared.artifact.filter.collection.ArtifactsFilterReturn anArtifactsFilterindicating which artifacts must be filtered out.protected List<org.eclipse.aether.artifact.Artifact> This method resolves the dependency artifacts from the project.Methods inherited from class org.apache.maven.plugins.dependency.fromDependencies.AbstractDependencyFilterMojofilterMarkedDependencies, getDependencySets, getDependencySets, getMarkersDirectory, getResolvedDependencies, getResolverUtil, isPrependGroupId, setMarkersDirectory, setPrependGroupIdMethods inherited from class org.apache.maven.plugins.dependency.AbstractDependencyMojoexecute, getProject, isSilent, isSkip, setSilent, setSkipMethods inherited from class org.apache.maven.plugin.AbstractMojogetLog, getPluginContext, setLog, setPluginContext
- 
Field Details- 
excludeReactor@Parameter(property="excludeReactor", defaultValue="true") protected boolean excludeReactorDon't resolve plugins and artifacts that are in the current reactor.- Since:
- 2.7
 
 
- 
- 
Constructor Details- 
GoOfflineMojo@Inject public GoOfflineMojo(org.apache.maven.execution.MavenSession session, org.sonatype.plexus.build.incremental.BuildContext buildContext, org.apache.maven.project.MavenProject project, ResolverUtil resolverUtil, org.apache.maven.project.ProjectBuilder projectBuilder, org.apache.maven.artifact.handler.manager.ArtifactHandlerManager artifactHandlerManager) 
 
- 
- 
Method Details- 
doExecuteprotected void doExecute() throws org.apache.maven.plugin.MojoExecutionExceptionMain entry into mojo. Gets the list of dependencies, resolves all that are not in the Reactor, and iterates through displaying the resolved versions.- Specified by:
- doExecutein class- AbstractDependencyMojo
- Throws:
- org.apache.maven.plugin.MojoExecutionException- with a message if an error occurs
 
- 
resolveDependencyArtifactsprotected List<org.eclipse.aether.artifact.Artifact> resolveDependencyArtifacts() throws org.apache.maven.shared.artifact.filter.collection.ArtifactFilterException, org.eclipse.aether.resolution.DependencyResolutionExceptionThis method resolves the dependency artifacts from the project.- Returns:
- lis of resolved dependency artifacts
- Throws:
- org.apache.maven.shared.artifact.filter.collection.ArtifactFilterException- in case of an error while filtering the artifacts
- org.eclipse.aether.resolution.DependencyResolutionException- in case of an error while resolving the artifacts
 
- 
getArtifactsFilterprotected org.apache.maven.shared.artifact.filter.collection.FilterArtifacts getArtifactsFilter()- Returns:
- FilterArtifacts
 
- 
getMarkedArtifactFilterprotected org.apache.maven.shared.artifact.filter.collection.ArtifactsFilter getMarkedArtifactFilter()Description copied from class:AbstractDependencyFilterMojoReturn anArtifactsFilterindicating which artifacts must be filtered out.- Specified by:
- getMarkedArtifactFilterin class- AbstractDependencyFilterMojo
- Returns:
- an ArtifactsFilterindicating which artifacts must be filtered out
 
 
-