org.codehaus.mojo.mrm.plugin
Class AbstractMRMMojo

java.lang.Object
  extended by org.apache.maven.plugin.AbstractMojo
      extended by 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
protected  org.apache.maven.artifact.factory.ArtifactFactory artifactFactory
          The artifact factory.
protected  org.apache.maven.artifact.resolver.ArtifactResolver artifactResolver
          The artifact resolver.
protected  org.apache.maven.artifact.repository.ArtifactRepository localRepository
          The local repository.
protected  org.apache.maven.plugin.MojoExecution mojoExecution
          This mojo's execution.
protected  org.apache.maven.plugin.descriptor.PluginDescriptor pluginDescriptor
          This plugins descriptor.
protected  org.apache.maven.project.MavenProject project
          The maven project.
protected  List remoteArtifactRepositories
          The remote repositories.
protected  List remotePluginRepositories
          The remote pluginRepositories.
protected  org.apache.maven.execution.MavenSession session
          The Maven Session Object
protected  boolean skip
          If true, execution of the plugin is skipped.
 
Fields inherited from interface org.apache.maven.plugin.Mojo
ROLE
 
Constructor Summary
AbstractMRMMojo()
           
 
Method Summary
protected  FactoryHelper createFactoryHelper()
          Creates a new FactoryHelper instance for injection into anything that needs one.
protected  ProxyArtifactStore createProxyArtifactStore()
          Creates an ArtifactStore that fetches from the repositories available to Maven itself.
protected abstract  void doExecute()
          Performs this plugin's action.
 void execute()
          Executes the plugin goal (if the plugin is not skipped)
 
Methods inherited from class org.apache.maven.plugin.AbstractMojo
getLog, getPluginContext, setLog, setPluginContext
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

project

protected org.apache.maven.project.MavenProject project
The maven project.


remoteArtifactRepositories

protected List remoteArtifactRepositories
The remote repositories.


remotePluginRepositories

protected List remotePluginRepositories
The remote pluginRepositories.


localRepository

protected org.apache.maven.artifact.repository.ArtifactRepository localRepository
The local repository.


artifactFactory

protected org.apache.maven.artifact.factory.ArtifactFactory artifactFactory
The artifact factory.


artifactResolver

protected org.apache.maven.artifact.resolver.ArtifactResolver artifactResolver
The artifact resolver.


session

protected org.apache.maven.execution.MavenSession session
The Maven Session Object


pluginDescriptor

protected org.apache.maven.plugin.descriptor.PluginDescriptor pluginDescriptor
This plugins descriptor.


mojoExecution

protected org.apache.maven.plugin.MojoExecution mojoExecution
This mojo's execution.


skip

protected boolean skip
If true, execution of the plugin is skipped.

Constructor Detail

AbstractMRMMojo

public AbstractMRMMojo()
Method Detail

execute

public final void execute()
                   throws org.apache.maven.plugin.MojoExecutionException,
                          org.apache.maven.plugin.MojoFailureException
Executes 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.

doExecute

protected abstract void doExecute()
                           throws org.apache.maven.plugin.MojoExecutionException,
                                  org.apache.maven.plugin.MojoFailureException
Performs 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

protected ProxyArtifactStore createProxyArtifactStore()
Creates an ArtifactStore that fetches from the repositories available to Maven itself.

Returns:
an ArtifactStore that fetches from the repositories available to Maven itself.

createFactoryHelper

protected FactoryHelper createFactoryHelper()
Creates a new FactoryHelper instance for injection into anything that needs one.

Returns:
a new FactoryHelper instance for injection into anything that needs one.


Copyright © 2009-2011 Codehaus. All Rights Reserved.