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
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate String
private org.codehaus.plexus.classworlds.realm.ClassRealm
private org.eclipse.aether.graph.DependencyNode
private String
private String
private String
private boolean
private static final String
private String
private static final Pattern
private Plugin
private Artifact
private PluginDescriptor
private String
private String
private String
private String
-
Constructor Summary
ConstructorsConstructorDescriptionPluginDescriptor
(PluginDescriptor original) PluginDescriptor
(PluginDescriptor original) -
Method Summary
Modifier and TypeMethodDescriptionvoid
addMojo
(MojoDescriptor mojoDescriptor) void
addMojos
(List<MojoDescriptor> mojos) clone()
Creates a shallow copy of this plugin descriptor.private static List
<org.codehaus.plexus.component.repository.ComponentDescriptor<?>> clone
(List<MojoDescriptor> mojos, PluginDescriptor pluginDescriptor) static String
constructPluginKey
(String groupId, String artifactId, String version) boolean
The map of artifacts accessible by the versionlessKey, i.e.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
org.eclipse.aether.graph.DependencyNode
private InputStream
getDescriptorStream
(String descriptor) static String
getGoalPrefixFromArtifactId
(String artifactId) Parse maven-...-plugin.getId()
getLifecycleMapping
(String lifecycleId) getMojos()
getName()
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.int
hashCode()
boolean
void
setArtifactId
(String artifactId) void
setArtifacts
(List<Artifact> artifacts) void
setClassRealm
(org.codehaus.plexus.classworlds.realm.ClassRealm classRealm) void
setDependencyNode
(org.eclipse.aether.graph.DependencyNode dependencyNode) void
setDescription
(String description) void
setGoalPrefix
(String goalPrefix) void
setGroupId
(String groupId) void
setInheritedByDefault
(boolean inheritedByDefault) void
setIntroducedDependencyArtifacts
(Set<Artifact> introducedDependencyArtifacts) void
void
void
setPluginArtifact
(Artifact pluginArtifact) void
setRequiredJavaVersion
(String requiredJavaVersion) void
setRequiredMavenVersion
(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.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
-
Field Details
-
LIFECYCLE_DESCRIPTOR
- See Also:
-
PATTERN_FILTER_1
-
groupId
-
artifactId
-
version
-
goalPrefix
-
source
-
inheritedByDefault
private boolean inheritedByDefault -
artifacts
-
dependencyNode
private org.eclipse.aether.graph.DependencyNode dependencyNode -
classRealm
private org.codehaus.plexus.classworlds.realm.ClassRealm classRealm -
artifactMap
-
introducedDependencyArtifacts
-
name
-
description
-
requiredMavenVersion
-
requiredJavaVersion
-
plugin
-
pluginArtifact
-
lifecycleMappings
-
pluginDescriptorV4
-
-
Constructor Details
-
PluginDescriptor
public PluginDescriptor() -
PluginDescriptor
-
PluginDescriptor
-
-
Method Details
-
clone
private static List<org.codehaus.plexus.component.repository.ComponentDescriptor<?>> clone(List<MojoDescriptor> mojos, PluginDescriptor pluginDescriptor) -
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
-
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
-
getPlugin
-
getPluginArtifact
-
setPluginArtifact
-
getLifecycleMapping
- Throws:
IOException
XMLStreamException
-
getLifecycleMappings
- Throws:
IOException
XMLStreamException
-
getDescriptorStream
- Throws:
IOException
-
clone
Creates a shallow copy of this plugin descriptor. -
addMojos
- Throws:
DuplicateMojoDescriptorException
-
getPluginDescriptorV4
-