Package org.codehaus.mojo.mrm.plugin
Class AbstractMRMMojo
java.lang.Object
org.apache.maven.plugin.AbstractMojo
org.codehaus.mojo.mrm.plugin.AbstractMRMMojo
- All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled,org.apache.maven.plugin.Mojo
- Direct Known Subclasses:
AbstractStartMojo,StopMojo
public abstract class AbstractMRMMojo
extends org.apache.maven.plugin.AbstractMojo
Base class for all the Mock Repository Manager's Mojos.
- Since:
- 1.0
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected org.apache.maven.archetype.ArchetypeManagerThe archetype managerprotected org.apache.maven.artifact.factory.ArtifactFactoryThe artifact factory.protected org.apache.maven.artifact.resolver.ArtifactResolverThe artifact resolver.protected org.apache.maven.artifact.repository.ArtifactRepositoryThe local repository.protected org.apache.maven.plugin.MojoExecutionThis mojo's execution.protected org.apache.maven.plugin.descriptor.PluginDescriptorThis plugins descriptor.protected org.apache.maven.project.MavenProjectThe Maven project.protected List<org.apache.maven.artifact.repository.ArtifactRepository>The remote repositories.protected List<org.apache.maven.artifact.repository.ArtifactRepository>The remote pluginRepositories.protected org.apache.maven.execution.MavenSessionThe Maven Session Objectprotected booleanIf true, execution of the plugin is skipped.Fields inherited from interface org.apache.maven.plugin.Mojo
ROLE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected FactoryHelperCreates a newFactoryHelperinstance for injection into anything that needs one.protected ProxyArtifactStoreCreates anArtifactStorethat fetches from the repositories available to Maven itself.protected abstract voidPerforms this plugin's action.final voidexecute()Executes the plugin goal (if the plugin is not skipped)protected org.apache.maven.plugin.MojoExecutionMethods inherited from class org.apache.maven.plugin.AbstractMojo
getLog, getPluginContext, setLog, setPluginContext
-
Field Details
-
project
@Parameter(defaultValue="${project}", required=true, readonly=true) protected org.apache.maven.project.MavenProject projectThe Maven project. -
remoteArtifactRepositories
@Parameter(defaultValue="${project.remoteArtifactRepositories}", readonly=true) protected List<org.apache.maven.artifact.repository.ArtifactRepository> remoteArtifactRepositoriesThe remote repositories. -
remotePluginRepositories
@Parameter(defaultValue="${project.pluginArtifactRepositories}", readonly=true) protected List<org.apache.maven.artifact.repository.ArtifactRepository> remotePluginRepositoriesThe remote pluginRepositories. -
localRepository
@Parameter(defaultValue="${localRepository}", readonly=true) protected org.apache.maven.artifact.repository.ArtifactRepository localRepositoryThe local repository. -
artifactFactory
@Component protected org.apache.maven.artifact.factory.ArtifactFactory artifactFactoryThe artifact factory. -
artifactResolver
@Component protected org.apache.maven.artifact.resolver.ArtifactResolver artifactResolverThe artifact resolver. -
archetypeManager
@Component protected org.apache.maven.archetype.ArchetypeManager archetypeManagerThe archetype manager -
session
@Parameter(defaultValue="${session}", required=true, readonly=true) protected org.apache.maven.execution.MavenSession sessionThe Maven Session Object -
pluginDescriptor
@Parameter(defaultValue="${plugin}", required=true, readonly=true) protected org.apache.maven.plugin.descriptor.PluginDescriptor pluginDescriptorThis plugins descriptor. -
mojoExecution
@Parameter(defaultValue="${mojoExecution}", readonly=true, required=true) protected org.apache.maven.plugin.MojoExecution mojoExecutionThis mojo's execution. -
skip
@Parameter(property="mrm.skip", defaultValue="false") protected boolean skipIf true, execution of the plugin is skipped.
-
-
Constructor Details
-
AbstractMRMMojo
public AbstractMRMMojo()
-
-
Method Details
-
execute
public final void execute() throws org.apache.maven.plugin.MojoExecutionException, org.apache.maven.plugin.MojoFailureExceptionExecutes the plugin goal (if the plugin is not skipped)- Throws:
org.apache.maven.plugin.MojoExecutionException- If there is an exception occuring during the execution of the plugin.org.apache.maven.plugin.MojoFailureException- If there is an exception occuring during the execution of the plugin.
-
getMojoExecution
protected org.apache.maven.plugin.MojoExecution getMojoExecution() -
doExecute
protected abstract void doExecute() throws org.apache.maven.plugin.MojoExecutionException, org.apache.maven.plugin.MojoFailureExceptionPerforms this plugin's action.- Throws:
org.apache.maven.plugin.MojoExecutionException- If there is an exception occuring during the execution of the plugin.org.apache.maven.plugin.MojoFailureException- If there is an exception occuring during the execution of the plugin.
-
createProxyArtifactStore
Creates anArtifactStorethat fetches from the repositories available to Maven itself.- Returns:
- an
ArtifactStorethat fetches from the repositories available to Maven itself.
-
createFactoryHelper
Creates a newFactoryHelperinstance for injection into anything that needs one.- Returns:
- a new
FactoryHelperinstance for injection into anything that needs one.
-