org.apache.maven.plugin.descriptor
Class PluginDescriptor
java.lang.Object
org.codehaus.plexus.component.repository.ComponentSetDescriptor
org.apache.maven.plugin.descriptor.PluginDescriptor
- All Implemented Interfaces:
- Cloneable
public class PluginDescriptor
- extends ComponentSetDescriptor
- implements Cloneable
- Author:
- Jason van Zyl
PluginDescriptor
public PluginDescriptor()
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()
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-2010 The Apache Software Foundation. All Rights Reserved.