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
Nested ClassesModifier and TypeClassDescriptionstatic classBuilder class used to create CoreExtension instances. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedCoreExtension(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.BuilderCreates a newCoreExtensionbuilder instance.static CoreExtension.BuildernewBuilder(boolean withDefaults) Creates a newCoreExtensionbuilder instance using default values or not.static CoreExtension.BuildernewBuilder(CoreExtension from) Creates a newCoreExtensionbuilder instance using the specified object as a basis.static CoreExtension.BuildernewBuilder(CoreExtension from, boolean forceCopy) Creates a newCoreExtensionbuilder instance using the specified object as a basis.static CoreExtensionCreates a newCoreExtensioninstance.static CoreExtensionnewInstance(boolean withDefaults) Creates a newCoreExtensioninstance using default values or not.with()Creates a new builder with this object as the basis.withArtifactId(String artifactId) Creates a newCoreExtensioninstance using the specified artifactId.withClassLoadingStrategy(String classLoadingStrategy) Creates a newCoreExtensioninstance using the specified classLoadingStrategy.withConfiguration(XmlNode configuration) Creates a newCoreExtensioninstance using the specified configuration.withGroupId(String groupId) Creates a newCoreExtensioninstance using the specified groupId.withVersion(String version) Creates a newCoreExtensioninstance 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 newCoreExtensioninstance using the specified groupId.- Parameters:
groupId- the newStringto use- Returns:
- a
CoreExtensionwith the specified groupId
-
withArtifactId
Creates a newCoreExtensioninstance using the specified artifactId.- Parameters:
artifactId- the newStringto use- Returns:
- a
CoreExtensionwith the specified artifactId
-
withVersion
Creates a newCoreExtensioninstance using the specified version.- Parameters:
version- the newStringto use- Returns:
- a
CoreExtensionwith the specified version
-
withClassLoadingStrategy
Creates a newCoreExtensioninstance using the specified classLoadingStrategy.- Parameters:
classLoadingStrategy- the newStringto use- Returns:
- a
CoreExtensionwith the specified classLoadingStrategy
-
withConfiguration
Creates a newCoreExtensioninstance using the specified configuration.- Parameters:
configuration- the newXmlNodeto use- Returns:
- a
CoreExtensionwith the specified configuration
-
newInstance
Creates a newCoreExtensioninstance. Equivalent tonewInstance(true).- Returns:
- a new
CoreExtension - See Also:
-
newInstance
Creates a newCoreExtensioninstance 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 newCoreExtensionbuilder instance. Equivalent tonewBuilder(true).- Returns:
- a new
Builder - See Also:
-
newBuilder
Creates a newCoreExtensionbuilder instance using default values or not.- Parameters:
withDefaults- the boolean indicating whether default values should be used- Returns:
- a new
Builder
-
newBuilder
Creates a newCoreExtensionbuilder instance using the specified object as a basis. Equivalent tonewBuilder(from, false).- Parameters:
from- theCoreExtensioninstance to use as a basis- Returns:
- a new
Builder
-
newBuilder
Creates a newCoreExtensionbuilder instance using the specified object as a basis.- Parameters:
from- theCoreExtensioninstance 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.
-