Annotation Type Parameter
-
@Documented @Retention(CLASS) @Target({FIELD,METHOD}) @Inherited public @interface Parameter
Used to configure your Mojo parameters to be injected byMavenPluginManager.getConfiguredMojo(...)
.Beans injected into Mojo parameters are prepared by Sisu JSR330-based container: this annotation is only effective on fields of the Mojo class itself, nested bean injection requires Sisu or JSR330 annotations.
- Since:
- 3.0
- Author:
- Olivier Lamy
-
-
Optional Element Summary
Optional Elements Modifier and Type Optional Element Description String
alias
alias supported to get parameter value.String
defaultValue
parameter default value, may contain${...}
expressions which will be interpreted at inject time: see PluginParameterExpressionEvaluator.String
name
name of the bean property used to get/set the field: by default, field name is used.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?
-
-
-
-
defaultValue
String defaultValue
parameter default value, may contain${...}
expressions which will be interpreted at inject time: see PluginParameterExpressionEvaluator.- Returns:
- the default value
- Default:
- ""
-
-
-
required
boolean required
is the parameter required?- Returns:
true
if the Mojo should fail when the parameter cannot be injected
- Default:
- false
-
-
-
readonly
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
-
-