在Maven项目的context来理解软件工程技术,并实现和整合他们。


一、构建自动化
1.创建一个新的项目:
mvn archetype:generate -DgroupId=net.srirangan.packt.maven -DartifactId=MySampleApp
命令mvn install可以包含build生命周期的大部分内容,包括编译、测试、打包和安装artifact到local repository。

构建生命周期的阶段:
> Validate: Validates that all project information is available and correct
> Compile: Compiles the source code
> Test: Runs unit tests within a suitable framework
> Package: Packages the compiled code in its distribution format
> Integration-test: Processes the package in the integration test environment
> Verify: Runs checks to verify if the package is valid
> Install: Installs the package in the local repository
> Deploy: Installs the final package in a remote repository

 构建生命周期的每一个阶段,都是一个Maven插件。