Class Lifecycle

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

@Generated @ThreadSafe @Immutable public class Lifecycle extends Object implements Serializable
A custom lifecycle mapping definition.
See Also:
  • Method Details

    • getId

      public String getId()
      The ID of this lifecycle, for identification in the mojo descriptor.
    • getPhases

      @Nonnull public List<Phase> getPhases()
      The phase mappings for this lifecycle.
    • with

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

      @Nonnull public Lifecycle withId(String id)
      Creates a new Lifecycle instance using the specified id.
    • withPhases

      @Nonnull public Lifecycle withPhases(Collection<Phase> phases)
      Creates a new Lifecycle instance using the specified phases.
    • newInstance

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

      @Nonnull public static Lifecycle newInstance(boolean withDefaults)
      Creates a new Lifecycle instance using default values or not. Equivalent to newBuilder( withDefaults ).build().
    • newBuilder

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

      @Nonnull public static Lifecycle.Builder newBuilder(boolean withDefaults)
      Creates a new Lifecycle builder instance using default values or not.
    • newBuilder

      @Nonnull public static Lifecycle.Builder newBuilder(Lifecycle from)
      Creates a new Lifecycle builder instance using the specified object as a basis. Equivalent to newBuilder( from, false ).
    • newBuilder

      @Nonnull public static Lifecycle.Builder newBuilder(Lifecycle from, boolean forceCopy)
      Creates a new Lifecycle builder instance using the specified object as a basis.