org.apache.maven.plugins.annotations
Annotation Type Parameter


@Documented
@Retention(value=CLASS)
@Target(value=FIELD)
@Inherited
public @interface Parameter

Used to configure your Mojo parameters to be injected by MavenPluginManager.getConfiguredMojo(...).

Since:
3.0
Author:
Olivier Lamy

Optional Element Summary
 String alias
          alias supported to get parameter value.
 String defaultValue
          parameter default value, eventually containing ${...}
 String property
          Property to use to retrieve a value.
 boolean readonly
          Specifies that this parameter cannot be configured directly by the user (as in the case of POM-specified configuration).
 boolean required
          is the parameter required?
 

alias

public abstract String alias
alias supported to get parameter value.

Returns:
the alias
Default:
""

property

public abstract String property
Property to use to retrieve a value. Can come from -D execution, setting properties or pom properties.

Returns:
property name
Default:
""

defaultValue

public abstract String defaultValue
parameter default value, eventually containing ${...} expressions which will be interpreted at inject time: see PluginParameterExpressionEvaluator.

Returns:
the default value
Default:
""

required

public abstract boolean required
is the parameter required?

Returns:
true if the Mojo should fail when the parameter cannot be injected
Default:
false

readonly

public abstract boolean readonly
Specifies that this parameter cannot be configured directly by the user (as in the case of POM-specified configuration). This is useful when you want to force the user to use common POM elements rather than plugin configurations, as in the case where you want to use the artifact's final name as a parameter. In this case, you want the user to modify <build><finalName/></build> rather than specifying a value for finalName directly in the plugin configuration section. It is also useful to ensure that - for example - a List-typed parameter which expects items of type Artifact doesn't get a List full of Strings.

Returns:
true if the user should not be allowed to configure the parameter directly
Default:
false


Copyright © 2004-2012 The Apache Software Foundation. All Rights Reserved.