Lifecycles Reference
Maven defines 3 lifecycles in org.apache.maven.lifecycle.providers
package:
default
Lifecycle
default
lifecycle is defined only with phases, without any associated plugin binding: plugins bindings for this lifecycle are defined separately for each packaging:
return List.of(phase(
ALL,
children(ALL),
phase(
EACH,
phase(VALIDATE, phase(INITIALIZE)),
phase(
BUILD,
after(VALIDATE),
phase(SOURCES),
phase(RESOURCES),
phase(COMPILE, after(SOURCES), dependencies(SCOPE_COMPILE, READY)),
phase(READY, after(COMPILE), after(RESOURCES)),
phase(PACKAGE, after(READY), dependencies(SCOPE_RUNTIME, PACKAGE))),
phase(
VERIFY,
after(VALIDATE),
phase(
UNIT_TEST,
phase(TEST_SOURCES),
phase(TEST_RESOURCES),
phase(
TEST_COMPILE,
after(TEST_SOURCES),
after(READY),
dependencies(SCOPE_TEST_ONLY, READY)),
phase(
TEST,
after(TEST_COMPILE),
after(TEST_RESOURCES),
dependencies(SCOPE_TEST, READY))),
phase(INTEGRATION_TEST)),
phase(INSTALL, after(PACKAGE)),
phase(DEPLOY, after(PACKAGE)))));
clean
Lifecycle
clean
lifecycle phases are defined with their plugins bindings:
return List.of(phase(
Phase.CLEAN,
plugin(
MAVEN_PLUGINS + "maven-clean-plugin:" + MAVEN_CLEAN_PLUGIN_VERSION + ":clean",
Phase.CLEAN)));
site
Lifecycle
site
lifecycle phases are defined with their plugins bindings:
return List.of(
phase(PHASE_SITE, plugin(MAVEN_SITE_PLUGIN + "site", PHASE_SITE)),
phase(
PHASE_SITE_DEPLOY,
after(PHASE_SITE),
plugin(MAVEN_SITE_PLUGIN + "deploy", PHASE_SITE_DEPLOY)));