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:
  • Constructor Details Link icon

  • Method Details Link icon

    • getGroupId Link icon

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

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

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

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

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

      public Set<Object> getLocationKeys()
      Gets the keys of the locations of the input source.
    • getLocationKeyStream Link icon

      protected Stream<Object> getLocationKeyStream()
    • getImportedFrom Link icon

      public InputLocation getImportedFrom()
      Gets the input location that caused this model to be read.
      Specified by:
      getImportedFrom in interface InputLocationTracker
      Returns:
      InputLocation
    • with Link icon

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

      @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 Link icon

      @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 Link icon

      @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 Link icon

      @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 Link icon

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

      @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 Link icon

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

      @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 Link icon

      @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 Link icon

      @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