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

@Experimental @Generated @ThreadSafe @Immutable public class Phase extends Object implements Serializable
A phase mapping definition.
See Also:
  • Constructor Details

  • Method Details

    • getId

      public String getId()
      The ID of this phase, e.g., generate-sources.
      Returns:
      a String
    • getExecutionPoint

      public String getExecutionPoint()
      If specified, identifies this phase as a dynamic phase to decorate the specified phase id, e.g. after or before.
      Returns:
      a String
    • getPriority

      public int getPriority()
      If specified, identifies a within phase prioritization of executions.
      Returns:
      a int
    • getExecutions

      @Nonnull public List<Execution> getExecutions()
      The goals to execute within the phase.
      Returns:
      a List<Execution>
    • getConfiguration

      public XmlNode getConfiguration()
      Configuration to pass to all goals run in this phase.
      Returns:
      a XmlNode
    • with

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

      @Nonnull public Phase withId(String id)
      Creates a new Phase instance using the specified id.
      Parameters:
      id - the new String to use
      Returns:
      a Phase with the specified id
    • withExecutionPoint

      @Nonnull public Phase withExecutionPoint(String executionPoint)
      Creates a new Phase instance using the specified executionPoint.
      Parameters:
      executionPoint - the new String to use
      Returns:
      a Phase with the specified executionPoint
    • withPriority

      @Nonnull public Phase withPriority(int priority)
      Creates a new Phase instance using the specified priority.
      Parameters:
      priority - the new int to use
      Returns:
      a Phase with the specified priority
    • withExecutions

      @Nonnull public Phase withExecutions(Collection<Execution> executions)
      Creates a new Phase instance using the specified executions.
      Parameters:
      executions - the new Collection<Execution> to use
      Returns:
      a Phase with the specified executions
    • withConfiguration

      @Nonnull public Phase withConfiguration(XmlNode configuration)
      Creates a new Phase instance using the specified configuration.
      Parameters:
      configuration - the new XmlNode to use
      Returns:
      a Phase with the specified configuration
    • newInstance

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

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

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

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

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

      public String getEffectiveId()
      Get the effective ID of this phase, e.g., generate-sources or after:integration-test[1000].
      Returns:
      String