Home >
The build life cycle that Maven defines is the set of events that make up the build process. At different points during this life cycle we can configure Maven, or even extend Maven with Ant.
Table 3 lists all the Maven life cycles shown on the Maven web site, at http://maven.apache.org.
| Table 3. Maven life cycles | |
|---|---|
| Life cycle phase | Description |
| Validate | Validate that the project is correct and that all necessary information is available. |
| 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 project’s source code. |
| process-classes | Post-process the generated files from compilation—for example, to do bytecode enhancement on Java classes. |
| generate-test-sources | Generate any test source code for inclusion in compilation. |
| 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 that the code be packaged or deployed. |
| prepare-package | Perform any operations necessary to prepare a package before the actual packaging. This often results in an unpacked, processed version of the package (Maven 2.1 and later). |
| 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 such things 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 include cleaning up the environment. |
| Verify | Run any checks to verify that 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. |
Enough preaching! Let’s look at building out the service layer so that we can get another step closer to getting these entities from Java to Flex.
The two life cycle phases during which we’ll use Ant tasks to customize our build are the process-resources phase in the data project, and the compile phase in the web project.
Next installment we'll start to break the project down and show how we'll use Maven to automate the process of building the project's code. You can always find the entire series here.







Facebook Application Development
Comments
Leave a comment