标签:style io ar os sp on bs ef as
在maven中定义了三种生命周期,分别为default lifecycle,clean lifecycle和site lifecycle.而第一种默认的生命周期是不需要与插件关联的,相对默认生命周期,则clean lifecycle和site lifecycle需要插件的支持。
以下则是默认生命周期里按照构建的顺序列出了生命周期的各个环节,对于各个环节所表示的意思则可以从字面意思上很容易的理解:
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
此种生命周期中包含pre-clean,clean,post-clean三个环节。例如:
<phases> <phase>pre-clean</phase> <phase>clean</phase> <phase>post-clean</phase> </phases> <default-phases> <clean> org.apache.maven.plugins:maven-clean-plugin:2.5:clean </clean> </default-phases>
此种生命周期中包含pre-site,site,post-site,site-deploy四个环节,例如:
<phases> <phase>pre-site</phase> <phase>site</phase> <phase>post-site</phase> <phase>site-deploy</phase> </phases> <default-phases> <site> org.apache.maven.plugins:maven-site-plugin:3.3:site </site> <site-deploy> org.apache.maven.plugins:maven-site-plugin:3.3:deploy </site-deploy> </default-phases>
标签:style io ar os sp on bs ef as
原文地址:http://my.oschina.net/crazyharry/blog/353978