Class Mojo
- java.lang.Object
-
- org.apache.maven.tools.plugin.extractor.model.Mojo
-
- All Implemented Interfaces:
Serializable
public class Mojo extends Object implements Serializable
Mojo descriptor definition.- Version:
- $Revision$ $Date$
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description Mojo()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddComponent(Component component)Method addComponent.voidaddParameter(Parameter parameter)Method addParameter.StringgetCall()Get the target/method within the script to call when this mojo executes.List<Component>getComponents()Method getComponents.StringgetDeprecation()Get a deprecation message for this mojo parameter.StringgetDescription()Get the description for this parameter.LifecycleExecutiongetExecution()Get information about a sub-execution of the Maven lifecycle which should be processed.StringgetGoal()Get the name of the goal used to invoke this mojo.List<Parameter>getParameters()Method getParameters.StringgetPhase()Get the phase to which this mojo should be bound by default.StringgetRequiresDependencyResolution()Get the scope of dependencies that this mojo requires to have resolved.StringgetSince()Get version when the mojo was added to the API.booleanisAggregator()Get whether this mojo operates as an aggregator when the reactor is run.booleanisInheritByDefault()Get whether this mojo's configuration should propagate down the POM inheritance chain by default.booleanisRequiresDirectInvocation()Get if true, this mojo can only be directly invoked (eg.booleanisRequiresOnline()Get whether this mojo requires online mode to operate normally.booleanisRequiresProject()Get whether this mojo requires a project instance in order to execute.booleanisRequiresReports()Get whether this mojo requires a reports section in the POM.voidremoveComponent(Component component)Method removeComponent.voidremoveParameter(Parameter parameter)Method removeParameter.voidsetAggregator(boolean aggregator)Set whether this mojo operates as an aggregator when the reactor is run.voidsetCall(String call)Set the target/method within the script to call when this mojo executes.voidsetComponents(List<Component> components)Set list of plexus components required by this mojo.voidsetDeprecation(String deprecation)Set a deprecation message for this mojo parameter.voidsetDescription(String description)Set the description for this parameter.voidsetExecution(LifecycleExecution execution)Set information about a sub-execution of the Maven lifecycle which should be processed.voidsetGoal(String goal)Set the name of the goal used to invoke this mojo.voidsetInheritByDefault(boolean inheritByDefault)Set whether this mojo's configuration should propagate down the POM inheritance chain by default.voidsetParameters(List<Parameter> parameters)Set list of parameters used by this mojo.voidsetPhase(String phase)Set the phase to which this mojo should be bound by default.voidsetRequiresDependencyResolution(String requiresDependencyResolution)Set the scope of dependencies that this mojo requires to have resolved.voidsetRequiresDirectInvocation(boolean requiresDirectInvocation)Set if true, this mojo can only be directly invoked (eg.voidsetRequiresOnline(boolean requiresOnline)Set whether this mojo requires online mode to operate normally.voidsetRequiresProject(boolean requiresProject)Set whether this mojo requires a project instance in order to execute.voidsetRequiresReports(boolean requiresReports)Set whether this mojo requires a reports section in the POM.voidsetSince(String since)Set version when the mojo was added to the API.
-
-
-
Constructor Detail
-
Mojo
public Mojo()
-
-
Method Detail
-
addComponent
public void addComponent(Component component)
Method addComponent.- Parameters:
component- a component object.
-
addParameter
public void addParameter(Parameter parameter)
Method addParameter.- Parameters:
parameter- a parameter object.
-
getCall
public String getCall()
Get the target/method within the script to call when this mojo executes.- Returns:
- String
-
getComponents
public List<Component> getComponents()
Method getComponents.- Returns:
- List
-
getDeprecation
public String getDeprecation()
Get a deprecation message for this mojo parameter.- Returns:
- String
-
getDescription
public String getDescription()
Get the description for this parameter.- Returns:
- String
-
getExecution
public LifecycleExecution getExecution()
Get information about a sub-execution of the Maven lifecycle which should be processed.- Returns:
- LifecycleExecution
-
getParameters
public List<Parameter> getParameters()
Method getParameters.- Returns:
- List
-
getPhase
public String getPhase()
Get the phase to which this mojo should be bound by default.- Returns:
- String
-
getRequiresDependencyResolution
public String getRequiresDependencyResolution()
Get the scope of dependencies that this mojo requires to have resolved.- Returns:
- String
-
isAggregator
public boolean isAggregator()
Get whether this mojo operates as an aggregator when the reactor is run. That is, only runs once.- Returns:
- boolean
-
isInheritByDefault
public boolean isInheritByDefault()
Get whether this mojo's configuration should propagate down the POM inheritance chain by default.- Returns:
- boolean
-
isRequiresDirectInvocation
public boolean isRequiresDirectInvocation()
Get if true, this mojo can only be directly invoked (eg. specified directly on the command line).- Returns:
- boolean
-
isRequiresOnline
public boolean isRequiresOnline()
Get whether this mojo requires online mode to operate normally.- Returns:
- boolean
-
isRequiresProject
public boolean isRequiresProject()
Get whether this mojo requires a project instance in order to execute.- Returns:
- boolean
-
isRequiresReports
public boolean isRequiresReports()
Get whether this mojo requires a reports section in the POM.- Returns:
- boolean
-
removeComponent
public void removeComponent(Component component)
Method removeComponent.- Parameters:
component- a component object.
-
removeParameter
public void removeParameter(Parameter parameter)
Method removeParameter.- Parameters:
parameter- a parameter object.
-
setAggregator
public void setAggregator(boolean aggregator)
Set whether this mojo operates as an aggregator when the reactor is run. That is, only runs once.- Parameters:
aggregator- a aggregator object.
-
setCall
public void setCall(String call)
Set the target/method within the script to call when this mojo executes.- Parameters:
call- a call object.
-
setComponents
public void setComponents(List<Component> components)
Set list of plexus components required by this mojo.- Parameters:
components- a components object.
-
setDeprecation
public void setDeprecation(String deprecation)
Set a deprecation message for this mojo parameter.- Parameters:
deprecation- a deprecation object.
-
setDescription
public void setDescription(String description)
Set the description for this parameter.- Parameters:
description- a description object.
-
setExecution
public void setExecution(LifecycleExecution execution)
Set information about a sub-execution of the Maven lifecycle which should be processed.- Parameters:
execution- a execution object.
-
setGoal
public void setGoal(String goal)
Set the name of the goal used to invoke this mojo.- Parameters:
goal- a goal object.
-
setInheritByDefault
public void setInheritByDefault(boolean inheritByDefault)
Set whether this mojo's configuration should propagate down the POM inheritance chain by default.- Parameters:
inheritByDefault- a inheritByDefault object.
-
setParameters
public void setParameters(List<Parameter> parameters)
Set list of parameters used by this mojo.- Parameters:
parameters- a parameters object.
-
setPhase
public void setPhase(String phase)
Set the phase to which this mojo should be bound by default.- Parameters:
phase- a phase object.
-
setRequiresDependencyResolution
public void setRequiresDependencyResolution(String requiresDependencyResolution)
Set the scope of dependencies that this mojo requires to have resolved.- Parameters:
requiresDependencyResolution- a requiresDependencyResolution object.
-
setRequiresDirectInvocation
public void setRequiresDirectInvocation(boolean requiresDirectInvocation)
Set if true, this mojo can only be directly invoked (eg. specified directly on the command line).- Parameters:
requiresDirectInvocation- a requiresDirectInvocation object.
-
setRequiresOnline
public void setRequiresOnline(boolean requiresOnline)
Set whether this mojo requires online mode to operate normally.- Parameters:
requiresOnline- a requiresOnline object.
-
setRequiresProject
public void setRequiresProject(boolean requiresProject)
Set whether this mojo requires a project instance in order to execute.- Parameters:
requiresProject- a requiresProject object.
-
setRequiresReports
public void setRequiresReports(boolean requiresReports)
Set whether this mojo requires a reports section in the POM.- Parameters:
requiresReports- a requiresReports object.
-
-