Class Phase
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:
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
Builder class used to create Phase instances. -
Constructor Summary
ModifierConstructorDescriptionprotected
Phase
(Phase.Builder builder) Constructor for this class, to be called from its subclasses andPhase.Builder
. -
Method Summary
Modifier and TypeMethodDescriptionConfiguration to pass to all goals run in this phase.Get the effective ID of this phase, e.g.,generate-sources
orafter:integration-test[1000]
.If specified, identifies this phase as a dynamic phase to decorate the specified phase id, e.g.The goals to execute within the phase.getId()
The ID of this phase, e.g.,generate-sources
.int
If specified, identifies a within phase prioritization of executions.static Phase.Builder
Creates a newPhase
builder instance.static Phase.Builder
newBuilder
(boolean withDefaults) Creates a newPhase
builder instance using default values or not.static Phase.Builder
newBuilder
(Phase from) Creates a newPhase
builder instance using the specified object as a basis.static Phase.Builder
newBuilder
(Phase from, boolean forceCopy) Creates a newPhase
builder instance using the specified object as a basis.static Phase
Creates a newPhase
instance.static Phase
newInstance
(boolean withDefaults) Creates a newPhase
instance using default values or not.with()
Creates a new builder with this object as the basis.withConfiguration
(XmlNode configuration) Creates a newPhase
instance using the specified configuration.withExecutionPoint
(String executionPoint) Creates a newPhase
instance using the specified executionPoint.withExecutions
(Collection<Execution> executions) Creates a newPhase
instance using the specified executions.Creates a newPhase
instance using the specified id.withPriority
(int priority) Creates a newPhase
instance using the specified priority.
-
Constructor Details
-
Phase
Constructor for this class, to be called from its subclasses andPhase.Builder
.- See Also:
-
-
Method Details
-
getId
The ID of this phase, e.g.,generate-sources
.- Returns:
- a
String
-
getExecutionPoint
If specified, identifies this phase as a dynamic phase to decorate the specified phase id, e.g.after
orbefore
.- Returns:
- a
String
-
getPriority
public int getPriority()If specified, identifies a within phase prioritization of executions.- Returns:
- a
int
-
getExecutions
The goals to execute within the phase.- Returns:
- a
List<Execution>
-
getConfiguration
Configuration to pass to all goals run in this phase.- Returns:
- a
XmlNode
-
with
Creates a new builder with this object as the basis.- Returns:
- a
Builder
-
withId
Creates a newPhase
instance using the specified id.- Parameters:
id
- the newString
to use- Returns:
- a
Phase
with the specified id
-
withExecutionPoint
Creates a newPhase
instance using the specified executionPoint.- Parameters:
executionPoint
- the newString
to use- Returns:
- a
Phase
with the specified executionPoint
-
withPriority
Creates a newPhase
instance using the specified priority.- Parameters:
priority
- the newint
to use- Returns:
- a
Phase
with the specified priority
-
withExecutions
Creates a newPhase
instance using the specified executions.- Parameters:
executions
- the newCollection<Execution>
to use- Returns:
- a
Phase
with the specified executions
-
withConfiguration
Creates a newPhase
instance using the specified configuration.- Parameters:
configuration
- the newXmlNode
to use- Returns:
- a
Phase
with the specified configuration
-
newInstance
Creates a newPhase
instance. Equivalent tonewInstance(true)
.- Returns:
- a new
Phase
- See Also:
-
newInstance
Creates a newPhase
instance using default values or not. Equivalent tonewBuilder(withDefaults).build()
.- Parameters:
withDefaults
- the boolean indicating whether default values should be used- Returns:
- a new
Phase
-
newBuilder
Creates a newPhase
builder instance. Equivalent tonewBuilder(true)
.- Returns:
- a new
Builder
- See Also:
-
newBuilder
Creates a newPhase
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 newPhase
builder instance using the specified object as a basis. Equivalent tonewBuilder(from, false)
.- Parameters:
from
- thePhase
instance to use as a basis- Returns:
- a new
Builder
-
newBuilder
Creates a newPhase
builder instance using the specified object as a basis.- Parameters:
from
- thePhase
instance to use as a basisforceCopy
- the boolean indicating if a copy should be forced- Returns:
- a new
Builder
-
getEffectiveId
Get the effective ID of this phase, e.g.,generate-sources
orafter:integration-test[1000]
.- Returns:
- String
-