Class Lifecycle
java.lang.Object
org.apache.maven.api.plugin.descriptor.lifecycle.Lifecycle
- All Implemented Interfaces:
Serializable
@Experimental
@Generated
@ThreadSafe
@Immutable
public class Lifecycle
extends Object
implements Serializable
A custom lifecycle mapping definition.
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classBuilder class used to create Lifecycle instances. -
Method Summary
Modifier and TypeMethodDescriptiongetId()The ID of this lifecycle, for identification in the mojo descriptor.The phase mappings for this lifecycle.static Lifecycle.BuilderCreates a newLifecyclebuilder instance.static Lifecycle.BuildernewBuilder(boolean withDefaults) Creates a newLifecyclebuilder instance using default values or not.static Lifecycle.BuildernewBuilder(Lifecycle from) Creates a newLifecyclebuilder instance using the specified object as a basis.static Lifecycle.BuildernewBuilder(Lifecycle from, boolean forceCopy) Creates a newLifecyclebuilder instance using the specified object as a basis.static LifecycleCreates a newLifecycleinstance.static LifecyclenewInstance(boolean withDefaults) Creates a newLifecycleinstance using default values or not.with()Creates a new builder with this object as the basis.Creates a newLifecycleinstance using the specified id.withPhases(Collection<Phase> phases) Creates a newLifecycleinstance using the specified phases.
-
Method Details
-
getId
The ID of this lifecycle, for identification in the mojo descriptor.- Returns:
- a
String
-
getPhases
The phase mappings for this lifecycle.- Returns:
- a
List<Phase>
-
with
Creates a new builder with this object as the basis.- Returns:
- a
Builder
-
withId
Creates a newLifecycleinstance using the specified id.- Parameters:
id- the newStringto use- Returns:
- a
Lifecyclewith the specified id
-
withPhases
Creates a newLifecycleinstance using the specified phases.- Parameters:
phases- the newCollection<Phase>to use- Returns:
- a
Lifecyclewith the specified phases
-
newInstance
Creates a newLifecycleinstance. Equivalent tonewInstance(true).- Returns:
- a new
Lifecycle - See Also:
-
newInstance
Creates a newLifecycleinstance using default values or not. Equivalent tonewBuilder(withDefaults).build().- Parameters:
withDefaults- the boolean indicating whether default values should be used- Returns:
- a new
Lifecycle
-
newBuilder
Creates a newLifecyclebuilder instance. Equivalent tonewBuilder(true).- Returns:
- a new
Builder - See Also:
-
newBuilder
Creates a newLifecyclebuilder instance using default values or not.- Parameters:
withDefaults- the boolean indicating whether default values should be used- Returns:
- a new
Builder
-
newBuilder
Creates a newLifecyclebuilder instance using the specified object as a basis. Equivalent tonewBuilder(from, false).- Parameters:
from- theLifecycleinstance to use as a basis- Returns:
- a new
Builder
-
newBuilder
Creates a newLifecyclebuilder instance using the specified object as a basis.- Parameters:
from- theLifecycleinstance to use as a basisforceCopy- the boolean indicating if a copy should be forced- Returns:
- a new
Builder
-