Class PluginDescriptor
java.lang.Object
org.apache.maven.api.plugin.descriptor.PluginDescriptor
- All Implemented Interfaces:
- Serializable
@Experimental
@Generated
@ThreadSafe
@Immutable
public class PluginDescriptor
extends Object
implements Serializable
Root element of the 
plugin.xml file.- See Also:
- 
Nested Class SummaryNested ClassesModifier and TypeClassDescriptionstatic classBuilder class used to create PluginDescriptor instances.
- 
Method SummaryModifier and TypeMethodDescriptionThe artifact id of the plugin.Description of the plugin.The group id of the plugin.getId()getMojos()Description of each Mojo provided by the plugin.getName()Name of the plugin.A version range which specifies the supported Java versions.A version range which specifies the supported Maven versions.The version of the plugin.booleanbooleanstatic PluginDescriptor.BuilderCreates a newPluginDescriptorbuilder instance.static PluginDescriptor.BuildernewBuilder(boolean withDefaults) Creates a newPluginDescriptorbuilder instance using default values or not.static PluginDescriptor.BuildernewBuilder(PluginDescriptor from) Creates a newPluginDescriptorbuilder instance using the specified object as a basis.static PluginDescriptor.BuildernewBuilder(PluginDescriptor from, boolean forceCopy) Creates a newPluginDescriptorbuilder instance using the specified object as a basis.static PluginDescriptorCreates a newPluginDescriptorinstance.static PluginDescriptornewInstance(boolean withDefaults) Creates a newPluginDescriptorinstance using default values or not.with()Creates a new builder with this object as the basis.withArtifactId(String artifactId) Creates a newPluginDescriptorinstance using the specified artifactId.withDescription(String description) Creates a newPluginDescriptorinstance using the specified description.withGoalPrefix(String goalPrefix) Creates a newPluginDescriptorinstance using the specified goalPrefix.withGroupId(String groupId) Creates a newPluginDescriptorinstance using the specified groupId.withInheritedByDefault(boolean inheritedByDefault) Creates a newPluginDescriptorinstance using the specified inheritedByDefault.withIsolatedRealm(boolean isolatedRealm) Creates a newPluginDescriptorinstance using the specified isolatedRealm.withMojos(Collection<MojoDescriptor> mojos) Creates a newPluginDescriptorinstance using the specified mojos.Creates a newPluginDescriptorinstance using the specified name.withRequiredJavaVersion(String requiredJavaVersion) Creates a newPluginDescriptorinstance using the specified requiredJavaVersion.withRequiredMavenVersion(String requiredMavenVersion) Creates a newPluginDescriptorinstance using the specified requiredMavenVersion.withVersion(String version) Creates a newPluginDescriptorinstance using the specified version.
- 
Method Details- 
getNamespaceUri
- 
getModelEncoding
- 
getNameName of the plugin.- Returns:
- a String
 
- 
getDescriptionDescription of the plugin.- Returns:
- a String
 
- 
getGroupIdThe group id of the plugin.- Returns:
- a String
 
- 
getArtifactIdThe artifact id of the plugin.- Returns:
- a String
 
- 
getVersionThe version of the plugin.- Returns:
- a String
 
- 
getGoalPrefix- Returns:
- a String
 
- 
isIsolatedRealmpublic boolean isIsolatedRealm()- Returns:
- a boolean
 
- 
isInheritedByDefaultpublic boolean isInheritedByDefault()- Returns:
- a boolean
 
- 
getRequiredJavaVersionA version range which specifies the supported Java versions. A version range can either use the usual mathematical syntax "[2.0.10,2.1.0),[3.0,)" or use a single version "2.2.1". The latter is a short form for "[2.2.1,)", i.e. denotes the minimum version required.- Returns:
- a String
- Since:
- Maven 4.0.0-alpha-3
 
- 
getRequiredMavenVersionA version range which specifies the supported Maven versions. A version range can either use the usual mathematical syntax "[2.0.10,2.1.0),[3.0,)" or use a single version "2.2.1". The latter is a short form for "[2.2.1,)", i.e. denotes the minimum version required. This value takes precedence over the POMs Maven prerequisite.- Returns:
- a String
- Since:
- Maven 4.0.0-alpha-3
 
- 
getMojosDescription of each Mojo provided by the plugin.- Returns:
- a List<MojoDescriptor>
 
- 
withCreates a new builder with this object as the basis.- Returns:
- a Builder
 
- 
withNameCreates a newPluginDescriptorinstance using the specified name.- Parameters:
- name- the new- Stringto use
- Returns:
- a PluginDescriptorwith the specified name
 
- 
withDescriptionCreates a newPluginDescriptorinstance using the specified description.- Parameters:
- description- the new- Stringto use
- Returns:
- a PluginDescriptorwith the specified description
 
- 
withGroupIdCreates a newPluginDescriptorinstance using the specified groupId.- Parameters:
- groupId- the new- Stringto use
- Returns:
- a PluginDescriptorwith the specified groupId
 
- 
withArtifactIdCreates a newPluginDescriptorinstance using the specified artifactId.- Parameters:
- artifactId- the new- Stringto use
- Returns:
- a PluginDescriptorwith the specified artifactId
 
- 
withVersionCreates a newPluginDescriptorinstance using the specified version.- Parameters:
- version- the new- Stringto use
- Returns:
- a PluginDescriptorwith the specified version
 
- 
withGoalPrefixCreates a newPluginDescriptorinstance using the specified goalPrefix.- Parameters:
- goalPrefix- the new- Stringto use
- Returns:
- a PluginDescriptorwith the specified goalPrefix
 
- 
withIsolatedRealmCreates a newPluginDescriptorinstance using the specified isolatedRealm.- Parameters:
- isolatedRealm- the new- booleanto use
- Returns:
- a PluginDescriptorwith the specified isolatedRealm
 
- 
withInheritedByDefaultCreates a newPluginDescriptorinstance using the specified inheritedByDefault.- Parameters:
- inheritedByDefault- the new- booleanto use
- Returns:
- a PluginDescriptorwith the specified inheritedByDefault
 
- 
withRequiredJavaVersionCreates a newPluginDescriptorinstance using the specified requiredJavaVersion.- Parameters:
- requiredJavaVersion- the new- Stringto use
- Returns:
- a PluginDescriptorwith the specified requiredJavaVersion
 
- 
withRequiredMavenVersionCreates a newPluginDescriptorinstance using the specified requiredMavenVersion.- Parameters:
- requiredMavenVersion- the new- Stringto use
- Returns:
- a PluginDescriptorwith the specified requiredMavenVersion
 
- 
withMojosCreates a newPluginDescriptorinstance using the specified mojos.- Parameters:
- mojos- the new- Collection<MojoDescriptor>to use
- Returns:
- a PluginDescriptorwith the specified mojos
 
- 
newInstanceCreates a newPluginDescriptorinstance. Equivalent tonewInstance(true).- Returns:
- a new PluginDescriptor
- See Also:
 
- 
newInstanceCreates a newPluginDescriptorinstance using default values or not. Equivalent tonewBuilder(withDefaults).build().- Parameters:
- withDefaults- the boolean indicating whether default values should be used
- Returns:
- a new PluginDescriptor
 
- 
newBuilderCreates a newPluginDescriptorbuilder instance. Equivalent tonewBuilder(true).- Returns:
- a new Builder
- See Also:
 
- 
newBuilderCreates a newPluginDescriptorbuilder instance using default values or not.- Parameters:
- withDefaults- the boolean indicating whether default values should be used
- Returns:
- a new Builder
 
- 
newBuilderCreates a newPluginDescriptorbuilder instance using the specified object as a basis. Equivalent tonewBuilder(from, false).- Parameters:
- from- the- PluginDescriptorinstance to use as a basis
- Returns:
- a new Builder
 
- 
newBuilder@Nonnull public static PluginDescriptor.Builder newBuilder(PluginDescriptor from, boolean forceCopy) Creates a newPluginDescriptorbuilder instance using the specified object as a basis.- Parameters:
- from- the- PluginDescriptorinstance to use as a basis
- forceCopy- the boolean indicating if a copy should be forced
- Returns:
- a new Builder
 
- 
getPluginLookupKey
- 
getId
 
-