org.apache.maven.model
Class Plugin

java.lang.Object
  extended by org.apache.maven.model.ConfigurationContainer
      extended by org.apache.maven.model.Plugin
All Implemented Interfaces:
java.io.Serializable

public class Plugin
extends ConfigurationContainer
implements java.io.Serializable

The <plugin> element contains informations required for a plugin.

Version:
$Revision$ $Date$
See Also:
Serialized Form

Constructor Summary
Plugin()
           
 
Method Summary
 void addDependency(Dependency dependency)
          Method addDependency
 void addExecution(PluginExecution pluginExecution)
          Method addExecution
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 getDependencies()
          Method getDependencies
 java.util.List getExecutions()
          Method getExecutions
 java.util.Map getExecutionsAsMap()
           
 java.lang.Object getGoals()
          Get Deprecated.
 java.lang.String getGroupId()
          Get The group ID of the plugin in the repository.
 java.lang.String getKey()
           
 java.lang.String getModelEncoding()
           
 java.lang.String getVersion()
          Get The version (or valid range of verisons) of the plugin to be used.
 int hashCode()
           
 boolean isExtensions()
          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(java.lang.String artifactId)
          Set The artifact ID of the plugin in the repository.
 void setDependencies(java.util.List dependencies)
          Set Additional dependencies that this project needs to introduce to the plugin's classloader.
 void setExecutions(java.util.List executions)
          Set Multiple specifications of a set of goals to execute during the build lifecycle, each having (possibly) different configuration.
 void setExtensions(boolean 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 setModelEncoding(java.lang.String modelEncoding)
           
 void setVersion(java.lang.String version)
          Set The version (or valid range of verisons) of the plugin to be used.
 java.lang.String toString()
           
 
Methods inherited from class org.apache.maven.model.ConfigurationContainer
getConfiguration, getInherited, isInheritanceApplied, setConfiguration, setInherited, unsetInheritanceApplied
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Plugin

public Plugin()
Method Detail

addDependency

public void addDependency(Dependency dependency)
Method addDependency

Parameters:
dependency -

addExecution

public void addExecution(PluginExecution pluginExecution)
Method addExecution

Parameters:
pluginExecution -

getArtifactId

public java.lang.String getArtifactId()
Get The artifact ID of the plugin in the repository.


getDependencies

public java.util.List getDependencies()
Method getDependencies


getExecutions

public java.util.List getExecutions()
Method getExecutions


getGoals

public java.lang.Object getGoals()
Get Deprecated. Unused by Maven.


getGroupId

public java.lang.String getGroupId()
Get The group ID of the plugin in the repository.


getVersion

public java.lang.String getVersion()
Get The version (or valid range of verisons) of the plugin to be used.


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.


removeDependency

public void removeDependency(Dependency dependency)
Method removeDependency

Parameters:
dependency -

removeExecution

public void removeExecution(PluginExecution pluginExecution)
Method removeExecution

Parameters:
pluginExecution -

setArtifactId

public void setArtifactId(java.lang.String artifactId)
Set The artifact ID of the plugin in the repository.

Parameters:
artifactId -

setDependencies

public void setDependencies(java.util.List dependencies)
Set Additional dependencies that this project needs to introduce to the plugin's classloader.

Parameters:
dependencies -

setExecutions

public void setExecutions(java.util.List executions)
Set Multiple specifications of a set of goals to execute during the build lifecycle, each having (possibly) 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

public void setGoals(java.lang.Object goals)
Set Deprecated. Unused by Maven.

Parameters:
goals -

setGroupId

public void setGroupId(java.lang.String groupId)
Set The group ID of the plugin in the repository.

Parameters:
groupId -

setVersion

public void setVersion(java.lang.String version)
Set The version (or valid range of verisons) of the plugin to be used.

Parameters:
version -

flushExecutionMap

public void flushExecutionMap()
Reset the executionMap field to null


getExecutionsAsMap

public java.util.Map getExecutionsAsMap()
Returns:
a Map of executions field with PluginExecution#getId() as key
See Also:
PluginExecution.getId()

getKey

public java.lang.String getKey()
Returns:
the key of the plugin, ie groupId:artifactId

constructKey

public static java.lang.String constructKey(java.lang.String groupId,
                                            java.lang.String artifactId)
Parameters:
groupId -
artifactId -
Returns:
the key of the plugin, ie groupId:artifactId

equals

public boolean equals(java.lang.Object other)
Overrides:
equals in class java.lang.Object
See Also:
Object.equals(java.lang.Object)

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object
See Also:
Object.hashCode()

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object
See Also:
Object.toString()

setModelEncoding

public void setModelEncoding(java.lang.String modelEncoding)
Overrides:
setModelEncoding in class ConfigurationContainer

getModelEncoding

public java.lang.String getModelEncoding()
Overrides:
getModelEncoding in class ConfigurationContainer


Copyright © 2001-2009 Apache Software Foundation. All Rights Reserved.