public class MojoDescriptor extends org.codehaus.plexus.component.repository.ComponentDescriptor<Mojo> implements java.lang.Cloneable
| Modifier and Type | Field and Description |
|---|---|
private boolean |
aggregator
Flags this Mojo to run it in a multi module way, i.e.
|
private static java.lang.String |
DEFAULT_INSTANTIATION_STRATEGY |
private static java.lang.String |
DEFAULT_LANGUAGE |
private java.lang.String |
dependencyCollectionRequired
The scope of (transitive) dependencies that should be collected but not resolved.
|
private java.lang.String |
dependencyResolutionRequired
Specify the required dependencies in a specified scope
|
private java.lang.String |
deprecated
Specify the version when the Mojo was deprecated to the API.
|
private boolean |
directInvocationOnly
By default, the Mojo cannot be invoked directly
|
private java.lang.String |
executeGoal
Reference the invocation goal of the Mojo.
|
private java.lang.String |
executeLifecycle
Reference the invocation lifecycle of the Mojo.
|
private java.lang.String |
executePhase
Reference the invocation phase of the Mojo.
|
private java.lang.String |
executionStrategy
By default, the execution strategy is "once-per-session"
|
private java.lang.String |
goal
The goal 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.
|
private boolean |
inheritedByDefault
By default, the Mojo is inherited
|
static java.lang.String |
MAVEN_PLUGIN
The Plexus component type
|
private org.codehaus.plexus.configuration.PlexusConfiguration |
mojoConfiguration
Plugin configuration
|
static java.lang.String |
MULTI_PASS_EXEC_STRATEGY
"always" execution strategy
|
private boolean |
onlineRequired
By default, the Mojo is assumed to work offline as well
|
private java.util.Map<java.lang.String,Parameter> |
parameterMap |
private java.util.List<Parameter> |
parameters |
private java.lang.String |
phase
Defines a default phase to bind a mojo execution to if the user does not explicitly set a phase in the POM.
|
private PluginDescriptor |
pluginDescriptor
Plugin descriptor
|
private boolean |
projectRequired
By default, the Mojo needs a Maven project to be executed
|
private boolean |
requiresReports
By default, the Mojo don't need reports to run
|
private java.lang.String |
since
Specify the version when the Mojo was added to the API.
|
static java.lang.String |
SINGLE_PASS_EXEC_STRATEGY
"once-per-session" execution strategy
|
private boolean |
threadSafe
By default, mojos are not threadsafe
|
| Constructor and Description |
|---|
MojoDescriptor()
Default constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addParameter(Parameter parameter) |
boolean |
alwaysExecute() |
MojoDescriptor |
clone()
Creates a shallow copy of this mojo descriptor.
|
private boolean |
compareObjects(java.lang.Object first,
java.lang.Object second) |
boolean |
equals(java.lang.Object object) |
java.lang.String |
getComponentType() |
java.lang.String |
getDependencyCollectionRequired()
Gets the scope of (transitive) dependencies that should be collected.
|
java.lang.String |
getDependencyResolutionRequired() |
java.lang.String |
getDeprecated() |
java.lang.String |
getExecuteGoal() |
java.lang.String |
getExecuteLifecycle() |
java.lang.String |
getExecutePhase() |
java.lang.String |
getExecutionStrategy() |
java.lang.String |
getFullGoalName() |
java.lang.String |
getGoal() |
java.lang.String |
getId() |
java.lang.String |
getLanguage() |
org.codehaus.plexus.configuration.PlexusConfiguration |
getMojoConfiguration() |
java.util.Map<java.lang.String,Parameter> |
getParameterMap() |
java.util.List<Parameter> |
getParameters() |
java.lang.String |
getPhase() |
PluginDescriptor |
getPluginDescriptor() |
java.lang.String |
getRole() |
java.lang.String |
getRoleHint() |
java.lang.String |
getSince() |
int |
hashCode() |
boolean |
isAggregator() |
java.lang.String |
isDependencyResolutionRequired()
Deprecated.
|
boolean |
isDirectInvocationOnly() |
boolean |
isForking() |
boolean |
isInheritedByDefault() |
boolean |
isOnlineRequired() |
boolean |
isProjectRequired() |
boolean |
isRequiresReports() |
boolean |
isThreadSafe() |
boolean |
requiresOnline() |
void |
setAggregator(boolean aggregator) |
void |
setDependencyCollectionRequired(java.lang.String requiresDependencyCollection) |
void |
setDependencyResolutionRequired(java.lang.String requiresDependencyResolution) |
void |
setDeprecated(java.lang.String deprecated) |
void |
setDirectInvocationOnly(boolean directInvocationOnly) |
void |
setExecuteGoal(java.lang.String executeGoal) |
void |
setExecuteLifecycle(java.lang.String executeLifecycle) |
void |
setExecutePhase(java.lang.String executePhase) |
void |
setExecutionStrategy(java.lang.String executionStrategy) |
void |
setGoal(java.lang.String goal) |
void |
setInheritedByDefault(boolean inheritedByDefault) |
void |
setLanguage(java.lang.String language) |
void |
setMojoConfiguration(org.codehaus.plexus.configuration.PlexusConfiguration mojoConfiguration) |
void |
setOnlineRequired(boolean requiresOnline) |
void |
setParameters(java.util.List<Parameter> parameters) |
void |
setPhase(java.lang.String phase) |
void |
setPluginDescriptor(PluginDescriptor pluginDescriptor) |
void |
setProjectRequired(boolean requiresProject) |
void |
setRequiresReports(boolean requiresReports) |
void |
setSince(java.lang.String since) |
void |
setThreadSafe(boolean threadSafe) |
addRequirement, getAlias, getComponentComposer, getComponentConfigurator, getComponentFactory, getComponentProfile, getConfiguration, getDescription, getHumanReadableKey, getImplementation, getImplementationClass, getInstantiationStrategy, getLifecycleHandler, getRealm, getRequirements, getRoleClass, getVersion, hasConfiguration, isIsolatedRealm, setAlias, setComponentComposer, setComponentConfigurator, setComponentFactory, setComponentProfile, setComponentType, setConfiguration, setDescription, setImplementation, setImplementationClass, setInstantiationStrategy, setIsolatedRealm, setLifecycleHandler, setRealm, setRole, setRoleClass, setRoleHint, setVersion, toStringpublic static final java.lang.String MAVEN_PLUGIN
public static final java.lang.String SINGLE_PASS_EXEC_STRATEGY
public static final java.lang.String MULTI_PASS_EXEC_STRATEGY
private static final java.lang.String DEFAULT_INSTANTIATION_STRATEGY
private static final java.lang.String DEFAULT_LANGUAGE
private java.util.List<Parameter> parameters
private java.util.Map<java.lang.String,Parameter> parameterMap
private java.lang.String executionStrategy
private java.lang.String goal
private java.lang.String phase
<phase> element from the surrounding
<execution> element.private java.lang.String since
private java.lang.String executePhase
private java.lang.String executeGoal
private java.lang.String executeLifecycle
private java.lang.String deprecated
private boolean aggregator
private java.lang.String dependencyResolutionRequired
private java.lang.String dependencyCollectionRequired
private boolean projectRequired
private boolean onlineRequired
private org.codehaus.plexus.configuration.PlexusConfiguration mojoConfiguration
private PluginDescriptor pluginDescriptor
private boolean inheritedByDefault
private boolean directInvocationOnly
private boolean requiresReports
private boolean threadSafe
public java.lang.String getLanguage()
javapublic void setLanguage(java.lang.String language)
language - the new languagepublic java.lang.String getDeprecated()
true if the Mojo is deprecated, false otherwise.public void setDeprecated(java.lang.String deprecated)
deprecated - true to deprecate the Mojo, false otherwise.public java.util.List<Parameter> getParameters()
public void setParameters(java.util.List<Parameter> parameters) throws DuplicateParameterException
parameters - the new list of parametersDuplicateParameterException - if anypublic void addParameter(Parameter parameter) throws DuplicateParameterException
parameter - add a new parameterDuplicateParameterException - if anypublic java.util.Map<java.lang.String,Parameter> getParameterMap()
public void setDependencyResolutionRequired(java.lang.String requiresDependencyResolution)
requiresDependencyResolution - the new required dependencies in a specified scopepublic java.lang.String getDependencyResolutionRequired()
@Deprecated public java.lang.String isDependencyResolutionRequired()
public void setDependencyCollectionRequired(java.lang.String requiresDependencyCollection)
public java.lang.String getDependencyCollectionRequired()
null if none.public void setProjectRequired(boolean requiresProject)
requiresProject - true if the Mojo needs a Maven project to be executed, false
otherwise.public boolean isProjectRequired()
true if the Mojo needs a Maven project to be executed, false otherwise.public void setOnlineRequired(boolean requiresOnline)
requiresOnline - true if the Mojo is online, false otherwise.public boolean isOnlineRequired()
true if the Mojo is online, false otherwise.public boolean requiresOnline()
true if the Mojo is online, false otherwise.public java.lang.String getPhase()
public void setPhase(java.lang.String phase)
phase - the new binded phase name of the Mojopublic java.lang.String getSince()
public void setSince(java.lang.String since)
since - the new version when the Mojo was added to the APIpublic java.lang.String getGoal()
public void setGoal(java.lang.String goal)
goal - The new goal name of the Mojopublic java.lang.String getExecutePhase()
public void setExecutePhase(java.lang.String executePhase)
executePhase - the new invocation phase of the Mojopublic boolean alwaysExecute()
true if the Mojo uses always for the executionStrategypublic java.lang.String getExecutionStrategy()
public void setExecutionStrategy(java.lang.String executionStrategy)
executionStrategy - the new execution strategypublic org.codehaus.plexus.configuration.PlexusConfiguration getMojoConfiguration()
public void setMojoConfiguration(org.codehaus.plexus.configuration.PlexusConfiguration mojoConfiguration)
mojoConfiguration - a new mojo configurationpublic java.lang.String getRole()
getRole in class org.codehaus.plexus.component.repository.ComponentDescriptor<Mojo>public java.lang.String getRoleHint()
getRoleHint in class org.codehaus.plexus.component.repository.ComponentDescriptor<Mojo>public java.lang.String getId()
public java.lang.String getFullGoalName()
PluginDescriptor.getGoalPrefix(),
getGoal()public java.lang.String getComponentType()
getComponentType in class org.codehaus.plexus.component.repository.ComponentDescriptor<Mojo>public PluginDescriptor getPluginDescriptor()
public void setPluginDescriptor(PluginDescriptor pluginDescriptor)
pluginDescriptor - the new plugin descriptorpublic boolean isInheritedByDefault()
true if the Mojo is inherited, false otherwise.public void setInheritedByDefault(boolean inheritedByDefault)
inheritedByDefault - true if the Mojo is inherited, false otherwise.public boolean equals(java.lang.Object object)
equals in class org.codehaus.plexus.component.repository.ComponentDescriptor<Mojo>private boolean compareObjects(java.lang.Object first,
java.lang.Object second)
public int hashCode()
hashCode in class org.codehaus.plexus.component.repository.ComponentDescriptor<Mojo>public java.lang.String getExecuteLifecycle()
public void setExecuteLifecycle(java.lang.String executeLifecycle)
executeLifecycle - the new invocation lifecycle of the Mojopublic void setAggregator(boolean aggregator)
aggregator - true if the Mojo uses the Maven project and its child modules,
false otherwise.public boolean isAggregator()
true if the Mojo uses the Maven project and its child modules,
false otherwise.public boolean isDirectInvocationOnly()
true if the Mojo cannot be invoked directly, false otherwise.public void setDirectInvocationOnly(boolean directInvocationOnly)
directInvocationOnly - true if the Mojo cannot be invoked directly,
false otherwise.public boolean isRequiresReports()
true if the Mojo needs reports to run, false otherwise.public void setRequiresReports(boolean requiresReports)
requiresReports - true if the Mojo needs reports to run, false otherwise.public void setExecuteGoal(java.lang.String executeGoal)
executeGoal - the new invocation goal of the Mojopublic java.lang.String getExecuteGoal()
public boolean isThreadSafe()
Mojo is thread-safe and can be run safely in parallelpublic void setThreadSafe(boolean threadSafe)
threadSafe - indicates that the mojo is thread-safe and can be run safely in parallelpublic boolean isForking()
true if this mojo forks either a goal or the lifecycle, false otherwise.public MojoDescriptor clone()
clone in class java.lang.Object