org.apache.maven.plugin.descriptor
Class PluginDescriptor

java.lang.Object
  extended by org.codehaus.plexus.component.repository.ComponentSetDescriptor
      extended by org.apache.maven.plugin.descriptor.PluginDescriptor
All Implemented Interfaces:
Cloneable

public class PluginDescriptor
extends ComponentSetDescriptor
implements Cloneable

Author:
Jason van Zyl

Constructor Summary
PluginDescriptor()
           
 
Method Summary
 void addMojo(MojoDescriptor mojoDescriptor)
           
 PluginDescriptor clone()
          Creates a shallow copy of this plugin descriptor.
static String constructPluginKey(String groupId, String artifactId, String version)
           
 boolean equals(Object object)
           
 String getArtifactId()
           
 Map<String,Artifact> getArtifactMap()
           
 List<Artifact> getArtifacts()
          Gets the artifacts that make up the plugin's class realm, excluding artifacts shadowed by the Maven core realm like maven-project.
 ClassRealm getClassRealm()
           
static String getDefaultPluginArtifactId(String id)
           
static String getDefaultPluginGroupId()
           
 String getDescription()
           
 String getGoalPrefix()
           
static String getGoalPrefixFromArtifactId(String artifactId)
          Parse maven-...
 String getGroupId()
           
 String getId()
           
 Set<Artifact> getIntroducedDependencyArtifacts()
           
 Lifecycle getLifecycleMapping(String lifecycleId)
           
 MojoDescriptor getMojo(String goal)
           
 List<MojoDescriptor> getMojos()
           
 String getName()
           
 Plugin getPlugin()
           
 Artifact getPluginArtifact()
           
 String getPluginLookupKey()
           
 String getRequiredMavenVersion()
           
 String getSource()
           
 String getVersion()
           
 int hashCode()
           
 boolean isInheritedByDefault()
           
 void setArtifactId(String artifactId)
           
 void setArtifacts(List<Artifact> artifacts)
           
 void setClassRealm(ClassRealm classRealm)
           
 void setDescription(String description)
           
 void setGoalPrefix(String goalPrefix)
           
 void setGroupId(String groupId)
           
 void setInheritedByDefault(boolean inheritedByDefault)
           
 void setIntroducedDependencyArtifacts(Set<Artifact> introducedDependencyArtifacts)
           
 void setName(String name)
           
 void setPlugin(Plugin plugin)
           
 void setPluginArtifact(Artifact pluginArtifact)
           
 void setRequiredMavenVersion(String requiredMavenVersion)
           
 void setSource(String source)
           
 void setVersion(String version)
           
 
Methods inherited from class org.codehaus.plexus.component.repository.ComponentSetDescriptor
addComponentDescriptor, addDependency, getComponents, getDependencies, isIsolatedRealm, setComponents, setDependencies, setId, setIsolatedRealm, toString
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

PluginDescriptor

public PluginDescriptor()
Method Detail

getMojos

public List<MojoDescriptor> getMojos()

addMojo

public void addMojo(MojoDescriptor mojoDescriptor)
             throws DuplicateMojoDescriptorException
Throws:
DuplicateMojoDescriptorException

getGroupId

public String getGroupId()

setGroupId

public void setGroupId(String groupId)

getArtifactId

public String getArtifactId()

setArtifactId

public void setArtifactId(String artifactId)

constructPluginKey

public static String constructPluginKey(String groupId,
                                        String artifactId,
                                        String version)

getPluginLookupKey

public String getPluginLookupKey()

getId

public String getId()

getDefaultPluginArtifactId

public static String getDefaultPluginArtifactId(String id)

getDefaultPluginGroupId

public static String getDefaultPluginGroupId()

getGoalPrefixFromArtifactId

public static String getGoalPrefixFromArtifactId(String artifactId)
Parse maven-...-plugin.


getGoalPrefix

public String getGoalPrefix()

setGoalPrefix

public void setGoalPrefix(String goalPrefix)

setVersion

public void setVersion(String version)

getVersion

public String getVersion()

setSource

public void setSource(String source)

getSource

public String getSource()

isInheritedByDefault

public boolean isInheritedByDefault()

setInheritedByDefault

public void setInheritedByDefault(boolean inheritedByDefault)

getArtifacts

public List<Artifact> getArtifacts()
Gets the artifacts that make up the plugin's class realm, excluding artifacts shadowed by the Maven core realm like maven-project.

Returns:
The plugin artifacts, never null.

setArtifacts

public void setArtifacts(List<Artifact> artifacts)

getArtifactMap

public Map<String,Artifact> getArtifactMap()

equals

public boolean equals(Object object)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object

getMojo

public MojoDescriptor getMojo(String goal)

setClassRealm

public void setClassRealm(ClassRealm classRealm)

getClassRealm

public ClassRealm getClassRealm()

setIntroducedDependencyArtifacts

public void setIntroducedDependencyArtifacts(Set<Artifact> introducedDependencyArtifacts)

getIntroducedDependencyArtifacts

public Set<Artifact> getIntroducedDependencyArtifacts()

setName

public void setName(String name)

getName

public String getName()

setDescription

public void setDescription(String description)

getDescription

public String getDescription()

setRequiredMavenVersion

public void setRequiredMavenVersion(String requiredMavenVersion)

getRequiredMavenVersion

public String getRequiredMavenVersion()

setPlugin

public void setPlugin(Plugin plugin)

getPlugin

public Plugin getPlugin()

getPluginArtifact

public Artifact getPluginArtifact()

setPluginArtifact

public void setPluginArtifact(Artifact pluginArtifact)

getLifecycleMapping

public Lifecycle getLifecycleMapping(String lifecycleId)
                              throws IOException,
                                     XmlPullParserException
Throws:
IOException
XmlPullParserException

clone

public PluginDescriptor clone()
Creates a shallow copy of this plugin descriptor.

Overrides:
clone in class Object


Copyright © 2001-2011 The Apache Software Foundation. All Rights Reserved.