Maven Phases
Although hardly a comprehensive list, these are the most common default lifecycle phases executed.
- validate: validate the project is correct and all necessary information is available
- compile: compile the source code of the project
- test: test the compiled source code 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.
- integration-test: process and deploy the package if necessary into an environment where integration tests can be run
- 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.
There are two other Maven lifecycles of note beyond the default list above. They are
- clean: cleans up artifacts created by prior builds
- site: generates site documentation for this project
翻译内容,摘自 IBM
生命周期
在Maven2中有了明确的生命周期概念,而且都提供与之对应的命令,使得项目构建更加清晰明了。主要的生命周期阶段:
- validate,验证工程是否正确,所有需要的资源是否可用。
- compile,编译项目的源代码。
- test-compile,编译项目测试代码。
- test,使用已编译的测试代码,测试已编译的源代码。
- package,已发布的格式,如jar,将已编译的源代码打包。
- integration-test,在集成测试可以运行的环境中处理和发布包。
- verify,运行任何检查,验证包是否有效且达到质量标准。
- install,把包安装在本地的repository中,可以被其他工程作为依赖来使用
- deploy,在整合或者发布环境下执行,将最终版本的包拷贝到远程的repository,使得其他的开发者或者工程可以共享。
- generate-sources,产生应用需要的任何额外的源代码,如xdoclet。
posted on 2007-08-08 16:30
哈哈的日子 阅读(535)
评论(0) 编辑 收藏 所属分类:
Maven 、
Java