Maven runs built-in lifecycles as an ordered list of phases
Answer: Maven is based around the central concept of a build lifecycle. There are three built-in build lifecycles: default, clean and site. Each lifecycle is defined by a list of phases, and those phases are executed sequentially up to the one specified.
Default phases
The default lifecycle handles project deployment. Its commonly cited phases include validate, compile, test, package, verify, install, and deploy. validate checks that the project is correct. compile compiles the source code. test runs unit tests that should not require the code be packaged or deployed. package puts the compiled code into a distributable format, such as a JAR. verify runs checks on integration-test results. install places the package into the local repository. deploy copies the final package to a remote repository.
What to call
You should select the phase that matches your outcome. You only need to call the last build phase to be executed; earlier phases in that lifecycle run first. If you are uncertain what you want, the preferred phase to call is mvn verify. In a build environment, mvn clean deploy cleanly builds and deploys artifacts into the shared repository.
See also
Claims
- id: C1 claim: Maven has three built-in lifecycles: default, clean, and site. source: S1 evidence: "There are three built-in build lifecycles: default, clean and site."
- id: C2 claim: You should select the lifecycle phase that matches the outcome you want. source: S1 evidence: "You should select the phase that matches your outcome."
- id: C3 claim: Calling one phase also runs the earlier phases in that lifecycle. source: S2 evidence: "You only need to call the last build phase to be executed"
- id: C4 claim: When the desired outcome is unclear, the preferred phase to call is verify. source: S2 evidence: "the preferred phase to call is"
Sources
- [S1] Introduction to the Build Lifecycle. Maven site. https://maven.apache.org/guides/introduction/introduction-to-the-lifecycle.html . License: Apache-2.0. Accessed 2026-11-16.
- [S2] Introduction to the Build Lifecycle (Maven site source). apache/maven-site (GitHub). https://github.com/apache/maven-site/blob/master/content/markdown/guides/introduction/introduction-to-the-lifecycle.md . License: Apache-2.0. Accessed 2026-11-16.
License: this note is CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Summary by iinventedlight (AI-assisted). Sources: Maven site, Introduction to the Build Lifecycle, Apache-2.0 (https://www.apache.org/licenses/LICENSE-2.0.txt); apache/maven-site (GitHub), Introduction to the Build Lifecycle, Apache-2.0 (https://www.apache.org/licenses/LICENSE-2.0.txt). Text was condensed and changed from the originals.
License: CC-BY-4.0 · Summary by iinventedlight (AI-assisted). Sources: Maven site, Introduction to the Build Lifecycle, Apache-2.0 (https://www.apache.org/licenses/LICENSE-2.0.txt); apache/maven-site (GitHub), Introduction to the Build Lifecycle, Apache-2.0 (https://www.apache.org/licenses/LICENSE-2.0.txt).
Cite this
iinventedlight. 2026. "Maven runs built-in lifecycles as an ordered list of phases." iinventedlight Library, iil:note:0aq5f6f6, version of 2026-11-16. https://iinventedlight.com/library/notes/maven-build-lifecycle/. License: CC-BY-4.0.
@misc{iil_note_0aq5f6f6,
author = {{iinventedlight}},
title = {{Maven runs built-in lifecycles as an ordered list of phases}},
howpublished = {iinventedlight Library},
year = {2026},
date = {2026-11-16},
url = {https://iinventedlight.com/library/notes/maven-build-lifecycle/},
note = {Permanent ID iil:note:0aq5f6f6. License: CC-BY-4.0.},
}
Spotted a mistake? Use the MCP feedback tool or email hello@iinventedlight.com. Or Report a correction (no account needed).
Extra files beside this note
These files use this note's license, shown below. Paper extras retain their reproduction status; a link is not a reproduction.
- maven-build-lifecycle.table.json (table; CC-BY-4.0)
- maven-build-lifecycle.schema.json (schema; CC-BY-4.0)
For language models and agents: start at /llms.txt | /agents.md | /.well-known/agent-library.json. This page in Markdown: /library/notes/maven-build-lifecycle.md.