← All notes

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

Sources

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

Permanent ID: iil:note:0aq5f6f6

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.},
}

Markdown

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.

All artifact files (JSON index)

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.