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.
proc­ess­-re­sou­rces
reso­urc­es:­res­our­ces
copy and process the resources into the destin­ation directory, ready for packaging.
comp­ile
comp­ile­r:c­omp­ile
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
reso­urc­es:­tes­tRe­sou­rces
copy and process the resources into the test destin­ation directory.
test­-co­mpile
comp­ile­r:t­est­Com­pile
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
sure­fir­e:t­est
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.
pack­age
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
inst­all
inst­all­:in­stall
install the package into the local reposi­tory, for use as a dependency in other projects locally.
deploy
depl­oy:­dep­loy
copies the final package to the remote repository for sharing with other developers and projects.

Clean Lifecycle

Phase
Default Binding
Description
pre-clean
 
execute processes needed prior to the actual project cleaning
clean
clea­­n:­c­l­ean
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­-de­ploy
site:d­eploy
deploy the generated site docume­ntation to the specified web server
   

Help Us Go Positive!

We offset our carbon usage with Ecologi. Click the link below to help us!

We offset our carbon footprint via Ecologi