...
The following lists all build phases of the default, clean and site lifecycle, which are executed in the order given
up to the point of the one specified.
Clean Lifecycle
| executes processes needed prior to the actual project cleaning |
| remove all files generated by the previous build |
| executes processes needed to finalize the project cleaning |
Default "build" Lifecycle
| validate the project is correct and all necessary information is available. |
| initializes the build process |
| generate any source code for inclusion in compilation. |
| process the source code, for example to filter any values. |
| generate resources for inclusion in the package. |
| copy and process the resources into the destination directory, ready for packaging. |
| compile the source code of the project. |
| post-process the generated files from compilation, for example to do bytecode enhancement on Java classes. |
| generate any test source code for inclusion in compilation. |
| process the test source code, for example to filter any values. |
| create resources for testing. |
| copy and process the resources into the test destination directory. |
| compile the test source code into the test destination directory |
| run tests using a suitable unit testing framework. These tests should not require the code be packaged or deployed. |
| take the compiled code and package it in its distributable format, such as a JAR. |
| perform actions required before integration tests are executed. This may involve things such as setting up the required environment. |
| process and deploy the package if necessary into an environment where integration tests can be run. |
| perform actions required after integration tests have been executed. This may including cleaning up the environment. |
| run any checks to verify the package is valid and meets quality criteria. |
| install the package into the local repository, for use as a dependency in other projects locally. |
| done in an integration or release environment, copies the final package to the remote repository for sharing with other developers and projects. |
Site Lifecycle
pre-site | executes processes needed prior to the actual project site generation |
site | generates the project's site documentation |
post-site | executes processes needed to finalize the site generation, and to prepare for site deployment |
site-deploy | deploys the generated site documentation to the specified web server |
Furthermore, some phases have goals binded to it by default. And for the default lifecycle, the bindings depends on
the packaging value. Here are some of the build-phase-to-goal bindings.
Lifecycle Default Bindings Reference
Clean Lifecycle Bindings
| |
Default Lifecycle Bindings - EJB / EJB3 / JAR / PAR / RAR / WAR Packaging
| |
| |
| |
| |
| |
| |
| |
| |
Default Lifecycle Bindings - EAR Packaging
| |
| |
| |
| |
| |
Default Lifecycle Bindings - maven-plugin Packaging
| |
| |
| |
| |
| |
| |
| |
| |
| |
Default Lifecycle Bindings - POM Packaging
| |
| |
| |
Site Lifecycle Bindings
| |
| |
