Package org.apache.maven.model
Class Plugin
java.lang.Object
org.apache.maven.model.ConfigurationContainer
org.apache.maven.model.Plugin
- All Implemented Interfaces:
Serializable
The
<plugin>
element contains
informations required for a plugin.- Version:
- $Revision$ $Date$
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate String
The artifact ID of the plugin in the repository.private List<Dependency>
Field dependencies.private Map
private List<PluginExecution>
Field executions.private boolean
Whether to load Maven extensions (such as packaging and type handlers) from this plugin.private Object
Deprecated.private String
The group ID of the plugin in the repository.private String
private String
The version (or valid range of versions) of the plugin to be used. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
addDependency
(Dependency dependency) Method addDependency.void
addExecution
(PluginExecution pluginExecution) Method addExecution.static String
constructKey
(String groupId, String artifactId) boolean
void
Reset theexecutionMap
field tonull
Get the artifact ID of the plugin in the repository.Method getDependencies.Method getExecutions.getGoals()
Get Deprecated.Get the group ID of the plugin in the repository.getKey()
Get the version (or valid range of versions) of the plugin to be used.int
hashCode()
boolean
Get whether to load Maven extensions (such as packaging and type handlers) from this plugin.void
removeDependency
(Dependency dependency) Method removeDependency.void
removeExecution
(PluginExecution pluginExecution) Method removeExecution.void
setArtifactId
(String artifactId) Set the artifact ID of the plugin in the repository.void
setDependencies
(List<Dependency> dependencies) Set additional dependencies that this project needs to introduce to the plugin's classloader.void
setExecutions
(List<PluginExecution> executions) Set multiple specifications of a set of goals to execute during the build lifecycle, each having (possibly) a different configuration.void
setExtensions
(boolean extensions) Set whether to load Maven extensions (such as packaging and type handlers) from this plugin.void
Set Deprecated.void
setGroupId
(String groupId) Set the group ID of the plugin in the repository.void
setVersion
(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.ConfigurationContainer
getConfiguration, getInherited, isInheritanceApplied, setConfiguration, setInherited, unsetInheritanceApplied
-
Field Details
-
groupId
The group ID of the plugin in the repository. -
artifactId
The artifact ID of the plugin in the repository. -
version
The version (or valid range of versions) of the plugin to be used. -
extensions
private boolean extensionsWhether to load Maven extensions (such as packaging and type handlers) from this plugin. For performance reasons, this should only be enabled when necessary. -
executions
Field executions. -
dependencies
Field dependencies. -
goals
Deprecated. Unused by Maven. -
executionMap
-
key
-
-
Constructor Details
-
Plugin
public Plugin()
-
-
Method Details
-
addDependency
Method addDependency.- Parameters:
dependency
-
-
addExecution
Method addExecution.- Parameters:
pluginExecution
-
-
getArtifactId
Get the artifact ID of the plugin in the repository.- Returns:
- String
-
getDependencies
Method getDependencies.- Returns:
- List
-
getExecutions
Method getExecutions.- Returns:
- List
-
getGoals
Get Deprecated. Unused by Maven.- Returns:
- Object
-
getGroupId
Get the group ID of the plugin in the repository.- Returns:
- String
-
getVersion
Get the version (or valid range of versions) of the plugin to be used.- Returns:
- String
-
isExtensions
public boolean isExtensions()Get whether to load Maven extensions (such as packaging and type handlers) from this plugin. For performance reasons, this should only be enabled when necessary.- Returns:
- boolean
-
removeDependency
Method removeDependency.- Parameters:
dependency
-
-
removeExecution
Method removeExecution.- Parameters:
pluginExecution
-
-
setArtifactId
Set the artifact ID of the plugin in the repository.- Parameters:
artifactId
-
-
setDependencies
Set additional dependencies that this project needs to introduce to the plugin's classloader.- Parameters:
dependencies
-
-
setExecutions
Set multiple specifications of a set of goals to execute during the build lifecycle, each having (possibly) a different configuration.- Parameters:
executions
-
-
setExtensions
public void setExtensions(boolean extensions) Set whether to load Maven extensions (such as packaging and type handlers) from this plugin. For performance reasons, this should only be enabled when necessary.- Parameters:
extensions
-
-
setGoals
Set Deprecated. Unused by Maven.- Parameters:
goals
-
-
setGroupId
Set the group ID of the plugin in the repository.- Parameters:
groupId
-
-
setVersion
Set the version (or valid range of versions) of the plugin to be used.- Parameters:
version
-
-
flushExecutionMap
public void flushExecutionMap()Reset theexecutionMap
field tonull
-
getExecutionsAsMap
- Returns:
- a Map of executions field with
PluginExecution#getId()
as key - See Also:
-
getKey
- Returns:
- the key of the plugin, ie
groupId:artifactId
-
constructKey
- Parameters:
groupId
-artifactId
-- Returns:
- the key of the plugin, ie
groupId:artifactId
-
equals
-
hashCode
public int hashCode() -
toString
-