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
-
Constructor Summary
ConstructorsConstructorDescriptionPluginDescriptor(org.apache.maven.api.plugin.descriptor.PluginDescriptor original) PluginDescriptor(PluginDescriptor original) -
Method Summary
Modifier and TypeMethodDescriptionvoidaddMojo(MojoDescriptor mojoDescriptor) voidaddMojos(List<MojoDescriptor> mojos) clone()Creates a shallow copy of this plugin descriptor.static StringconstructPluginKey(String groupId, String artifactId, String version) booleanThe 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.ClassRealmstatic Stringstatic Stringorg.eclipse.aether.graph.DependencyNodestatic StringgetGoalPrefixFromArtifactId(String artifactId) Parse maven-...-plugin.getId()Set<org.apache.maven.artifact.Artifact>org.apache.maven.api.plugin.descriptor.lifecycle.LifecyclegetLifecycleMapping(String lifecycleId) getMojos()getName()org.apache.maven.model.Pluginorg.apache.maven.artifact.Artifactorg.apache.maven.api.plugin.descriptor.PluginDescriptorGet required Maven version, as defined in plugin's pom.xml since 3.0.2, as defined in plugin.xml since 4.0.0-alpha-3.inthashCode()booleanvoidsetArtifactId(String artifactId) voidsetArtifacts(List<org.apache.maven.artifact.Artifact> artifacts) voidsetClassRealm(org.codehaus.plexus.classworlds.realm.ClassRealm classRealm) voidsetDependencyNode(org.eclipse.aether.graph.DependencyNode dependencyNode) voidsetDescription(String description) voidsetGoalPrefix(String goalPrefix) voidsetGroupId(String groupId) voidsetInheritedByDefault(boolean inheritedByDefault) voidsetIntroducedDependencyArtifacts(Set<org.apache.maven.artifact.Artifact> introducedDependencyArtifacts) voidvoidsetPlugin(org.apache.maven.model.Plugin plugin) voidsetPluginArtifact(org.apache.maven.artifact.Artifact pluginArtifact) voidsetRequiredJavaVersion(String requiredJavaVersion) voidsetRequiredMavenVersion(String requiredMavenVersion) Set required Maven version, as defined in plugin's pom.xml since 3.0.2, as defined in plugin.xml since 4.0.0-alpha-3.voidvoidsetVersion(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() -
PluginDescriptor
-
PluginDescriptor
public PluginDescriptor(org.apache.maven.api.plugin.descriptor.PluginDescriptor original)
-
-
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
-
getDependencyNode
public org.eclipse.aether.graph.DependencyNode getDependencyNode() -
setDependencyNode
public void setDependencyNode(org.eclipse.aether.graph.DependencyNode dependencyNode) -
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
Set required Maven version, as defined in plugin's pom.xml since 3.0.2, as defined in plugin.xml since 4.0.0-alpha-3.- Parameters:
requiredMavenVersion- Maven version required by the plugin- Since:
- 3.0.2
-
getRequiredMavenVersion
Get required Maven version, as defined in plugin's pom.xml since 3.0.2, as defined in plugin.xml since 4.0.0-alpha-3.- Returns:
- the Maven version required by the plugin
- Since:
- 3.0.2
-
setRequiredJavaVersion
-
getRequiredJavaVersion
-
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 org.apache.maven.api.plugin.descriptor.lifecycle.Lifecycle getLifecycleMapping(String lifecycleId) throws IOException, XMLStreamException - Throws:
IOExceptionXMLStreamException
-
getLifecycleMappings
public Map<String,org.apache.maven.api.plugin.descriptor.lifecycle.Lifecycle> getLifecycleMappings() throws IOException, XMLStreamException- Throws:
IOExceptionXMLStreamException
-
clone
Creates a shallow copy of this plugin descriptor. -
addMojos
- Throws:
DuplicateMojoDescriptorException
-
getPluginDescriptorV4
public org.apache.maven.api.plugin.descriptor.PluginDescriptor getPluginDescriptorV4()
-