Integrated Open Souce Technology Solutions

Maven 2 Life Cycle

December 12th, 2006 Posted in JAVA

This post contains information helpful in using maven 2.0. Maven is a software project management and comprehension tool. Based on the concept of a project object model (POM), Maven can manage a project’s build, reporting and documentation from a central piece of information.

Maven’s Default Build Life Cycle

validate Validate the project is correct and all necessary information is available.
initialize Initialize the build process.
generate-sources Generate any source code for inclusion in compilation.
process-sources Process the source code, for example to filter any values.
generate-resources Generate resources for inclusion in the package.
process-resources Copy and process the resources into the destination directory, ready for packaging.
compile Compile the source code of the project.
process-classes Post-process the generated files from compilation, for example to do byte code enhancement on Java classes.
generate-test-sources Create resources for testing.
process-test-sources Process the test source code, for example to filter any values.
generate-test-resources Create resources for testing.
process-test-resources Copy and process the resources into the test destination directory.
test-compile Compile the test source code into the test destination directory test Run tests using a suitable unit testing framework. These tests should not require the code be packaged or deployed.
test Run tests using a suitable unit testing framework. These tests should not require the code be packaged or deployed.
package Take the compiled code and package it in its distributable format, such as a JAR.
pre-integration-test Perform actions required before integration tests are executed. This may involve things such as setting up the required environment.
integration-test Process and deploy the package if necessary into an environment where integration tests can be run.
post-integration-test Perform actions required after integration tests have been executed. This may including cleaning up the environment.
verify Run any checks to verify the package is valid and meets quality criteria.
install Install the package into the local repository, for use as a dependency in other projects locally.
deploy Done in an integration or release environment, copies the final package to the remote repository for sharing with other developers and projects.


  1. 4 Trackback(s)

  2. Apr 5, 2008: Dr. Riekeyword - Child Abuse Avoidance Suggestion Tool
  3. Mar 17, 2010: Антон Павлович
  4. Apr 11, 2010: Kylie BattName
  5. May 19, 2010: Kylie Batt

You must be logged in to post a comment.