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
Modifier and TypeClassDescriptionstatic class
Builder 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.boolean
boolean
static PluginDescriptor.Builder
Creates a newPluginDescriptor
builder instance.static PluginDescriptor.Builder
newBuilder
(boolean withDefaults) Creates a newPluginDescriptor
builder instance using default values or not.static PluginDescriptor.Builder
newBuilder
(PluginDescriptor from) Creates a newPluginDescriptor
builder instance using the specified object as a basis.static PluginDescriptor.Builder
newBuilder
(PluginDescriptor from, boolean forceCopy) Creates a newPluginDescriptor
builder instance using the specified object as a basis.static PluginDescriptor
Creates a newPluginDescriptor
instance.static PluginDescriptor
newInstance
(boolean withDefaults) Creates a newPluginDescriptor
instance using default values or not.with()
Creates a new builder with this object as the basis.withArtifactId
(String artifactId) Creates a newPluginDescriptor
instance using the specified artifactId.withDescription
(String description) Creates a newPluginDescriptor
instance using the specified description.withGoalPrefix
(String goalPrefix) Creates a newPluginDescriptor
instance using the specified goalPrefix.withGroupId
(String groupId) Creates a newPluginDescriptor
instance using the specified groupId.withInheritedByDefault
(boolean inheritedByDefault) Creates a newPluginDescriptor
instance using the specified inheritedByDefault.withIsolatedRealm
(boolean isolatedRealm) Creates a newPluginDescriptor
instance using the specified isolatedRealm.withMojos
(Collection<MojoDescriptor> mojos) Creates a newPluginDescriptor
instance using the specified mojos.Creates a newPluginDescriptor
instance using the specified name.withRequiredJavaVersion
(String requiredJavaVersion) Creates a newPluginDescriptor
instance using the specified requiredJavaVersion.withRequiredMavenVersion
(String requiredMavenVersion) Creates a newPluginDescriptor
instance using the specified requiredMavenVersion.withVersion
(String version) Creates a newPluginDescriptor
instance 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
- Since:
- Maven 4.0.0-alpha-3
-
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
- Since:
- Maven 4.0.0-alpha-3
-
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 newPluginDescriptor
instance using the specified name.- Parameters:
name
- the newString
to use- Returns:
- a
PluginDescriptor
with the specified name
-
withDescription
Creates a newPluginDescriptor
instance using the specified description.- Parameters:
description
- the newString
to use- Returns:
- a
PluginDescriptor
with the specified description
-
withGroupId
Creates a newPluginDescriptor
instance using the specified groupId.- Parameters:
groupId
- the newString
to use- Returns:
- a
PluginDescriptor
with the specified groupId
-
withArtifactId
Creates a newPluginDescriptor
instance using the specified artifactId.- Parameters:
artifactId
- the newString
to use- Returns:
- a
PluginDescriptor
with the specified artifactId
-
withVersion
Creates a newPluginDescriptor
instance using the specified version.- Parameters:
version
- the newString
to use- Returns:
- a
PluginDescriptor
with the specified version
-
withGoalPrefix
Creates a newPluginDescriptor
instance using the specified goalPrefix.- Parameters:
goalPrefix
- the newString
to use- Returns:
- a
PluginDescriptor
with the specified goalPrefix
-
withIsolatedRealm
Creates a newPluginDescriptor
instance using the specified isolatedRealm.- Parameters:
isolatedRealm
- the newboolean
to use- Returns:
- a
PluginDescriptor
with the specified isolatedRealm
-
withInheritedByDefault
Creates a newPluginDescriptor
instance using the specified inheritedByDefault.- Parameters:
inheritedByDefault
- the newboolean
to use- Returns:
- a
PluginDescriptor
with the specified inheritedByDefault
-
withRequiredJavaVersion
Creates a newPluginDescriptor
instance using the specified requiredJavaVersion.- Parameters:
requiredJavaVersion
- the newString
to use- Returns:
- a
PluginDescriptor
with the specified requiredJavaVersion
-
withRequiredMavenVersion
Creates a newPluginDescriptor
instance using the specified requiredMavenVersion.- Parameters:
requiredMavenVersion
- the newString
to use- Returns:
- a
PluginDescriptor
with the specified requiredMavenVersion
-
withMojos
Creates a newPluginDescriptor
instance using the specified mojos.- Parameters:
mojos
- the newCollection<MojoDescriptor>
to use- Returns:
- a
PluginDescriptor
with the specified mojos
-
newInstance
Creates a newPluginDescriptor
instance. Equivalent tonewInstance(true)
.- Returns:
- a new
PluginDescriptor
- See Also:
-
newInstance
Creates a newPluginDescriptor
instance 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 newPluginDescriptor
builder instance. Equivalent tonewBuilder(true)
.- Returns:
- a new
Builder
- See Also:
-
newBuilder
Creates a newPluginDescriptor
builder instance using default values or not.- Parameters:
withDefaults
- the boolean indicating whether default values should be used- Returns:
- a new
Builder
-
newBuilder
Creates a newPluginDescriptor
builder instance using the specified object as a basis. Equivalent tonewBuilder(from, false)
.- Parameters:
from
- thePluginDescriptor
instance to use as a basis- Returns:
- a new
Builder
-
newBuilder
@Nonnull public static PluginDescriptor.Builder newBuilder(PluginDescriptor from, boolean forceCopy) Creates a newPluginDescriptor
builder instance using the specified object as a basis.- Parameters:
from
- thePluginDescriptor
instance to use as a basisforceCopy
- the boolean indicating if a copy should be forced- Returns:
- a new
Builder
-
getPluginLookupKey
-
getId
-