Class CoreExtension
java.lang.Object
org.apache.maven.api.cli.extensions.CoreExtension
- All Implemented Interfaces:
Serializable
@Experimental
@Generated
@ThreadSafe
@Immutable
public class CoreExtension
extends Object
implements Serializable
Describes a build extension to utilise.
- See Also:
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
Builder class used to create CoreExtension instances. -
Constructor Summary
ModifierConstructorDescriptionprotected
CoreExtension
(CoreExtension.Builder builder) Constructor for this class, to be called from its subclasses andCoreExtension.Builder
. -
Method Summary
Modifier and TypeMethodDescriptionThe artifact ID of the extension.The class loading strategy: 'self-first' (the default), 'parent-first' (loads classes from the parent, then from the extension) or 'plugin' (follows the rules from extensions defined as plugins).The group ID of the extension's artifact.getId()
Gets the identifier of the extension.The version of the extension.static CoreExtension.Builder
Creates a newCoreExtension
builder instance.static CoreExtension.Builder
newBuilder
(boolean withDefaults) Creates a newCoreExtension
builder instance using default values or not.static CoreExtension.Builder
newBuilder
(CoreExtension from) Creates a newCoreExtension
builder instance using the specified object as a basis.static CoreExtension.Builder
newBuilder
(CoreExtension from, boolean forceCopy) Creates a newCoreExtension
builder instance using the specified object as a basis.static CoreExtension
Creates a newCoreExtension
instance.static CoreExtension
newInstance
(boolean withDefaults) Creates a newCoreExtension
instance using default values or not.with()
Creates a new builder with this object as the basis.withArtifactId
(String artifactId) Creates a newCoreExtension
instance using the specified artifactId.withClassLoadingStrategy
(String classLoadingStrategy) Creates a newCoreExtension
instance using the specified classLoadingStrategy.withConfiguration
(XmlNode configuration) Creates a newCoreExtension
instance using the specified configuration.withGroupId
(String groupId) Creates a newCoreExtension
instance using the specified groupId.withVersion
(String version) Creates a newCoreExtension
instance using the specified version.
-
Constructor Details
-
CoreExtension
Constructor for this class, to be called from its subclasses andCoreExtension.Builder
.- See Also:
-
-
Method Details
-
getGroupId
The group ID of the extension's artifact.- Returns:
- a
String
-
getArtifactId
The artifact ID of the extension.- Returns:
- a
String
-
getVersion
The version of the extension.- Returns:
- a
String
-
getClassLoadingStrategy
The class loading strategy: 'self-first' (the default), 'parent-first' (loads classes from the parent, then from the extension) or 'plugin' (follows the rules from extensions defined as plugins).- Returns:
- a
String
-
getConfiguration
- Returns:
- a
XmlNode
-
with
Creates a new builder with this object as the basis.- Returns:
- a
Builder
-
withGroupId
Creates a newCoreExtension
instance using the specified groupId.- Parameters:
groupId
- the newString
to use- Returns:
- a
CoreExtension
with the specified groupId
-
withArtifactId
Creates a newCoreExtension
instance using the specified artifactId.- Parameters:
artifactId
- the newString
to use- Returns:
- a
CoreExtension
with the specified artifactId
-
withVersion
Creates a newCoreExtension
instance using the specified version.- Parameters:
version
- the newString
to use- Returns:
- a
CoreExtension
with the specified version
-
withClassLoadingStrategy
Creates a newCoreExtension
instance using the specified classLoadingStrategy.- Parameters:
classLoadingStrategy
- the newString
to use- Returns:
- a
CoreExtension
with the specified classLoadingStrategy
-
withConfiguration
Creates a newCoreExtension
instance using the specified configuration.- Parameters:
configuration
- the newXmlNode
to use- Returns:
- a
CoreExtension
with the specified configuration
-
newInstance
Creates a newCoreExtension
instance. Equivalent tonewInstance(true)
.- Returns:
- a new
CoreExtension
- See Also:
-
newInstance
Creates a newCoreExtension
instance using default values or not. Equivalent tonewBuilder(withDefaults).build()
.- Parameters:
withDefaults
- the boolean indicating whether default values should be used- Returns:
- a new
CoreExtension
-
newBuilder
Creates a newCoreExtension
builder instance. Equivalent tonewBuilder(true)
.- Returns:
- a new
Builder
- See Also:
-
newBuilder
Creates a newCoreExtension
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 newCoreExtension
builder instance using the specified object as a basis. Equivalent tonewBuilder(from, false)
.- Parameters:
from
- theCoreExtension
instance to use as a basis- Returns:
- a new
Builder
-
newBuilder
Creates a newCoreExtension
builder instance using the specified object as a basis.- Parameters:
from
- theCoreExtension
instance to use as a basisforceCopy
- the boolean indicating if a copy should be forced- Returns:
- a new
Builder
-
getId
Gets the identifier of the extension.- Returns:
- The extension id in the form
<groupId>:<artifactId>:<version>
, nevernull
.
-