Class Lifecycle
java.lang.Object
org.apache.maven.plugin.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
Modifier and TypeClassDescriptionstatic class
Builder 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.Builder
Creates a newLifecycle
builder instance.static Lifecycle.Builder
newBuilder
(boolean withDefaults) Creates a newLifecycle
builder instance using default values or not.static Lifecycle.Builder
newBuilder
(Lifecycle from) Creates a newLifecycle
builder instance using the specified object as a basis.static Lifecycle.Builder
newBuilder
(Lifecycle from, boolean forceCopy) Creates a newLifecycle
builder instance using the specified object as a basis.static Lifecycle
Creates a newLifecycle
instance.static Lifecycle
newInstance
(boolean withDefaults) Creates a newLifecycle
instance using default values or not.with()
Creates a new builder with this object as the basis.Creates a newLifecycle
instance using the specified id.withPhases
(Collection<Phase> phases) Creates a newLifecycle
instance 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 newLifecycle
instance using the specified id.- Parameters:
id
- the newString
to use- Returns:
- a
Lifecycle
with the specified id
-
withPhases
Creates a newLifecycle
instance using the specified phases.- Parameters:
phases
- the newCollection<Phase>
to use- Returns:
- a
Lifecycle
with the specified phases
-
newInstance
Creates a newLifecycle
instance. Equivalent tonewInstance( true )
.- Returns:
- a new
Lifecycle
- See Also:
-
newInstance
Creates a newLifecycle
instance 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 newLifecycle
builder instance. Equivalent tonewBuilder( true )
.- Returns:
- a new
Builder
- See Also:
-
newBuilder
Creates a newLifecycle
builder instance using default values or not.- Parameters:
withDefaults
- the boolean indicating whether default values should be used- Returns:
- a new
Builder
-
newBuilder
Creates a newLifecycle
builder instance using the specified object as a basis. Equivalent tonewBuilder( from, false )
.- Parameters:
from
- theLifecycle
instance to use as a basis- Returns:
- a new
Builder
-
newBuilder
Creates a newLifecycle
builder instance using the specified object as a basis.- Parameters:
from
- theLifecycle
instance to use as a basisforceCopy
- the boolean indicating if a copy should be forced- Returns:
- a new
Builder
-