Show Menu
Cheatography

Maven Lifecycles Cheat Sheet (DRAFT) by

This is a draft cheat sheet. It is a work in progress and is not finished yet.

Default Lifecycle

Phase
Default Binding
Default Binding
validate
 
validate the project is correct and all necessary inform­ation is available.
initialize
 
initialize build state, e.g. set properties or create direct­ories.
genera­te-­sources
 
generate any source code for inclusion in compil­ation.
proces­s-s­ources
 
process the source code, for example to filter any values.
genera­te-­res­ources
 
generate resources for inclusion in the package.
proces­s-r­eso­urces
resour­ces­:re­sources
copy and process the resources into the destin­ation directory, ready for packaging.
compile
compil­er:­compile
compile the source code of the project.
proces­s-c­lasses
 
post-p­rocess the generated files from compil­ation
genera­te-­tes­t-s­ources
 
generate any test source code for inclusion in compil­ation.
process-test-sources
 
process the test source code, for example to filter any values.
generate-test-resources
 
create resources for testing.
process-test-resources
resour­ces­:te­stR­eso­urces
copy and process the resources into the test destin­ation directory.
test-c­ompile
compil­er:­tes­tCo­mpile
compile the test source code into the test destin­ation directory
proces­s-t­est­-cl­asses
 
post-p­rocess the generated files from test compil­ation
test
surefi­re:test
run unit tests using a suitable unit testing framework.
prepar­e-p­ackage
 
perform any operations necessary to prepare a package before the actual packaging.
package
jar:jar or war:war
take the compiled code and package it in its distri­butable format, such as a JAR.
pre-in­teg­rat­ion­-test
 
perform actions required before integr­ation tests are executed.
integr­ati­on-test
 
execute integr­ation tests.
post-i­nte­gra­tio­n-test
 
perform actions required after integr­ation tests have been executed.
verify
 
run any checks on results of integr­ation tests to ensure quality criteria are met
install
instal­l:i­nstall
install the package into the local reposi­tory, for use as a dependency in other projects locally.
deploy
deploy­:deploy
copies the final package to the remote repository for sharing with other developers and projects.

Clean Lifecycle

Phase
Default Binding
Descri­ption
pre-clean
 
execute processes needed prior to the actual project cleaning
clean
clea­n­:c­lean
remove all files generated by the previous build
post-clean
 
execute processes needed to finalize the project cleaning

Site Lifecycle

pre-site
 
execute processes needed prior to the actual project site generation
site
site:site
generate the project's site docume­ntation
post-site
 
execute processes needed to finalize the site genera­tion, and to prepare for site deployment
site-d­eploy
site:d­eploy
deploy the generated site docume­ntation to the specified web server