Class AfterLink

java.lang.Object
org.apache.maven.api.plugin.descriptor.AfterLink
All Implemented Interfaces:
Serializable

@Experimental @Generated @ThreadSafe @Immutable public class AfterLink extends Object implements Serializable
A lifecycle ordering constraint from an @After annotation on a Mojo class. Specifies that the Mojo's bound phase should execute after a given target phase, with a pointer type controlling how the ordering applies across project boundaries.
Since:
4.0.0
See Also:
  • Constructor Details

  • Method Details

    • getPhase

      public String getPhase()
      The target phase name that this Mojo should run after.
      Returns:
      a String
    • getType

      public String getType()
      The type of pointer: PROJECT (same-project phase ordering), DEPENDENCIES (cross-project dependency ordering), or CHILDREN (parent-child module ordering).
      Returns:
      a String
    • getScope

      public String getScope()
      The dependency scope, only meaningful when type is DEPENDENCIES. Examples: compile, runtime, test.
      Returns:
      a String
    • with

      @Nonnull public AfterLink.Builder with()
      Creates a new builder with this object as the basis.
      Returns:
      a Builder
    • withPhase

      @Nonnull public AfterLink withPhase(String phase)
      Creates a new AfterLink instance using the specified phase.
      Parameters:
      phase - the new String to use
      Returns:
      a AfterLink with the specified phase
    • withType

      @Nonnull public AfterLink withType(String type)
      Creates a new AfterLink instance using the specified type.
      Parameters:
      type - the new String to use
      Returns:
      a AfterLink with the specified type
    • withScope

      @Nonnull public AfterLink withScope(String scope)
      Creates a new AfterLink instance using the specified scope.
      Parameters:
      scope - the new String to use
      Returns:
      a AfterLink with the specified scope
    • newInstance

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

      @Nonnull public static AfterLink newInstance(boolean withDefaults)
      Creates a new AfterLink 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 AfterLink
    • newBuilder

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

      @Nonnull public static AfterLink.Builder newBuilder(boolean withDefaults)
      Creates a new AfterLink 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 AfterLink.Builder newBuilder(AfterLink from)
      Creates a new AfterLink builder instance using the specified object as a basis. Equivalent to newBuilder(from, false).
      Parameters:
      from - the AfterLink instance to use as a basis
      Returns:
      a new Builder
    • newBuilder

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