Package org.apache.maven.model
Class Plugin
java.lang.Object
org.apache.maven.model.ConfigurationContainer
org.apache.maven.model.Plugin
- All Implemented Interfaces:
- Serializable,- Cloneable,- InputLocationTracker
The 
<plugin> element contains
 informations required for a plugin.- Version:
- $Revision$ $Date$
- See Also:
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionvoidaddDependency(Dependency dependency) Method addDependency.voidaddExecution(PluginExecution pluginExecution) Method addExecution.clone()Method clone.static StringconstructKey(String groupId, String artifactId) booleanvoidReset theexecutionMapfield tonullGet the artifact ID of the plugin in the repository.Method getDependencies.Method getExecutions.Get whether to load Maven extensions (such as packaging and type handlers) from this plugin.getGoals()Get Deprecated.Get the group ID of the plugin in the repository.getId()Gets the identifier of the plugin.getKey()Get the version (or valid range of versions) of the plugin to be used.inthashCode()booleanvoidremoveDependency(Dependency dependency) Method removeDependency.voidremoveExecution(PluginExecution pluginExecution) Method removeExecution.voidsetArtifactId(String artifactId) Set the artifact ID of the plugin in the repository.voidsetDependencies(List<Dependency> dependencies) Set additional dependencies that this project needs to introduce to the plugin's classloader.voidsetExecutions(List<PluginExecution> executions) Set multiple specifications of a set of goals to execute during the build lifecycle, each having (possibly) a different configuration.voidsetExtensions(boolean extensions) voidsetExtensions(String extensions) Set whether to load Maven extensions (such as packaging and type handlers) from this plugin.voidSet Deprecated.voidsetGroupId(String groupId) Set the group ID of the plugin in the repository.voidsetVersion(String version) Set the version (or valid range of versions) of the plugin to be used.toString()Methods inherited from class org.apache.maven.model.ConfigurationContainergetConfiguration, getInherited, getLocation, isInheritanceApplied, isInherited, setConfiguration, setInherited, setInherited, setLocation, setOtherLocation, unsetInheritanceApplied
- 
Constructor Details- 
Pluginpublic Plugin()
 
- 
- 
Method Details- 
addDependencyMethod addDependency.- Parameters:
- dependency- a dependency object.
 
- 
addExecutionMethod addExecution.- Parameters:
- pluginExecution- a pluginExecution object.
 
- 
cloneMethod clone.- Overrides:
- clonein class- ConfigurationContainer
- Returns:
- Plugin
 
- 
getArtifactIdGet the artifact ID of the plugin in the repository.- Returns:
- String
 
- 
getDependenciesMethod getDependencies.- Returns:
- List
 
- 
getExecutionsMethod getExecutions.- Returns:
- List
 
- 
getExtensionsGet whether to load Maven extensions (such as packaging and type handlers) from this plugin. For performance reasons, this should only be enabled when necessary. Note: While the type of this field isStringfor technical reasons, the semantic type is actuallyBoolean. Default value isfalse.- Returns:
- String
 
- 
getGoalsGet Deprecated. Unused by Maven.- Returns:
- Object
 
- 
getGroupIdGet the group ID of the plugin in the repository.- Returns:
- String
 
- 
getVersionGet the version (or valid range of versions) of the plugin to be used.- Returns:
- String
 
- 
removeDependencyMethod removeDependency.- Parameters:
- dependency- a dependency object.
 
- 
removeExecutionMethod removeExecution.- Parameters:
- pluginExecution- a pluginExecution object.
 
- 
setArtifactIdSet the artifact ID of the plugin in the repository.- Parameters:
- artifactId- a artifactId object.
 
- 
setDependenciesSet additional dependencies that this project needs to introduce to the plugin's classloader.- Parameters:
- dependencies- a dependencies object.
 
- 
setExecutionsSet multiple specifications of a set of goals to execute during the build lifecycle, each having (possibly) a different configuration.- Parameters:
- executions- a executions object.
 
- 
setExtensionsSet whether to load Maven extensions (such as packaging and type handlers) from this plugin. For performance reasons, this should only be enabled when necessary. Note: While the type of this field isStringfor technical reasons, the semantic type is actuallyBoolean. Default value isfalse.- Parameters:
- extensions- a extensions object.
 
- 
setGoalsSet Deprecated. Unused by Maven.- Parameters:
- goals- a goals object.
 
- 
setGroupIdSet the group ID of the plugin in the repository.- Parameters:
- groupId- a groupId object.
 
- 
setVersionSet the version (or valid range of versions) of the plugin to be used.- Parameters:
- version- a version object.
 
- 
isExtensionspublic boolean isExtensions()
- 
setExtensionspublic void setExtensions(boolean extensions) 
- 
flushExecutionMappublic void flushExecutionMap()Reset theexecutionMapfield tonull
- 
getExecutionsAsMap- Returns:
- a Map of executions field with PluginExecution#getId()as key
- See Also:
 
- 
getIdGets the identifier of the plugin.- Returns:
- The plugin id in the form <groupId>:<artifactId>:<version>, nevernull.
 
- 
getKey- Returns:
- the key of the plugin, ie groupId:artifactId
 
- 
constructKey- Parameters:
- groupId- The group ID of the plugin in the repository
- artifactId- The artifact ID of the reporting plugin in the repository
- Returns:
- the key of the plugin, ie groupId:artifactId
 
- 
equals
- 
hashCodepublic int hashCode()
- 
toString
 
-