这篇文章包含两部分:
1. Building Java Projects with Maven
2. Introduction to the Build Lifecycle
由于都看过了,所以就不机械地重新输入一遍,而是仅仅拷贝链接,用来以后参考。
1. Building Java Projects with Maven
http://spring.io/guides/gs/maven/
由于最近在学习spring,所以看了spring官网的关于Maven build Project的内容,是很入门级别,但是其中一些关于Maven lifecycle goals不是特别理解,于是找了第2部分内容。
2. Introduction to the Build Lifecycle
http://maven.apache.org/guides/introduction/introduction-to-the-lifecycle.html
这部分看的不是特别详细,主要记住了两句话:
1) A Build Lifecycle is Made Up of Phases
2) A Build Phase is Made Up of Plugin Goals
在2.1)中,举例说明了如何A Build Lifecycle is Made Up of Phases
There are three built-in build lifecycles: default, clean and site. The default lifecycle handles your project deployment, the clean lifecycle handles project cleaning, while the site lifecycle handles the creation of your project's site documentation.
Each of these build lifecycles is defined by a different list of build phases, wherein a build phase represents a stage in the lifecycle.
For example, the default lifecycle has the following build phases (for a complete list of the build phases, refer to the Lifecycle Reference):
- 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.
补充:
Eclipse中构建Maven项目