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 SummaryNested ClassesModifier and TypeClassDescriptionstatic classBuilder class used to create Relocation instances.
- 
Constructor SummaryConstructorsModifierConstructorDescriptionprotectedRelocation(Relocation.Builder builder) Constructor for this class, to be called from its subclasses andRelocation.Builder.
- 
Method SummaryModifier and TypeMethodDescriptionThe new artifact ID of the artifact.The group ID the artifact has moved to.Gets the input location that caused this model to be read.getLocation(Object key) Gets the location of the specified field in the input source.Gets the keys of the locations of 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.
- 
Constructor Details- 
RelocationConstructor for this class, to be called from its subclasses andRelocation.Builder.- See Also:
 
 
- 
- 
Method Details- 
getGroupIdThe group ID the artifact has moved to.- Returns:
- a String
 
- 
getArtifactIdThe new artifact ID of the artifact.- Returns:
- a String
 
- 
getVersionThe new version of the artifact.- Returns:
- a String
 
- 
getMessageAn additional message to show the user about the move, such as the reason.- Returns:
- a String
 
- 
getLocationGets the location of the specified field in the input source.- Specified by:
- getLocationin interface- InputLocationTracker
 
- 
getLocationKeysGets the keys of the locations of the input source.
- 
getImportedFromGets the input location that caused this model to be read.- Specified by:
- getImportedFromin interface- InputLocationTracker
- Returns:
- InputLocation
 
- 
withCreates a new builder with this object as the basis.- Returns:
- a Builder
 
- 
withGroupIdCreates a newRelocationinstance using the specified groupId.- Parameters:
- groupId- the new- Stringto use
- Returns:
- a Relocationwith the specified groupId
 
- 
withArtifactIdCreates a newRelocationinstance using the specified artifactId.- Parameters:
- artifactId- the new- Stringto use
- Returns:
- a Relocationwith the specified artifactId
 
- 
withVersionCreates a newRelocationinstance using the specified version.- Parameters:
- version- the new- Stringto use
- Returns:
- a Relocationwith the specified version
 
- 
withMessageCreates a newRelocationinstance using the specified message.- Parameters:
- message- the new- Stringto use
- Returns:
- a Relocationwith the specified message
 
- 
newInstanceCreates a newRelocationinstance. Equivalent tonewInstance(true).- Returns:
- a new Relocation
- See Also:
 
- 
newInstanceCreates 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
 
- 
newBuilderCreates a newRelocationbuilder instance. Equivalent tonewBuilder(true).- Returns:
- a new Builder
- See Also:
 
- 
newBuilderCreates a newRelocationbuilder instance using default values or not.- Parameters:
- withDefaults- the boolean indicating whether default values should be used
- Returns:
- a new Builder
 
- 
newBuilderCreates a newRelocationbuilder instance using the specified object as a basis. Equivalent tonewBuilder(from, false).- Parameters:
- from- the- Relocationinstance to use as a basis
- Returns:
- a new Builder
 
- 
newBuilderCreates a newRelocationbuilder instance using the specified object as a basis.- Parameters:
- from- the- Relocationinstance to use as a basis
- forceCopy- the boolean indicating if a copy should be forced
- Returns:
- a new Builder
 
 
-