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 Summary
Nested ClassesModifier and TypeClassDescriptionstatic classBuilder class used to create PluginDescriptor instances. -
Method Summary
Modifier 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
-
getName
Name of the plugin.- Returns:
- a
String
-
getDescription
Description of the plugin.- Returns:
- a
String
-
getGroupId
The group id of the plugin.- Returns:
- a
String
-
getArtifactId
The artifact id of the plugin.- Returns:
- a
String
-
getVersion
The version of the plugin.- Returns:
- a
String
-
getGoalPrefix
- Returns:
- a
String
-
isIsolatedRealm
public boolean isIsolatedRealm()- Returns:
- a
boolean
-
isInheritedByDefault
public boolean isInheritedByDefault()- Returns:
- a
boolean
-
getRequiredJavaVersion
A 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
-
getRequiredMavenVersion
A 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
-
getMojos
Description of each Mojo provided by the plugin.- Returns:
- a
List<MojoDescriptor>
-
with
Creates a new builder with this object as the basis.- Returns:
- a
Builder
-
withName
Creates a newPluginDescriptorinstance using the specified name.- Parameters:
name- the newStringto use- Returns:
- a
PluginDescriptorwith the specified name
-
withDescription
Creates a newPluginDescriptorinstance using the specified description.- Parameters:
description- the newStringto use- Returns:
- a
PluginDescriptorwith the specified description
-
withGroupId
Creates a newPluginDescriptorinstance using the specified groupId.- Parameters:
groupId- the newStringto use- Returns:
- a
PluginDescriptorwith the specified groupId
-
withArtifactId
Creates a newPluginDescriptorinstance using the specified artifactId.- Parameters:
artifactId- the newStringto use- Returns:
- a
PluginDescriptorwith the specified artifactId
-
withVersion
Creates a newPluginDescriptorinstance using the specified version.- Parameters:
version- the newStringto use- Returns:
- a
PluginDescriptorwith the specified version
-
withGoalPrefix
Creates a newPluginDescriptorinstance using the specified goalPrefix.- Parameters:
goalPrefix- the newStringto use- Returns:
- a
PluginDescriptorwith the specified goalPrefix
-
withIsolatedRealm
Creates a newPluginDescriptorinstance using the specified isolatedRealm.- Parameters:
isolatedRealm- the newbooleanto use- Returns:
- a
PluginDescriptorwith the specified isolatedRealm
-
withInheritedByDefault
Creates a newPluginDescriptorinstance using the specified inheritedByDefault.- Parameters:
inheritedByDefault- the newbooleanto use- Returns:
- a
PluginDescriptorwith the specified inheritedByDefault
-
withRequiredJavaVersion
Creates a newPluginDescriptorinstance using the specified requiredJavaVersion.- Parameters:
requiredJavaVersion- the newStringto use- Returns:
- a
PluginDescriptorwith the specified requiredJavaVersion
-
withRequiredMavenVersion
Creates a newPluginDescriptorinstance using the specified requiredMavenVersion.- Parameters:
requiredMavenVersion- the newStringto use- Returns:
- a
PluginDescriptorwith the specified requiredMavenVersion
-
withMojos
Creates a newPluginDescriptorinstance using the specified mojos.- Parameters:
mojos- the newCollection<MojoDescriptor>to use- Returns:
- a
PluginDescriptorwith the specified mojos
-
newInstance
Creates a newPluginDescriptorinstance. Equivalent tonewInstance(true).- Returns:
- a new
PluginDescriptor - See Also:
-
newInstance
Creates 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
-
newBuilder
Creates a newPluginDescriptorbuilder instance. Equivalent tonewBuilder(true).- Returns:
- a new
Builder - See Also:
-
newBuilder
Creates a newPluginDescriptorbuilder instance using default values or not.- Parameters:
withDefaults- the boolean indicating whether default values should be used- Returns:
- a new
Builder
-
newBuilder
Creates a newPluginDescriptorbuilder instance using the specified object as a basis. Equivalent tonewBuilder(from, false).- Parameters:
from- thePluginDescriptorinstance 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- thePluginDescriptorinstance to use as a basisforceCopy- the boolean indicating if a copy should be forced- Returns:
- a new
Builder
-
getPluginLookupKey
-
getId
-