Class MojoDescriptor
java.lang.Object
org.codehaus.plexus.component.repository.ComponentDescriptor<Mojo>
org.apache.maven.plugin.descriptor.MojoDescriptor
- All Implemented Interfaces:
- Cloneable
public class MojoDescriptor
extends org.codehaus.plexus.component.repository.ComponentDescriptor<Mojo>
implements Cloneable
The bean containing the Mojo descriptor.
For more information about the usage tag, have a look to: https://maven.apache.org/developers/mojo-api-specification.html TODO is there a need for the delegation of MavenMojoDescriptor to this? Why not just extend ComponentDescriptor here?
For more information about the usage tag, have a look to: https://maven.apache.org/developers/mojo-api-specification.html TODO is there a need for the delegation of MavenMojoDescriptor to this? Why not just extend ComponentDescriptor here?
- 
Field SummaryFields
- 
Constructor SummaryConstructorsConstructorDescriptionDefault constructor.
- 
Method SummaryModifier and TypeMethodDescriptionvoidaddParameter(Parameter parameter) booleanclone()Creates a shallow copy of this mojo descriptor.booleanGets the scope of (transitive) dependencies that should be collected.getGoal()getId()org.codehaus.plexus.configuration.PlexusConfigurationgetPhase()getRole()getSince()inthashCode()booleanDeprecated.booleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanisV4Api()booleanvoidsetAggregator(boolean aggregator) voidsetDependencyCollectionRequired(String requiresDependencyCollection) voidsetDependencyResolutionRequired(String requiresDependencyResolution) voidsetDeprecated(String deprecated) voidsetDirectInvocationOnly(boolean directInvocationOnly) voidsetExecuteGoal(String executeGoal) voidsetExecuteLifecycle(String executeLifecycle) voidsetExecutePhase(String executePhase) voidsetExecutionStrategy(String executionStrategy) voidvoidsetInheritedByDefault(boolean inheritedByDefault) voidsetLanguage(String language) voidsetMojoConfiguration(org.codehaus.plexus.configuration.PlexusConfiguration mojoConfiguration) voidsetOnlineRequired(boolean requiresOnline) voidsetParameters(List<Parameter> parameters) voidvoidsetPluginDescriptor(PluginDescriptor pluginDescriptor) voidsetProjectRequired(boolean requiresProject) voidsetRequiresReports(boolean requiresReports) voidvoidsetThreadSafe(boolean threadSafe) Methods inherited from class org.codehaus.plexus.component.repository.ComponentDescriptoraddRequirement, 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, toString
- 
Field Details- 
MAVEN_PLUGIN
- 
SINGLE_PASS_EXEC_STRATEGY"once-per-session" execution strategy- See Also:
 
- 
MULTI_PASS_EXEC_STRATEGY
 
- 
- 
Constructor Details- 
MojoDescriptorpublic MojoDescriptor()Default constructor.
- 
MojoDescriptor
 
- 
- 
Method Details- 
getLanguage- Returns:
- the language of this Mojo, i.e. java
 
- 
setLanguage- Parameters:
- language- the new language
 
- 
getDeprecated- Returns:
- Description with reason of a Mojo deprecation.
 
- 
setDeprecated- Parameters:
- deprecated- Description with reason of a Mojo deprecation.
 
- 
getParameters- Returns:
- the list of parameters copy. Any change to returned list is NOT reflected on this instance. To add
 parameters, use addParameter(Parameter)method.
 
- 
setParameters- Parameters:
- parameters- the new list of parameters
- Throws:
- DuplicateParameterException- if any
 
- 
addParameter- Parameters:
- parameter- add a new parameter
- Throws:
- DuplicateParameterException- if any
 
- 
getParameterMap- Returns:
- the list parameters as a Map (keyed by Parameter.getName()) that is built fromparameterslist on each call. In other words, the map returned is built on fly and is a copy. Any change to this map is NOT reflected on list and other way around!
 
- 
setDependencyResolutionRequired- Parameters:
- requiresDependencyResolution- the new required dependencies in a specified scope
 
- 
getDependencyResolutionRequired
- 
isDependencyResolutionRequiredDeprecated.- Returns:
- the required dependencies in a specified scope TODO the name is not intelligible
 
- 
setDependencyCollectionRequired- Since:
- 3.0-alpha-3
 
- 
getDependencyCollectionRequiredGets the scope of (transitive) dependencies that should be collected. Dependency collection refers to the process of calculating the complete dependency tree in terms of artifact coordinates. In contrast to dependency resolution, this does not include the download of the files for the dependency artifacts. It 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:
- The scope of (transitive) dependencies that should be collected or nullif none.
- Since:
- 3.0-alpha-3
 
- 
setProjectRequiredpublic void setProjectRequired(boolean requiresProject) - Parameters:
- requiresProject-- trueif the Mojo needs a Maven project to be executed,- falseotherwise.
 
- 
isProjectRequiredpublic boolean isProjectRequired()- Returns:
- trueif the Mojo needs a Maven project to be executed,- falseotherwise.
 
- 
setOnlineRequiredpublic void setOnlineRequired(boolean requiresOnline) - Parameters:
- requiresOnline-- trueif the Mojo is online,- falseotherwise.
 
- 
isOnlineRequiredpublic boolean isOnlineRequired()- Returns:
- trueif the Mojo is online,- falseotherwise.
 
- 
requiresOnlinepublic boolean requiresOnline()- Returns:
- trueif the Mojo is online,- falseotherwise.
 
- 
getPhase- Returns:
- the bound phase name of the Mojo
 
- 
setPhase- Parameters:
- phase- the new bound phase name of the Mojo
 
- 
getSince- Returns:
- the version when the Mojo was added to the API
 
- 
setSince- Parameters:
- since- the new version when the Mojo was added to the API
 
- 
getGoal- Returns:
- The goal name of the Mojo
 
- 
setGoal- Parameters:
- goal- The new goal name of the Mojo
 
- 
getExecutePhase- Returns:
- the invocation phase of the Mojo
 
- 
setExecutePhase- Parameters:
- executePhase- the new invocation phase of the Mojo
 
- 
alwaysExecutepublic boolean alwaysExecute()- Returns:
- trueif the Mojo uses- alwaysfor the- executionStrategy
 
- 
getExecutionStrategy- Returns:
- the execution strategy
 
- 
setExecutionStrategy- Parameters:
- executionStrategy- the new execution strategy
 
- 
getMojoConfigurationpublic org.codehaus.plexus.configuration.PlexusConfiguration getMojoConfiguration()- Returns:
- the mojo configuration
 
- 
setMojoConfigurationpublic void setMojoConfiguration(org.codehaus.plexus.configuration.PlexusConfiguration mojoConfiguration) - Parameters:
- mojoConfiguration- a new mojo configuration
 
- 
getRole
- 
getRoleHint
- 
getId- Returns:
- the id of the mojo, based on the goal name
 
- 
getFullGoalName- Returns:
- the full goal name
- See Also:
 
- 
getComponentType
- 
getPluginDescriptor- Returns:
- the plugin descriptor
 
- 
setPluginDescriptor- Parameters:
- pluginDescriptor- the new plugin descriptor
 
- 
isInheritedByDefaultpublic boolean isInheritedByDefault()- Returns:
- trueif the Mojo is inherited,- falseotherwise.
 
- 
setInheritedByDefaultpublic void setInheritedByDefault(boolean inheritedByDefault) - Parameters:
- inheritedByDefault-- trueif the Mojo is inherited,- falseotherwise.
 
- 
equals
- 
hashCodepublic int hashCode()- Overrides:
- hashCodein class- org.codehaus.plexus.component.repository.ComponentDescriptor<Mojo>
 
- 
getExecuteLifecycle- Returns:
- the invocation lifecycle of the Mojo
 
- 
setExecuteLifecycle- Parameters:
- executeLifecycle- the new invocation lifecycle of the Mojo
 
- 
setAggregatorpublic void setAggregator(boolean aggregator) - Parameters:
- aggregator-- trueif the Mojo uses the Maven project and its child modules,- falseotherwise.
 
- 
isAggregatorpublic boolean isAggregator()- Returns:
- trueif the Mojo uses the Maven project and its child modules,- falseotherwise.
 
- 
isDirectInvocationOnlypublic boolean isDirectInvocationOnly()- Returns:
- trueif the Mojo cannot be invoked directly,- falseotherwise.
 
- 
setDirectInvocationOnlypublic void setDirectInvocationOnly(boolean directInvocationOnly) - Parameters:
- directInvocationOnly-- trueif the Mojo cannot be invoked directly,- falseotherwise.
 
- 
isRequiresReportspublic boolean isRequiresReports()- Returns:
- trueif the Mojo needs reports to run,- falseotherwise.
 
- 
setRequiresReportspublic void setRequiresReports(boolean requiresReports) - Parameters:
- requiresReports-- trueif the Mojo needs reports to run,- falseotherwise.
 
- 
setExecuteGoal- Parameters:
- executeGoal- the new invocation goal of the Mojo
 
- 
getExecuteGoal- Returns:
- the invocation goal of the Mojo
 
- 
isThreadSafepublic boolean isThreadSafe()- Returns:
- True if the Mojois thread-safe and can be run safely in parallel
- Since:
- 3.0-beta-2
 
- 
setThreadSafepublic void setThreadSafe(boolean threadSafe) - Parameters:
- threadSafe- indicates that the mojo is thread-safe and can be run safely in parallel
- Since:
- 3.0-beta-2
 
- 
isForkingpublic boolean isForking()- Returns:
- trueif this mojo forks either a goal or the lifecycle,- falseotherwise.
 
- 
isV4Apipublic boolean isV4Api()
- 
cloneCreates a shallow copy of this mojo descriptor.
- 
getMojoDescriptorV4
 
-