Maven Default Lifecycle Phases
- validate
- generate-sources
- process-sources
- generate-resources
- process-resources
- compile
- process-classes
- generate-test-sources
- process-test-sources
- generate-test-resources
- process-test-resources
- test-compile
- test
- prepare-package (maven 2.1+)
- package
- pre-integration-test
- integration-test
- post-integration-test
- verify
- install
- deploy
Notice that there are actually 21 phases of the default lifecycle listed. The "prepare-package" phase, however, won't be used until maven 2.1+. Since I am running 2.0.8 (the latest version at the time of this writing), this phase is not available to me.
There are a couple key concepts to be aware of with maven lifecycles. First off, if we call a particular phase via a maven command, such as "mvn compile", all phases up to and including that phase will be executed. So, in the case of "mvn compile", we would actually go through the validate, generate-sources, process-sources, generate-resources, process-resources, and compile phases. The second main concept to be aware of in regards to lifecycles is that, based on the packaging of a project (jar, warW, earW, etc), different maven goals will be bound to different phases of the maven lifecycle.
Read full article from What are the phases of the maven default lifecycle? - Web Tutorials - avajava.com
No comments:
Post a Comment