mirror of https://github.com/apache/maven.git
Squashed commit of the following:
commit 049228ce76927a6740500e1b750f0e8f201f2478 Author: rfscholte <rfscholte@apache.org> Date: Mon Mar 27 20:22:46 2017 +0200 [MNG-6185] Replace doclettag explanation with annotations in AbstractMojo javadoc Fix by Checkstyle reported issues commit 63796a649e6e3b25a58fb567d354ca1849f48819 Author: rfscholte <rfscholte@apache.org> Date: Sat Mar 25 23:15:00 2017 +0100 [MNG-6185] Replace doclettag explanation with annotations in AbstractMojo javadoc
This commit is contained in:
parent
0baa423452
commit
00c82b7e23
|
@ -27,17 +27,15 @@ import org.apache.maven.plugin.logging.SystemStreamLog;
|
|||
/**
|
||||
* Abstract class to provide most of the infrastructure required to implement a <code>Mojo</code> except for
|
||||
* the execute method.<br>
|
||||
* The implementation should have a <code>goal</code> annotation in the class-level javadoc annotation:
|
||||
* The implementation should have a <code>Mojo</code> annotation with the name of the goal:
|
||||
* <pre>
|
||||
* /**
|
||||
* * @goal goalName
|
||||
* */
|
||||
* @Mojo( name = "<goal-name>" )
|
||||
* </pre>
|
||||
* <p>
|
||||
* 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
|
||||
* <code>Mojo</code> is executed:
|
||||
* </p>
|
||||
* <table border="1" summary="class-level doclettags">
|
||||
* <table border="1" summary="mojo annotation attributes">
|
||||
* <tr bgcolor="#CCCCCC">
|
||||
* <th>Descriptor Element</th>
|
||||
* <th>Annotation</th>
|
||||
|
@ -46,7 +44,7 @@ import org.apache.maven.plugin.logging.SystemStreamLog;
|
|||
* </tr>
|
||||
* <tr>
|
||||
* <td>goal</td>
|
||||
* <td>@goal <goalName></td>
|
||||
* <td>name = "<goal-name>"</td>
|
||||
* <td>Yes</td>
|
||||
* <td>The 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.</td>
|
||||
|
@ -65,7 +63,7 @@ import org.apache.maven.plugin.logging.SystemStreamLog;
|
|||
* </tr>
|
||||
* <tr>
|
||||
* <td>configurator</td>
|
||||
* <td>@configurator <roleHint></td>
|
||||
* <td>configurator = "<role-hint>"</td>
|
||||
* <td>No</td>
|
||||
* <td>The 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;
|
|||
* </tr>
|
||||
* <tr>
|
||||
* <td>phase</td>
|
||||
* <td>@phase <phaseName></td>
|
||||
* <td>defaultPhase = LifecyclePhase.<phase></td>
|
||||
* <td>No</td>
|
||||
* <td>Binds this Mojo to a particular phase of the standard build lifecycle, if specified.
|
||||
* <br>
|
||||
|
@ -86,7 +84,8 @@ import org.apache.maven.plugin.logging.SystemStreamLog;
|
|||
* </tr>
|
||||
* <tr>
|
||||
* <td>execute</td>
|
||||
* <td>@execute [phase=<phaseName>|goal=<goalName>] [lifecycle=<lifecycleId>]</td>
|
||||
* <td>@Execute
|
||||
* ( phase=LifecyclePhase.<phase>, goal= "<goal-name>", lifecycle="<lifecycle-id>" )</td>
|
||||
* <td>No</td>
|
||||
* <td>When 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;
|
|||
* </tr>
|
||||
* <tr>
|
||||
* <td>requiresDependencyResolution</td>
|
||||
* <td>@requiresDependencyResolution <requiredScope></td>
|
||||
* <td>requiresDependencyResolution = ResolutionScope.<scope></td>
|
||||
* <td>No</td>
|
||||
* <td>Flags 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;
|
|||
* </td>
|
||||
* </tr>
|
||||
* </table>
|
||||
* <p>This is only a small set of all the options. A complete list can be found at
|
||||
* <a href="https://maven.apache.org/components/plugin-tools/maven-plugin-tools-annotations/index.html" target="_blank">
|
||||
* Maven Plugin Tool for Annotations</a>.
|
||||
*
|
||||
* @see <a href="https://maven.apache.org/guides/plugin/guide-java-plugin-development.html" target="_blank">Guide to Developing Java Plugins</a>
|
||||
* @see <a href="https://maven.apache.org/guides/mini/guide-configuring-plugins.html" target="_blank">Guide to Configuring Plug-ins</a>
|
||||
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue