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

    Fields
    Modifier and Type
    Field
    Description
    protected 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 Object
    protected boolean
    If true, execution of the plugin is skipped.

    Fields inherited from interface org.apache.maven.plugin.Mojo

    ROLE
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    protected
    Creates a new instance
  • Method Summary

    Modifier and Type
    Method
    Description
    Creates an ArtifactStore that fetches from the repositories available to Maven itself.
    protected abstract void
    Performs this plugin's action.
    final void
    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

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • proxyRepo

      protected final ArtifactStoreFactory proxyRepo
    • project

      @Parameter(defaultValue="${project}", required=true, readonly=true) protected org.apache.maven.project.MavenProject project
      The Maven project.
    • session

      @Parameter(defaultValue="${session}", required=true, readonly=true) protected org.apache.maven.execution.MavenSession session
      The Maven Session Object
    • pluginDescriptor

      @Parameter(defaultValue="${plugin}", required=true, readonly=true) protected org.apache.maven.plugin.descriptor.PluginDescriptor pluginDescriptor
      This plugins descriptor.
    • mojoExecution

      @Parameter(defaultValue="${mojoExecution}", readonly=true, required=true) protected org.apache.maven.plugin.MojoExecution mojoExecution
      This mojo's execution.
    • skip

      @Parameter(property="mrm.skip", defaultValue="false") protected boolean skip
      If true, execution of the plugin is skipped.
  • Constructor Details

    • AbstractMRMMojo

      protected AbstractMRMMojo(ArtifactStoreFactory proxyRepo)
      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.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.
    • getMojoExecution

      protected org.apache.maven.plugin.MojoExecution getMojoExecution()
    • 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.