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 org.codehaus.plexus.component.repository.ComponentSetDescriptor
implements Cloneable
- Author:
- Jason van Zyl
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
addMojo
(MojoDescriptor mojoDescriptor) clone()
Creates a shallow copy of this plugin descriptor.static String
constructPluginKey
(String groupId, String artifactId, String version) boolean
The map of artifacts accessible by the versionlessKey, i.e.List<org.apache.maven.artifact.Artifact>
Gets the artifacts that make up the plugin's class realm, excluding artifacts shadowed by the Maven core realm likemaven-project
.org.codehaus.plexus.classworlds.realm.ClassRealm
static String
static String
static String
getGoalPrefixFromArtifactId
(String artifactId) Parse maven-...-plugin.getId()
Set<org.apache.maven.artifact.Artifact>
getLifecycleMapping
(String lifecycleId) getMojos()
getName()
org.apache.maven.model.Plugin
org.apache.maven.artifact.Artifact
int
hashCode()
boolean
void
setArtifactId
(String artifactId) void
setArtifacts
(List<org.apache.maven.artifact.Artifact> artifacts) void
setClassRealm
(org.codehaus.plexus.classworlds.realm.ClassRealm classRealm) void
setDescription
(String description) void
setGoalPrefix
(String goalPrefix) void
setGroupId
(String groupId) void
setInheritedByDefault
(boolean inheritedByDefault) void
setIntroducedDependencyArtifacts
(Set<org.apache.maven.artifact.Artifact> introducedDependencyArtifacts) void
void
setPlugin
(org.apache.maven.model.Plugin plugin) void
setPluginArtifact
(org.apache.maven.artifact.Artifact pluginArtifact) void
setRequiredMavenVersion
(String requiredMavenVersion) void
void
setVersion
(String version) Methods inherited from class org.codehaus.plexus.component.repository.ComponentSetDescriptor
addComponentDescriptor, addDependency, getComponents, getDependencies, isIsolatedRealm, setComponents, setDependencies, setId, setIsolatedRealm, toString
-
Constructor Details
-
PluginDescriptor
public PluginDescriptor()
-
-
Method Details
-
getMojos
-
addMojo
- Throws:
DuplicateMojoDescriptorException
-
getGroupId
-
setGroupId
-
getArtifactId
-
setArtifactId
-
constructPluginKey
-
getPluginLookupKey
-
getId
-
getDefaultPluginArtifactId
-
getDefaultPluginGroupId
-
getGoalPrefixFromArtifactId
Parse maven-...-plugin. TODO move to plugin-tools-api as a default only -
getGoalPrefix
-
setGoalPrefix
-
setVersion
-
getVersion
-
setSource
-
getSource
-
isInheritedByDefault
public boolean isInheritedByDefault() -
setInheritedByDefault
public void setInheritedByDefault(boolean inheritedByDefault) -
getArtifacts
Gets the artifacts that make up the plugin's class realm, excluding artifacts shadowed by the Maven core realm likemaven-project
.- Returns:
- The plugin artifacts, never
null
.
-
setArtifacts
-
getArtifactMap
The map of artifacts accessible by the versionlessKey, i.e. groupId:artifactId- Returns:
- a Map of artifacts, never
null
- See Also:
-
equals
-
hashCode
public int hashCode() -
getMojo
-
setClassRealm
public void setClassRealm(org.codehaus.plexus.classworlds.realm.ClassRealm classRealm) -
getClassRealm
public org.codehaus.plexus.classworlds.realm.ClassRealm getClassRealm() -
setIntroducedDependencyArtifacts
public void setIntroducedDependencyArtifacts(Set<org.apache.maven.artifact.Artifact> introducedDependencyArtifacts) -
getIntroducedDependencyArtifacts
-
setName
-
getName
-
setDescription
-
getDescription
-
setRequiredMavenVersion
-
getRequiredMavenVersion
-
setPlugin
public void setPlugin(org.apache.maven.model.Plugin plugin) -
getPlugin
public org.apache.maven.model.Plugin getPlugin() -
getPluginArtifact
public org.apache.maven.artifact.Artifact getPluginArtifact() -
setPluginArtifact
public void setPluginArtifact(org.apache.maven.artifact.Artifact pluginArtifact) -
getLifecycleMapping
public Lifecycle getLifecycleMapping(String lifecycleId) throws IOException, org.codehaus.plexus.util.xml.pull.XmlPullParserException - Throws:
IOException
org.codehaus.plexus.util.xml.pull.XmlPullParserException
-
clone
Creates a shallow copy of this plugin descriptor.
-