Package org.apache.maven.model
Class Plugin
java.lang.Object
org.apache.maven.model.BaseObject
org.apache.maven.model.ConfigurationContainer
org.apache.maven.model.Plugin
- All Implemented Interfaces:
Serializable
,Cloneable
,InputLocationTracker
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class org.apache.maven.model.BaseObject
BaseObject.ChildrenTracking
-
Field Summary
Fields inherited from class org.apache.maven.model.BaseObject
childrenTracking, delegate
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addDependency
(Dependency dependency) void
addExecution
(PluginExecution execution) clone()
static String
constructKey
(String groupId, String artifactId) boolean
void
Reset theexecutionMap
field tonull
getId()
Gets the identifier of the plugin.getKey()
getLocation
(Object key) Gets the location of the specified field in the input source.int
hashCode()
boolean
pluginToApiV3
(List<Plugin> list) pluginToApiV4
(List<Plugin> list) void
removeDependency
(Dependency dependency) void
removeExecution
(PluginExecution execution) protected boolean
void
setArtifactId
(String artifactId) void
setDependencies
(List<Dependency> dependencies) void
setExecutions
(List<PluginExecution> executions) void
setExtensions
(boolean extensions) void
setExtensions
(String extensions) void
setGroupId
(String groupId) void
setLocation
(Object key, InputLocation location) Sets the location of the specified field.void
setVersion
(String version) Methods inherited from class org.apache.maven.model.ConfigurationContainer
configurationContainerToApiV3, configurationContainerToApiV4, getConfiguration, getInherited, isInherited, setConfiguration, setInherited
Methods inherited from class org.apache.maven.model.BaseObject
update
-
Constructor Details
-
Plugin
public Plugin() -
Plugin
-
Plugin
-
-
Method Details
-
clone
- Overrides:
clone
in classConfigurationContainer
-
getDelegate
- Overrides:
getDelegate
in classConfigurationContainer
-
equals
- Overrides:
equals
in classConfigurationContainer
-
hashCode
public int hashCode()- Overrides:
hashCode
in classConfigurationContainer
-
getGroupId
-
setGroupId
-
getArtifactId
-
setArtifactId
-
getVersion
-
setVersion
-
getExtensions
-
setExtensions
-
getExecutions
-
setExecutions
-
addExecution
-
removeExecution
-
getDependencies
-
setDependencies
-
addDependency
-
removeDependency
-
getLocation
Description copied from interface:InputLocationTracker
Gets the location of the specified field in the input source.- Specified by:
getLocation
in interfaceInputLocationTracker
- Overrides:
getLocation
in classConfigurationContainer
- Parameters:
key
- The key of the field, must not benull
.- Returns:
- The location of the field in the input source or
null
if unknown.
-
setLocation
Description copied from interface:InputLocationTracker
Sets the location of the specified field.- Specified by:
setLocation
in interfaceInputLocationTracker
- Overrides:
setLocation
in classConfigurationContainer
- Parameters:
key
- The key of the field, must not benull
.location
- The location of the field, may benull
.
-
replace
- Overrides:
replace
in classConfigurationContainer
-
pluginToApiV4
-
pluginToApiV3
-
isExtensions
public boolean isExtensions() -
setExtensions
public void setExtensions(boolean extensions) -
flushExecutionMap
public void flushExecutionMap()Reset theexecutionMap
field tonull
-
getExecutionsAsMap
- Returns:
- a Map of executions field with
PluginExecution#getId()
as key - See Also:
-
getId
Gets 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 repositoryartifactId
- the artifact ID of the reporting plugin in the repository- Returns:
- the key of the plugin, ie
groupId:artifactId
-