Class Phase

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

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

    • getId

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

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

      public org.apache.maven.api.xml.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
    • 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(org.apache.maven.api.xml.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