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.- See Also:
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
Builder 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.Builder
Creates a newExclusion
builder instance.static Exclusion.Builder
newBuilder
(boolean withDefaults) Creates a newExclusion
builder instance using default values or not.static Exclusion.Builder
newBuilder
(Exclusion from) Creates a newExclusion
builder instance using the specified object as a basis.static Exclusion.Builder
newBuilder
(Exclusion from, boolean forceCopy) Creates a newExclusion
builder instance using the specified object as a basis.static Exclusion
Creates a newExclusion
instance.static Exclusion
newInstance
(boolean withDefaults) Creates a newExclusion
instance using default values or not.with()
Creates a new builder with this object as the basis.withArtifactId
(String artifactId) Creates a newExclusion
instance using the specified artifactId.withGroupId
(String groupId) Creates a newExclusion
instance 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:
getLocation
in interfaceInputLocationTracker
-
with
Creates a new builder with this object as the basis.- Returns:
- a
Builder
-
withGroupId
Creates a newExclusion
instance using the specified groupId.- Parameters:
groupId
- the newString
to use- Returns:
- a
Exclusion
with the specified groupId
-
withArtifactId
Creates a newExclusion
instance using the specified artifactId.- Parameters:
artifactId
- the newString
to use- Returns:
- a
Exclusion
with the specified artifactId
-
newInstance
Creates a newExclusion
instance. Equivalent tonewInstance( true )
.- Returns:
- a new
Exclusion
- See Also:
-
newInstance
Creates a newExclusion
instance 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 newExclusion
builder instance. Equivalent tonewBuilder( true )
.- Returns:
- a new
Builder
- See Also:
-
newBuilder
Creates a newExclusion
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 newExclusion
builder instance using the specified object as a basis. Equivalent tonewBuilder( from, false )
.- Parameters:
from
- theExclusion
instance to use as a basis- Returns:
- a new
Builder
-
newBuilder
Creates a newExclusion
builder instance using the specified object as a basis.- Parameters:
from
- theExclusion
instance to use as a basisforceCopy
- the boolean indicating if a copy should be forced- Returns:
- a new
Builder
-