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
Modifier and TypeFieldDescriptionprotected org.apache.maven.plugin.MojoExecution
This mojo's execution.protected org.apache.maven.plugin.descriptor.PluginDescriptor
This plugins descriptor.protected org.apache.maven.project.MavenProject
The Maven project.protected final ArtifactStoreFactory
protected org.apache.maven.execution.MavenSession
The Maven Session Objectprotected boolean
If true, execution of the plugin is skipped.Fields inherited from interface org.apache.maven.plugin.Mojo
ROLE
-
Constructor Summary
ModifierConstructorDescriptionprotected
AbstractMRMMojo
(ArtifactStoreFactory proxyRepo) Creates a new instance -
Method Summary
Modifier and TypeMethodDescriptionprotected ProxyArtifactStore
Creates anArtifactStore
that fetches from the repositories available to Maven itself.protected abstract void
Performs this plugin's action.final void
execute()
Executes the plugin goal (if the plugin is not skipped)protected org.apache.maven.plugin.MojoExecution
Methods inherited from class org.apache.maven.plugin.AbstractMojo
getLog, getPluginContext, setLog, setPluginContext
-
Field Details
-
proxyRepo
-
project
@Parameter(defaultValue="${project}", required=true, readonly=true) protected org.apache.maven.project.MavenProject projectThe Maven project. -
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
Creates a new instance- Parameters:
proxyRepo
- injected proxyRepo
-
-
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 anArtifactStore
that fetches from the repositories available to Maven itself.- Returns:
- an
ArtifactStore
that fetches from the repositories available to Maven itself.
-