public class Plugin extends ConfigurationContainer implements java.io.Serializable, java.lang.Cloneable
<plugin> element contains
informations required for a plugin.| Modifier and Type | Field and Description |
|---|---|
private java.lang.String |
artifactId
The artifact ID of the plugin in the repository.
|
private java.util.List<Dependency> |
dependencies
Field dependencies.
|
private java.util.Map<java.lang.String,PluginExecution> |
executionMap |
private java.util.List<PluginExecution> |
executions
Field executions.
|
private java.lang.String |
extensions
Whether to load Maven extensions (such as
packaging and type handlers) from
this plugin.
|
private java.lang.Object |
goals
Deprecated.
|
private java.lang.String |
groupId
The group ID of the plugin in the repository.
|
private java.lang.String |
key |
private java.lang.String |
version
The version (or valid range of versions) of the plugin to be
used.
|
| Constructor and Description |
|---|
Plugin() |
| Modifier and Type | Method and Description |
|---|---|
void |
addDependency(Dependency dependency)
Method addDependency.
|
void |
addExecution(PluginExecution pluginExecution)
Method addExecution.
|
Plugin |
clone()
Method clone.
|
static java.lang.String |
constructKey(java.lang.String groupId,
java.lang.String artifactId) |
boolean |
equals(java.lang.Object other) |
void |
flushExecutionMap()
Reset the
executionMap field to null |
java.lang.String |
getArtifactId()
Get the artifact ID of the plugin in the repository.
|
java.util.List<Dependency> |
getDependencies()
Method getDependencies.
|
java.util.List<PluginExecution> |
getExecutions()
Method getExecutions.
|
java.util.Map<java.lang.String,PluginExecution> |
getExecutionsAsMap() |
java.lang.String |
getExtensions()
Get whether to load Maven extensions (such as packaging and
type handlers) from
this plugin.
|
java.lang.Object |
getGoals()
Get Deprecated.
|
java.lang.String |
getGroupId()
Get the group ID of the plugin in the repository.
|
java.lang.String |
getId()
Gets the identifier of the plugin.
|
java.lang.String |
getKey() |
java.lang.String |
getVersion()
Get the version (or valid range of versions) of the plugin
to be used.
|
int |
hashCode() |
boolean |
isExtensions() |
void |
removeDependency(Dependency dependency)
Method removeDependency.
|
void |
removeExecution(PluginExecution pluginExecution)
Method removeExecution.
|
void |
setArtifactId(java.lang.String artifactId)
Set the artifact ID of the plugin in the repository.
|
void |
setDependencies(java.util.List<Dependency> dependencies)
Set additional dependencies that this project needs to
introduce to the plugin's
classloader.
|
void |
setExecutions(java.util.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) |
void |
setExtensions(java.lang.String extensions)
Set whether to load Maven extensions (such as packaging and
type handlers) from
this plugin.
|
void |
setGoals(java.lang.Object goals)
Set Deprecated.
|
void |
setGroupId(java.lang.String groupId)
Set the group ID of the plugin in the repository.
|
void |
setVersion(java.lang.String version)
Set the version (or valid range of versions) of the plugin
to be used.
|
java.lang.String |
toString() |
getConfiguration, getInherited, getLocation, isInheritanceApplied, isInherited, setConfiguration, setInherited, setInherited, setLocation, unsetInheritanceAppliedprivate java.lang.String groupId
private java.lang.String artifactId
private java.lang.String version
private java.lang.String extensions
String for
technical reasons, the semantic type is actually
Boolean. Default value is
false.private java.util.List<PluginExecution> executions
private java.util.List<Dependency> dependencies
private java.lang.Object goals
private java.util.Map<java.lang.String,PluginExecution> executionMap
private java.lang.String key
public void addDependency(Dependency dependency)
dependency - public void addExecution(PluginExecution pluginExecution)
pluginExecution - public Plugin clone()
clone in class ConfigurationContainerpublic java.lang.String getArtifactId()
public java.util.List<Dependency> getDependencies()
public java.util.List<PluginExecution> getExecutions()
public java.lang.String getExtensions()
String for
technical reasons, the semantic type is actually
Boolean. Default value is
false.public java.lang.Object getGoals()
public java.lang.String getGroupId()
public java.lang.String getVersion()
public void removeDependency(Dependency dependency)
dependency - public void removeExecution(PluginExecution pluginExecution)
pluginExecution - public void setArtifactId(java.lang.String artifactId)
artifactId - public void setDependencies(java.util.List<Dependency> dependencies)
dependencies - public void setExecutions(java.util.List<PluginExecution> executions)
executions - public void setExtensions(java.lang.String extensions)
String for
technical reasons, the semantic type is actually
Boolean. Default value is
false.extensions - public void setGoals(java.lang.Object goals)
goals - public void setGroupId(java.lang.String groupId)
groupId - public void setVersion(java.lang.String version)
version - public boolean isExtensions()
public void setExtensions(boolean extensions)
public void flushExecutionMap()
executionMap field to nullpublic java.util.Map<java.lang.String,PluginExecution> getExecutionsAsMap()
PluginExecution#getId() as keyPluginExecution.getId()public java.lang.String getId()
<groupId>:<artifactId>:<version>, never null.public java.lang.String getKey()
groupId:artifactIdpublic static java.lang.String constructKey(java.lang.String groupId,
java.lang.String artifactId)
groupId - artifactId - groupId:artifactIdpublic boolean equals(java.lang.Object other)
equals in class java.lang.ObjectObject.equals(java.lang.Object)public int hashCode()
hashCode in class java.lang.ObjectObject.hashCode()public java.lang.String toString()
toString in class java.lang.ObjectObject.toString()