org.jfrog.maven.annomojo.annotations
Annotation Type MojoParameter
@Retention(value=RUNTIME)
@Target(value={METHOD,FIELD})
@Inherited
public @interface MojoParameter
A parameter the plugin is expecting.
Optional Element Summary |
java.lang.String |
alias
Specifies an alias which can be used to configure this parameter from
the POM. |
java.lang.String |
defaultValue
The default value is used when the expression evaluates to null. |
java.lang.String |
deprecated
Marks a parameter as deprecated. |
java.lang.String |
description
The description of this parameter's use inside the Mojo. |
java.lang.String |
expression
Specifies the expression used to calculate the value to be injected
into this parameter of the Mojo at buildtime. |
java.lang.String |
property
|
boolean |
readonly
Specifies that this parameter cannot be configured directly by the user
(as in the case of POM-specified configuration). |
boolean |
required
Whether this parameter is required for the Mojo to function. |
description
public abstract java.lang.String description
- The description of this parameter's use inside the Mojo.
Using the toolset, this is detected as the Javadoc description
for the field.
NOTE: While this is not a required part of the parameter specification,
it SHOULD be provided to enable future tool support for browsing, etc.
and for clarity.
Every child classes inheriting this parameter via jar dependencies,
will not see the description if it is not written in this field but in
the javadoc.
- Returns:
- the textual description of the plugin-mojo parameter
- Default:
- ""
property
public abstract java.lang.String property
- Default:
- ""
required
public abstract boolean required
- Whether this parameter is required for the Mojo to function. This is
used to validate the configuration for a Mojo before it is injected,
and before the Mojo is executed from some half-state.
- Returns:
- true if the parameter is mandatory
- 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 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 parameter cannot be used in pom configuration
- Default:
- false
deprecated
public abstract java.lang.String deprecated
- Marks a parameter as deprecated. The rules on deprecation are the same
as normal Java with language elements. This will trigger a warning when
a user tries to configure a parameter marked as deprecated.
- Returns:
- true if the this parameter should not be used anymore
- Default:
- ""
alias
public abstract java.lang.String alias
- Specifies an alias which can be used to configure this parameter from
the POM. This is primarily useful to improve user-friendliness, where
Mojo field names are not intuitive to the user or are otherwise not
conducive to configuration via the POM.
- Returns:
- the xml alias tag name usable in pom files
- Default:
- ""
expression
public abstract java.lang.String expression
- Specifies the expression used to calculate the value to be injected
into this parameter of the Mojo at buildtime. This is commonly used
to refer to specific elements in the POM.
NOTE: If not specified, an expression of ${} is assumed, which
can only be satisfied from POM configuration or System properties.
The use of '${' and '}' is required to delimit actual expressions which
may be evaluated.
- Default:
- ""
defaultValue
public abstract java.lang.String defaultValue
- The default value is used when the expression evaluates to null.
- Returns:
- the xml alias tag name usable in pom files
- Default:
- ""
Copyright © 2006-2009. All Rights Reserved.