org.apache.maven.plugin.descriptor.model
Class MojoDescriptor

java.lang.Object
  extended by org.apache.maven.plugin.descriptor.model.MojoDescriptor
All Implemented Interfaces:
Serializable

public class MojoDescriptor
extends Object
implements Serializable

A Mojo description.

Version:
$Revision$ $Date$
See Also:
Serialized Form

Constructor Summary
MojoDescriptor()
           
 
Method Summary
 void addConfiguration(Configuration configuration)
          Method addConfiguration.
 void addParameter(Parameter parameter)
          Method addParameter.
 void addRequirement(Requirement requirement)
          Method addRequirement.
 String getComposer()
          Get the composer field.
 List<Configuration> getConfiguration()
          Method getConfiguration.
 String getConfigurator()
          Get the configurator type to use when injecting parameter values into this Mojo.
 String getDeprecated()
          Get specify the version when the Mojo was deprecated to the API.
 String getDescription()
          Get the description of this Mojo's functionality.
 String getExecuteGoal()
          Get the executeGoal field.
 String getExecuteLifecycle()
          Get the executeLifecycle field.
 String getExecutePhase()
          Get the executePhase field.
 String getExecutionStrategy()
          Get specify the execution strategy: once-per-session, always.
 String getGoal()
          Get the 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.
 String getImplementation()
          Get the Mojo's fully-qualified class name (or script path in the case of non-Java Mojos).
 String getInstantiationStrategy()
          Get specify the instantiation strategy.
 String getLanguage()
          Get the implementation language for this Mojo (Java, beanshell, etc.).
 List<Parameter> getParameters()
          Method getParameters.
 String getPhase()
          Get defines a default phase to bind a mojo execution to if the user does not explicitly set a phase in the POM.
 List<Requirement> getRequirements()
          Method getRequirements.
 String getRequiresDependencyCollection()
          Get flags this mojo as requiring information about the dependencies that would make up the specified class path.
 String getRequiresDependencyResolution()
          Get flags this Mojo as requiring the dependencies in the specified class path to be resolved before it can execute: compile, runtime, test, compile+runtime (since Maven 3.0).
 String getSince()
          Get specify the version when the Mojo was added to the API.
 boolean isAggregator()
          Get flags this Mojo to run it in a multi module way, i.e.
 boolean isInheritedByDefault()
          Get specify that the Mojo is inherited.
 boolean isRequiresDirectInvocation()
          Get flags this Mojo to be invoked directly.
 boolean isRequiresOnline()
          Get flags this Mojo to require online mode for its operation.
 boolean isRequiresProject()
          Get flags this Mojo to run inside of a project.
 boolean isRequiresReports()
          Get flags this Mojo to require reports.
 boolean isThreadSafe()
          Get marks this mojo as being thread-safe, i.e. the mojo safely supports concurrent execution during parallel builds.
 void removeConfiguration(Configuration configuration)
          Method removeConfiguration.
 void removeParameter(Parameter parameter)
          Method removeParameter.
 void removeRequirement(Requirement requirement)
          Method removeRequirement.
 void setAggregator(boolean aggregator)
          Set flags this Mojo to run it in a multi module way, i.e.
 void setComposer(String composer)
          Set the composer field.
 void setConfiguration(List<Configuration> configuration)
          Set the configuration field.
 void setConfigurator(String configurator)
          Set the configurator type to use when injecting parameter values into this Mojo.
 void setDeprecated(String deprecated)
          Set specify the version when the Mojo was deprecated to the API.
 void setDescription(String description)
          Set the description of this Mojo's functionality.
 void setExecuteGoal(String executeGoal)
          Set the executeGoal field.
 void setExecuteLifecycle(String executeLifecycle)
          Set the executeLifecycle field.
 void setExecutePhase(String executePhase)
          Set the executePhase field.
 void setExecutionStrategy(String executionStrategy)
          Set specify the execution strategy: once-per-session, always.
 void setGoal(String goal)
          Set the 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.
 void setImplementation(String implementation)
          Set the Mojo's fully-qualified class name (or script path in the case of non-Java Mojos).
 void setInheritedByDefault(boolean inheritedByDefault)
          Set specify that the Mojo is inherited.
 void setInstantiationStrategy(String instantiationStrategy)
          Set specify the instantiation strategy.
 void setLanguage(String language)
          Set the implementation language for this Mojo (Java, beanshell, etc.).
 void setParameters(List<Parameter> parameters)
          Set the parameters field.
 void setPhase(String phase)
          Set defines a default phase to bind a mojo execution to if the user does not explicitly set a phase in the POM.
 void setRequirements(List<Requirement> requirements)
          Set the requirements field.
 void setRequiresDependencyCollection(String requiresDependencyCollection)
          Set flags this mojo as requiring information about the dependencies that would make up the specified class path.
 void setRequiresDependencyResolution(String requiresDependencyResolution)
          Set flags this Mojo as requiring the dependencies in the specified class path to be resolved before it can execute: compile, runtime, test, compile+runtime (since Maven 3.0).
 void setRequiresDirectInvocation(boolean requiresDirectInvocation)
          Set flags this Mojo to be invoked directly.
 void setRequiresOnline(boolean requiresOnline)
          Set flags this Mojo to require online mode for its operation.
 void setRequiresProject(boolean requiresProject)
          Set flags this Mojo to run inside of a project.
 void setRequiresReports(boolean requiresReports)
          Set flags this Mojo to require reports.
 void setSince(String since)
          Set specify the version when the Mojo was added to the API.
 void setThreadSafe(boolean threadSafe)
          Set marks this mojo as being thread-safe, i.e. the mojo safely supports concurrent execution during parallel builds.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MojoDescriptor

public MojoDescriptor()
Method Detail

addConfiguration

public void addConfiguration(Configuration configuration)
Method addConfiguration.

Parameters:
configuration -

addParameter

public void addParameter(Parameter parameter)
Method addParameter.

Parameters:
parameter -

addRequirement

public void addRequirement(Requirement requirement)
Method addRequirement.

Parameters:
requirement -

getComposer

public String getComposer()
Get the composer field.

Returns:
String

getConfiguration

public List<Configuration> getConfiguration()
Method getConfiguration.

Returns:
List

getConfigurator

public String getConfigurator()
Get the configurator type to use when injecting parameter values into this Mojo. The value is normally deduced from the Mojo's implementation language, but can be specified to allow a custom ComponentConfigurator implementation to be used.

Returns:
String

getDeprecated

public String getDeprecated()
Get specify the version when the Mojo was deprecated to the API. Similar to Javadoc deprecated. This will trigger a warning when a user tries to configure a parameter marked as deprecated.

Returns:
String

getDescription

public String getDescription()
Get the description of this Mojo's functionality.

Returns:
String

getExecuteGoal

public String getExecuteGoal()
Get the executeGoal field.

Returns:
String

getExecuteLifecycle

public String getExecuteLifecycle()
Get the executeLifecycle field.

Returns:
String

getExecutePhase

public String getExecutePhase()
Get the executePhase field.

Returns:
String

getExecutionStrategy

public String getExecutionStrategy()
Get specify the execution strategy: once-per-session, always.

Returns:
String

getGoal

public String getGoal()
Get the 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.

Returns:
String

getImplementation

public String getImplementation()
Get the Mojo's fully-qualified class name (or script path in the case of non-Java Mojos).

Returns:
String

getInstantiationStrategy

public String getInstantiationStrategy()
Get specify the instantiation strategy.

Returns:
String

getLanguage

public String getLanguage()
Get the implementation language for this Mojo (Java, beanshell, etc.).

Returns:
String

getParameters

public List<Parameter> getParameters()
Method getParameters.

Returns:
List

getPhase

public String getPhase()
Get defines a default phase to bind a mojo execution to if the user does not explicitly set a phase in the POM. Note: This annotation will not automagically make a mojo run when the plugin declaration is added to the POM. It merely enables the user to omit the <phase> element from the surrounding <execution> element.

Returns:
String

getRequirements

public List<Requirement> getRequirements()
Method getRequirements.

Returns:
List

getRequiresDependencyCollection

public String getRequiresDependencyCollection()
Get flags this mojo as requiring information about the dependencies that would make up the specified class path. As the name suggests, this is similar to requiresDependencyResolution and supports the same values. The important difference is this will not resolve the files for the dependencies, i.e. the artifacts associated with a Maven project can lack a file. As such, this annotation is meant for mojos that only want to analyze the set of transitive dependencies, in particular during early lifecycle phases where full dependency resolution might fail due to projects which haven't been built yet.

Returns:
String

getRequiresDependencyResolution

public String getRequiresDependencyResolution()
Get flags this Mojo as requiring the dependencies in the specified class path to be resolved before it can execute: compile, runtime, test, compile+runtime (since Maven 3.0).

Returns:
String

getSince

public String getSince()
Get specify the version when the Mojo was added to the API. Similar to Javadoc since.

Returns:
String

isAggregator

public boolean isAggregator()
Get flags this Mojo to run it in a multi module way, i.e. aggregate the build with the set of projects listed as modules.

Returns:
boolean

isInheritedByDefault

public boolean isInheritedByDefault()
Get specify that the Mojo is inherited.

Returns:
boolean

isRequiresDirectInvocation

public boolean isRequiresDirectInvocation()
Get flags this Mojo to be invoked directly.

Returns:
boolean

isRequiresOnline

public boolean isRequiresOnline()
Get flags this Mojo to require online mode for its operation.

Returns:
boolean

isRequiresProject

public boolean isRequiresProject()
Get flags this Mojo to run inside of a project.

Returns:
boolean

isRequiresReports

public boolean isRequiresReports()
Get flags this Mojo to require reports. Unsupported since Maven 3.0.

Returns:
boolean

isThreadSafe

public boolean isThreadSafe()
Get marks this mojo as being thread-safe, i.e. the mojo safely supports concurrent execution during parallel builds. Mojos without this annotation will make Maven output a warning when used during a parallel build session. Since Maven 3.0.

Returns:
boolean

removeConfiguration

public void removeConfiguration(Configuration configuration)
Method removeConfiguration.

Parameters:
configuration -

removeParameter

public void removeParameter(Parameter parameter)
Method removeParameter.

Parameters:
parameter -

removeRequirement

public void removeRequirement(Requirement requirement)
Method removeRequirement.

Parameters:
requirement -

setAggregator

public void setAggregator(boolean aggregator)
Set flags this Mojo to run it in a multi module way, i.e. aggregate the build with the set of projects listed as modules.

Parameters:
aggregator -

setComposer

public void setComposer(String composer)
Set the composer field.

Parameters:
composer -

setConfiguration

public void setConfiguration(List<Configuration> configuration)
Set the configuration field.

Parameters:
configuration -

setConfigurator

public void setConfigurator(String configurator)
Set the configurator type to use when injecting parameter values into this Mojo. The value is normally deduced from the Mojo's implementation language, but can be specified to allow a custom ComponentConfigurator implementation to be used.

Parameters:
configurator -

setDeprecated

public void setDeprecated(String deprecated)
Set specify the version when the Mojo was deprecated to the API. Similar to Javadoc deprecated. This will trigger a warning when a user tries to configure a parameter marked as deprecated.

Parameters:
deprecated -

setDescription

public void setDescription(String description)
Set the description of this Mojo's functionality.

Parameters:
description -

setExecuteGoal

public void setExecuteGoal(String executeGoal)
Set the executeGoal field.

Parameters:
executeGoal -

setExecuteLifecycle

public void setExecuteLifecycle(String executeLifecycle)
Set the executeLifecycle field.

Parameters:
executeLifecycle -

setExecutePhase

public void setExecutePhase(String executePhase)
Set the executePhase field.

Parameters:
executePhase -

setExecutionStrategy

public void setExecutionStrategy(String executionStrategy)
Set specify the execution strategy: once-per-session, always.

Parameters:
executionStrategy -

setGoal

public void setGoal(String goal)
Set the 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.

Parameters:
goal -

setImplementation

public void setImplementation(String implementation)
Set the Mojo's fully-qualified class name (or script path in the case of non-Java Mojos).

Parameters:
implementation -

setInheritedByDefault

public void setInheritedByDefault(boolean inheritedByDefault)
Set specify that the Mojo is inherited.

Parameters:
inheritedByDefault -

setInstantiationStrategy

public void setInstantiationStrategy(String instantiationStrategy)
Set specify the instantiation strategy.

Parameters:
instantiationStrategy -

setLanguage

public void setLanguage(String language)
Set the implementation language for this Mojo (Java, beanshell, etc.).

Parameters:
language -

setParameters

public void setParameters(List<Parameter> parameters)
Set the parameters field.

Parameters:
parameters -

setPhase

public void setPhase(String phase)
Set defines a default phase to bind a mojo execution to if the user does not explicitly set a phase in the POM. Note: This annotation will not automagically make a mojo run when the plugin declaration is added to the POM. It merely enables the user to omit the <phase> element from the surrounding <execution> element.

Parameters:
phase -

setRequirements

public void setRequirements(List<Requirement> requirements)
Set the requirements field.

Parameters:
requirements -

setRequiresDependencyCollection

public void setRequiresDependencyCollection(String requiresDependencyCollection)
Set flags this mojo as requiring information about the dependencies that would make up the specified class path. As the name suggests, this is similar to requiresDependencyResolution and supports the same values. The important difference is this will not resolve the files for the dependencies, i.e. the artifacts associated with a Maven project can lack a file. As such, this annotation is meant for mojos that only want to analyze the set of transitive dependencies, in particular during early lifecycle phases where full dependency resolution might fail due to projects which haven't been built yet.

Parameters:
requiresDependencyCollection -

setRequiresDependencyResolution

public void setRequiresDependencyResolution(String requiresDependencyResolution)
Set flags this Mojo as requiring the dependencies in the specified class path to be resolved before it can execute: compile, runtime, test, compile+runtime (since Maven 3.0).

Parameters:
requiresDependencyResolution -

setRequiresDirectInvocation

public void setRequiresDirectInvocation(boolean requiresDirectInvocation)
Set flags this Mojo to be invoked directly.

Parameters:
requiresDirectInvocation -

setRequiresOnline

public void setRequiresOnline(boolean requiresOnline)
Set flags this Mojo to require online mode for its operation.

Parameters:
requiresOnline -

setRequiresProject

public void setRequiresProject(boolean requiresProject)
Set flags this Mojo to run inside of a project.

Parameters:
requiresProject -

setRequiresReports

public void setRequiresReports(boolean requiresReports)
Set flags this Mojo to require reports. Unsupported since Maven 3.0.

Parameters:
requiresReports -

setSince

public void setSince(String since)
Set specify the version when the Mojo was added to the API. Similar to Javadoc since.

Parameters:
since -

setThreadSafe

public void setThreadSafe(boolean threadSafe)
Set marks this mojo as being thread-safe, i.e. the mojo safely supports concurrent execution during parallel builds. Mojos without this annotation will make Maven output a warning when used during a parallel build session. Since Maven 3.0.

Parameters:
threadSafe -


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