Class Relocation

java.lang.Object
org.apache.maven.api.model.Relocation
All Implemented Interfaces:
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:
  • Method Details

    • getGroupId

      public String getGroupId()
      The group ID the artifact has moved to.
      Returns:
      a String
    • getArtifactId

      public String getArtifactId()
      The new artifact ID of the artifact.
      Returns:
      a String
    • getVersion

      public String getVersion()
      The new version of the artifact.
      Returns:
      a String
    • getMessage

      public String getMessage()
      An additional message to show the user about the move, such as the reason.
      Returns:
      a String
    • getLocation

      public InputLocation getLocation(Object key)
      Gets the location of the specified field in the input source.
      Specified by:
      getLocation in interface InputLocationTracker
    • with

      Creates a new builder with this object as the basis.
      Returns:
      a Builder
    • withGroupId

      @Nonnull public Relocation withGroupId(String groupId)
      Creates a new Relocation instance using the specified groupId.
      Parameters:
      groupId - the new String to use
      Returns:
      a Relocation with the specified groupId
    • withArtifactId

      @Nonnull public Relocation withArtifactId(String artifactId)
      Creates a new Relocation instance using the specified artifactId.
      Parameters:
      artifactId - the new String to use
      Returns:
      a Relocation with the specified artifactId
    • withVersion

      @Nonnull public Relocation withVersion(String version)
      Creates a new Relocation instance using the specified version.
      Parameters:
      version - the new String to use
      Returns:
      a Relocation with the specified version
    • withMessage

      @Nonnull public Relocation withMessage(String message)
      Creates a new Relocation instance using the specified message.
      Parameters:
      message - the new String to use
      Returns:
      a Relocation with the specified message
    • newInstance

      @Nonnull public static Relocation newInstance()
      Creates a new Relocation instance. Equivalent to newInstance( true ).
      Returns:
      a new Relocation
      See Also:
    • newInstance

      @Nonnull public static Relocation newInstance(boolean withDefaults)
      Creates a new Relocation instance using default values or not. Equivalent to newBuilder( withDefaults ).build().
      Parameters:
      withDefaults - the boolean indicating whether default values should be used
      Returns:
      a new Relocation
    • newBuilder

      @Nonnull public static Relocation.Builder newBuilder()
      Creates a new Relocation builder instance. Equivalent to newBuilder( true ).
      Returns:
      a new Builder
      See Also:
    • newBuilder

      @Nonnull public static Relocation.Builder newBuilder(boolean withDefaults)
      Creates a new Relocation builder instance using default values or not.
      Parameters:
      withDefaults - the boolean indicating whether default values should be used
      Returns:
      a new Builder
    • newBuilder

      @Nonnull public static Relocation.Builder newBuilder(Relocation from)
      Creates a new Relocation builder instance using the specified object as a basis. Equivalent to newBuilder( from, false ).
      Parameters:
      from - the Relocation instance to use as a basis
      Returns:
      a new Builder
    • newBuilder

      @Nonnull public static Relocation.Builder newBuilder(Relocation from, boolean forceCopy)
      Creates a new Relocation builder instance using the specified object as a basis.
      Parameters:
      from - the Relocation instance to use as a basis
      forceCopy - the boolean indicating if a copy should be forced
      Returns:
      a new Builder