added javadoc
git-svn-id: https://svn.apache.org/repos/asf/maven/plugin-tools/trunk@1338427 13f79535-47bb-0310-9956-ffa450edef68master
parent
d56e6cba11
commit
1905753a7e
|
|
@ -27,6 +27,8 @@ import java.lang.annotation.RetentionPolicy;
|
|||
import java.lang.annotation.Target;
|
||||
|
||||
/**
|
||||
* Used to configure injection of Plexus components.
|
||||
*
|
||||
* @author Olivier Lamy
|
||||
* @since 3.0
|
||||
*/
|
||||
|
|
@ -36,11 +38,27 @@ import java.lang.annotation.Target;
|
|||
@Inherited
|
||||
public @interface Component
|
||||
{
|
||||
/**
|
||||
* role of the component to inject.
|
||||
* @return the role
|
||||
*/
|
||||
String role() default "";
|
||||
|
||||
/**
|
||||
* role-hint of the component to inject.
|
||||
* @return the role-hint
|
||||
*/
|
||||
String roleHint() default "";
|
||||
|
||||
/**
|
||||
* is the component required?
|
||||
* @return <code>true</code> if the Mojo should fail when the component cannot be injected
|
||||
*/
|
||||
boolean required() default true;
|
||||
|
||||
/**
|
||||
* ignored...
|
||||
* @return
|
||||
*/
|
||||
boolean readonly() default true;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -27,6 +27,8 @@ import java.lang.annotation.RetentionPolicy;
|
|||
import java.lang.annotation.Target;
|
||||
|
||||
/**
|
||||
* Used if your Mojo need to fork a <a href="/ref/3.0.4/maven-core/lifecycles.html">lifecycle</a>.
|
||||
*
|
||||
* @author Olivier Lamy
|
||||
* @since 3.0
|
||||
*/
|
||||
|
|
@ -36,9 +38,21 @@ import java.lang.annotation.Target;
|
|||
@Inherited
|
||||
public @interface Execute
|
||||
{
|
||||
/**
|
||||
* lifecycle phase to fork.
|
||||
* @return the phase
|
||||
*/
|
||||
LifecyclePhase phase() default LifecyclePhase.NONE;
|
||||
|
||||
/**
|
||||
* goal to fork.
|
||||
* @return the goal
|
||||
*/
|
||||
String goal() default "";
|
||||
|
||||
/**
|
||||
* lifecycle id to fork.
|
||||
* @return the lifecycle id
|
||||
*/
|
||||
String lifecycle() default "";
|
||||
}
|
||||
|
|
|
|||
|
|
@ -20,6 +20,8 @@ package org.apache.maven.plugins.annotations;
|
|||
*/
|
||||
|
||||
/**
|
||||
* Component instanciation strategy.
|
||||
*
|
||||
* @author Hervé Boutemy
|
||||
* @since 3.0
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -20,6 +20,7 @@ package org.apache.maven.plugins.annotations;
|
|||
*/
|
||||
|
||||
/**
|
||||
* <a href="/ref/3.0.4/maven-core/lifecycles.html">Lifecycle phases</a>.
|
||||
* @author Olivier Lamy
|
||||
* @since 3.0
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -27,6 +27,8 @@ import java.lang.annotation.RetentionPolicy;
|
|||
import java.lang.annotation.Target;
|
||||
|
||||
/**
|
||||
* This annotation will mark your class as a Mojo (ie. goal in a Maven plugin).
|
||||
*
|
||||
* @author Olivier Lamy
|
||||
* @since 3.0
|
||||
*/
|
||||
|
|
@ -36,31 +38,83 @@ import java.lang.annotation.Target;
|
|||
@Inherited
|
||||
public @interface Mojo
|
||||
{
|
||||
/**
|
||||
* goal name (required).
|
||||
* @return the goal name
|
||||
*/
|
||||
String name();
|
||||
|
||||
/**
|
||||
* default phase to bind your mojo.
|
||||
* @return the default phase
|
||||
*/
|
||||
LifecyclePhase defaultPhase() default LifecyclePhase.NONE;
|
||||
|
||||
/**
|
||||
* the required dependency resolution scope.
|
||||
* @return
|
||||
*/
|
||||
ResolutionScope requiresDependencyResolution() default ResolutionScope.RUNTIME;
|
||||
|
||||
/**
|
||||
* the required dependency collection scope.
|
||||
* @return
|
||||
*/
|
||||
ResolutionScope requiresDependencyCollection() default ResolutionScope.RUNTIME;
|
||||
|
||||
/**
|
||||
* your Mojo instantiation strategy. (Only <code>per-lookup</code> and <code>singleton</code> are supported)
|
||||
* @return the instantiation strategy
|
||||
*/
|
||||
InstanciationStrategy instantiationStrategy() default InstanciationStrategy.PER_LOOKUP;
|
||||
|
||||
/**
|
||||
* execution strategy: <code>once-per-session</code> or <code>always</code>.
|
||||
* @return <code>once-per-session</code> or <code>always</code>
|
||||
*/
|
||||
String executionStrategy() default "once-per-session";
|
||||
|
||||
/**
|
||||
* does your mojo requires a project to be executed?
|
||||
* @return
|
||||
*/
|
||||
boolean requiresProject() default true;
|
||||
|
||||
/**
|
||||
* does your mojo requires a reporting context to be executed?
|
||||
* @return
|
||||
*/
|
||||
boolean requiresReports() default false;
|
||||
|
||||
/**
|
||||
* if the Mojo uses the Maven project and its child modules.
|
||||
* @return
|
||||
*/
|
||||
boolean aggregator() default false;
|
||||
|
||||
/**
|
||||
* can this Mojo be invoked directly only?
|
||||
* @return
|
||||
*/
|
||||
boolean requiresDirectInvocation() default false;
|
||||
|
||||
/**
|
||||
* does this Mojo need to be online to be executed?
|
||||
* @return
|
||||
*/
|
||||
boolean requiresOnline() default false;
|
||||
|
||||
boolean inheritByDefault() default true;
|
||||
|
||||
/**
|
||||
* own configurator class.
|
||||
* @return
|
||||
*/
|
||||
String configurator() default "";
|
||||
|
||||
/**
|
||||
* is your mojo thread safe (since Maven 3.x)?
|
||||
* @return
|
||||
*/
|
||||
boolean threadSafe() default false;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -27,6 +27,8 @@ import java.lang.annotation.RetentionPolicy;
|
|||
import java.lang.annotation.Target;
|
||||
|
||||
/**
|
||||
* Used to configure your Mojo Parameters.
|
||||
*
|
||||
* @author Olivier Lamy
|
||||
* @since 3.0
|
||||
*/
|
||||
|
|
@ -36,13 +38,33 @@ import java.lang.annotation.Target;
|
|||
@Inherited
|
||||
public @interface Parameter
|
||||
{
|
||||
/**
|
||||
* alias supported to get parameter value.
|
||||
* @return the alias
|
||||
*/
|
||||
String alias() default "";
|
||||
|
||||
/**
|
||||
* Property to use to retrieve a value. Can come from <code>-D</code> execution, setting properties or pom properties.
|
||||
* @return property name
|
||||
*/
|
||||
String expression() default "";
|
||||
|
||||
/**
|
||||
* parameter default value, eventually containing <code>${...}</code> expressions which will be interpreted at inject time.
|
||||
* @return the default value
|
||||
*/
|
||||
String defaultValue() default "";
|
||||
|
||||
/**
|
||||
* is the parameter required?
|
||||
* @return <code>true</code> if the Mojo should fail when the parameter cannot be injected
|
||||
*/
|
||||
boolean required() default false;
|
||||
|
||||
/**
|
||||
* ignored...
|
||||
* @return
|
||||
*/
|
||||
boolean readonly() default false;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue