Package org.apache.maven.api
Interface Lifecycle
- All Superinterfaces:
ExtensibleEnum
A Maven lifecycle is a sequence of predefined phases that govern the build process
of a Maven project. Each phase represents a specific step, such as compiling the
code, running tests, packaging the project, and deploying it. Executing a phase
triggers all preceding phases, ensuring that each step of the build process is
completed in the correct order. The three main lifecycles in Maven are
default
, clean
, and site
, with the
default
lifecycle being the most commonly used for project builds.- Since:
- 4.0.0
-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic interface
A phase alias, mostly used to support the Maven 3 phases which are mapped to dynamic phases in Maven 4.static interface
static interface
static interface
A link from a phase to another phase, consisting of a type which can beLifecycle.Link.Kind.BEFORE
orLifecycle.Link.Kind.AFTER
, and aLifecycle.Pointer
to another phase.static interface
A phase in the lifecycle.static interface
static interface
-
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptionaliases()
Collection of aliases.default Stream<Lifecycle.Phase>
Stream of phases containing all child phases recursively.id()
Name or identifier of this lifecycle.phases()
Collection of main phases for this lifecycledefault Collection<Lifecycle.Phase>
v3phases()
Collection of main phases for this lifecycle used with the Maven 3 builders.
-
Field Details
-
CLEAN
- See Also:
-
DEFAULT
- See Also:
-
SITE
- See Also:
-
BEFORE
- See Also:
-
AFTER
- See Also:
-
AT
- See Also:
-
-
Method Details
-
id
String id()Name or identifier of this lifecycle.- Specified by:
id
in interfaceExtensibleEnum
- Returns:
- the unique identifier for this lifecycle
-
phases
Collection<Lifecycle.Phase> phases()Collection of main phases for this lifecycle -
v3phases
Collection of main phases for this lifecycle used with the Maven 3 builders. Those builders does not operate on a graph, but on the list and expect a slightly different ordering (mainly unit test being executed before packaging). -
allPhases
Stream of phases containing all child phases recursively. -
aliases
Collection<Lifecycle.Alias> aliases()Collection of aliases.
-