diff --git a/maven-plugin-api/src/main/java/org/apache/maven/plugin/AbstractMojo.java b/maven-plugin-api/src/main/java/org/apache/maven/plugin/AbstractMojo.java index f85e7f3b1f..6292116463 100644 --- a/maven-plugin-api/src/main/java/org/apache/maven/plugin/AbstractMojo.java +++ b/maven-plugin-api/src/main/java/org/apache/maven/plugin/AbstractMojo.java @@ -27,17 +27,15 @@ import org.apache.maven.plugin.logging.SystemStreamLog; /** * Abstract class to provide most of the infrastructure required to implement a Mojo except for * the execute method.
- * The implementation should have a goal annotation in the class-level javadoc annotation: + * The implementation should have a Mojo annotation with the name of the goal: *
- * /**
- *  * @goal goalName
- *  */
+ *   @Mojo( name = "<goal-name>" )
  * 
*

- * There are also a number of class-level javadoc annotations which can be used to control how and when the + * There are also a number of attributes which can be used to control how and when the * Mojo is executed: *

- * + *
* * * @@ -46,7 +44,7 @@ import org.apache.maven.plugin.logging.SystemStreamLog; * * * - * + * * * @@ -65,7 +63,7 @@ import org.apache.maven.plugin.logging.SystemStreamLog; * * * - * + * * * * * - * + * * * * * - * + * * * * * - * + * * * * *
Descriptor ElementAnnotation
goal@goal <goalName>name = "<goal-name>"YesThe name for the Mojo that users will reference from the command line to execute the Mojo directly, * or inside a POM in order to provide Mojo-specific configuration.
configurator@configurator <roleHint>configurator = "<role-hint>"NoThe configurator type to use when injecting parameter values into this Mojo. The value is normally * deduced from the Mojo's implementation language, but can be specified to allow a custom @@ -77,7 +75,7 @@ import org.apache.maven.plugin.logging.SystemStreamLog; *
phase@phase <phaseName>defaultPhase = LifecyclePhase.<phase>NoBinds this Mojo to a particular phase of the standard build lifecycle, if specified. *
@@ -86,7 +84,8 @@ import org.apache.maven.plugin.logging.SystemStreamLog; *
execute@execute [phase=<phaseName>|goal=<goalName>] [lifecycle=<lifecycleId>]@Execute + * ( phase=LifecyclePhase.<phase>, goal= "<goal-name>", lifecycle="<lifecycle-id>" )NoWhen this goal is invoked, it will first invoke a parallel lifecycle, ending at the given phase. * If a goal is provided instead of a phase, that goal will be executed in isolation. @@ -99,7 +98,7 @@ import org.apache.maven.plugin.logging.SystemStreamLog; *
requiresDependencyResolution@requiresDependencyResolution <requiredScope>requiresDependencyResolution = ResolutionScope.<scope>NoFlags this Mojo as requiring the dependencies in the specified scope (or an implied scope) to be * resolved before it can execute. @@ -128,6 +127,9 @@ import org.apache.maven.plugin.logging.SystemStreamLog; *
+ *

This is only a small set of all the options. A complete list can be found at + * + * Maven Plugin Tool for Annotations. * * @see Guide to Developing Java Plugins * @see Guide to Configuring Plug-ins @@ -146,9 +148,7 @@ public abstract class AbstractMojo /** Plugin container context */ private Map pluginContext; - /** - * @see org.apache.maven.plugin.Mojo#setLog(org.apache.maven.plugin.logging.Log) - */ + @Override public void setLog( Log log ) { this.log = log; @@ -167,6 +167,7 @@ public abstract class AbstractMojo * * @see org.apache.maven.plugin.Mojo#getLog() */ + @Override public Log getLog() { if ( log == null ) @@ -177,17 +178,13 @@ public abstract class AbstractMojo return log; } - /** - * @see org.apache.maven.plugin.ContextEnabled#getPluginContext() - */ + @Override public Map getPluginContext() { return pluginContext; } - /** - * @see org.apache.maven.plugin.ContextEnabled#setPluginContext(java.util.Map) - */ + @Override public void setPluginContext( Map pluginContext ) { this.pluginContext = pluginContext;