Package org.apache.maven.api.model
Class Exclusion
java.lang.Object
org.apache.maven.api.model.Exclusion
- All Implemented Interfaces:
Serializable,InputLocationTracker
@Experimental
@Generated
@ThreadSafe
@Immutable
public class Exclusion
extends Object
implements Serializable, InputLocationTracker
The
<exclusion> element contains informations required to exclude
an artifact to the project.
The groupId and artifactId fields are interpreted as glob patterns,
see FileSystem.getPathMatcher(java.lang.String).
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classBuilder class used to create Exclusion instances. -
Method Summary
Modifier and TypeMethodDescriptionThe artifact ID of the project to exclude.The group ID of the project to exclude.getLocation(Object key) Gets the location of the specified field in the input source.static Exclusion.BuilderCreates a newExclusionbuilder instance.static Exclusion.BuildernewBuilder(boolean withDefaults) Creates a newExclusionbuilder instance using default values or not.static Exclusion.BuildernewBuilder(Exclusion from) Creates a newExclusionbuilder instance using the specified object as a basis.static Exclusion.BuildernewBuilder(Exclusion from, boolean forceCopy) Creates a newExclusionbuilder instance using the specified object as a basis.static ExclusionCreates a newExclusioninstance.static ExclusionnewInstance(boolean withDefaults) Creates a newExclusioninstance using default values or not.with()Creates a new builder with this object as the basis.withArtifactId(String artifactId) Creates a newExclusioninstance using the specified artifactId.withGroupId(String groupId) Creates a newExclusioninstance using the specified groupId.
-
Method Details
-
getGroupId
The group ID of the project to exclude.- Returns:
- a
String
-
getArtifactId
The artifact ID of the project to exclude.- Returns:
- a
String
-
getLocation
Gets the location of the specified field in the input source.- Specified by:
getLocationin interfaceInputLocationTracker
-
with
Creates a new builder with this object as the basis.- Returns:
- a
Builder
-
withGroupId
Creates a newExclusioninstance using the specified groupId.- Parameters:
groupId- the newStringto use- Returns:
- a
Exclusionwith the specified groupId
-
withArtifactId
Creates a newExclusioninstance using the specified artifactId.- Parameters:
artifactId- the newStringto use- Returns:
- a
Exclusionwith the specified artifactId
-
newInstance
Creates a newExclusioninstance. Equivalent tonewInstance(true).- Returns:
- a new
Exclusion - See Also:
-
newInstance
Creates a newExclusioninstance using default values or not. Equivalent tonewBuilder(withDefaults).build().- Parameters:
withDefaults- the boolean indicating whether default values should be used- Returns:
- a new
Exclusion
-
newBuilder
Creates a newExclusionbuilder instance. Equivalent tonewBuilder(true).- Returns:
- a new
Builder - See Also:
-
newBuilder
Creates a newExclusionbuilder instance using default values or not.- Parameters:
withDefaults- the boolean indicating whether default values should be used- Returns:
- a new
Builder
-
newBuilder
Creates a newExclusionbuilder instance using the specified object as a basis. Equivalent tonewBuilder(from, false).- Parameters:
from- theExclusioninstance to use as a basis- Returns:
- a new
Builder
-
newBuilder
Creates a newExclusionbuilder instance using the specified object as a basis.- Parameters:
from- theExclusioninstance to use as a basisforceCopy- the boolean indicating if a copy should be forced- Returns:
- a new
Builder
-