Package org.apache.maven.api.model
Class Relocation
java.lang.Object
org.apache.maven.api.model.Relocation
- All Implemented Interfaces:
Serializable,InputLocationTracker
@Experimental
@Generated
@ThreadSafe
@Immutable
public class Relocation
extends Object
implements Serializable, InputLocationTracker
Describes where an artifact has moved to. If any of the values are omitted, it is
assumed to be the same as it was before.
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classBuilder class used to create Relocation instances. -
Method Summary
Modifier and TypeMethodDescriptionThe new artifact ID of the artifact.The group ID the artifact has moved to.getLocation(Object key) Gets the location of the specified field in the input source.An additional message to show the user about the move, such as the reason.The new version of the artifact.static Relocation.BuilderCreates a newRelocationbuilder instance.static Relocation.BuildernewBuilder(boolean withDefaults) Creates a newRelocationbuilder instance using default values or not.static Relocation.BuildernewBuilder(Relocation from) Creates a newRelocationbuilder instance using the specified object as a basis.static Relocation.BuildernewBuilder(Relocation from, boolean forceCopy) Creates a newRelocationbuilder instance using the specified object as a basis.static RelocationCreates a newRelocationinstance.static RelocationnewInstance(boolean withDefaults) Creates a newRelocationinstance using default values or not.with()Creates a new builder with this object as the basis.withArtifactId(String artifactId) Creates a newRelocationinstance using the specified artifactId.withGroupId(String groupId) Creates a newRelocationinstance using the specified groupId.withMessage(String message) Creates a newRelocationinstance using the specified message.withVersion(String version) Creates a newRelocationinstance using the specified version.
-
Method Details
-
getGroupId
The group ID the artifact has moved to.- Returns:
- a
String
-
getArtifactId
The new artifact ID of the artifact.- Returns:
- a
String
-
getVersion
The new version of the artifact.- Returns:
- a
String
-
getMessage
An additional message to show the user about the move, such as the reason.- 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 newRelocationinstance using the specified groupId.- Parameters:
groupId- the newStringto use- Returns:
- a
Relocationwith the specified groupId
-
withArtifactId
Creates a newRelocationinstance using the specified artifactId.- Parameters:
artifactId- the newStringto use- Returns:
- a
Relocationwith the specified artifactId
-
withVersion
Creates a newRelocationinstance using the specified version.- Parameters:
version- the newStringto use- Returns:
- a
Relocationwith the specified version
-
withMessage
Creates a newRelocationinstance using the specified message.- Parameters:
message- the newStringto use- Returns:
- a
Relocationwith the specified message
-
newInstance
Creates a newRelocationinstance. Equivalent tonewInstance(true).- Returns:
- a new
Relocation - See Also:
-
newInstance
Creates a newRelocationinstance using default values or not. Equivalent tonewBuilder(withDefaults).build().- Parameters:
withDefaults- the boolean indicating whether default values should be used- Returns:
- a new
Relocation
-
newBuilder
Creates a newRelocationbuilder instance. Equivalent tonewBuilder(true).- Returns:
- a new
Builder - See Also:
-
newBuilder
Creates a newRelocationbuilder instance using default values or not.- Parameters:
withDefaults- the boolean indicating whether default values should be used- Returns:
- a new
Builder
-
newBuilder
Creates a newRelocationbuilder instance using the specified object as a basis. Equivalent tonewBuilder(from, false).- Parameters:
from- theRelocationinstance to use as a basis- Returns:
- a new
Builder
-
newBuilder
Creates a newRelocationbuilder instance using the specified object as a basis.- Parameters:
from- theRelocationinstance to use as a basisforceCopy- the boolean indicating if a copy should be forced- Returns:
- a new
Builder
-