Maven has the following three standard lifecycles:
- Clean Lifecycle
- clean: Deletes the compiled output files in the target directory. This is usually done before building to ensure the project starts from a clean state.
- Default Lifecycle (also known as Build Lifecycle)
- validate: Validates the correctness of the project
- compile: Compiles the project's source code
- test: Runs the project's unit tests
- package: Packages the compiled code into a distributable format
- verify: Performs additional checks on the project to ensure quality
- install: Installs the project's build results into the local Maven repository for use by other projects
- deploy: Publishes the project's build results to a remote repository for use by other developers or teams
- Site Lifecycle
- site: Generates project documentation and site information
- deploy-site: Publishes the generated site information to a remote server for sharing project documentation