The project to build understanding
We can build tools to help automate the build process, from cleaning, compiling, testing to generate reports, to the packaging and deployment. We only need to enter a simple command (such as mvn clean install
), Maven will help us deal with the tedious task; it is built to maximize the elimination of duplication, abstract build lifecycle, and provides most of the building has been implemented as a task plug-ins. For example testing, we only need to follow the conventions Maven to write a good test case, when we run the build of these tests will be run automatically. In addition, Maven will help us standardize the build process. Before Maven, ten projects are ten possible way to build, but by Maven, all projects build commands are simple and consistent. It is conducive to promoting the standardization project team.
mvn clean package
followed by the implementation: clean, resources, compile, testResources , testCompile, test, jar ( package).
mvn clean install
followed by the implementation: clean, resources, compile, testResources , testCompile, test, jar ( package), install.
mvn clean deploy
in order to perform: clean, resources, compile, testResources , testCompile, test, jar ( package), install, deploy.
package command:
Complete the project compilation, unit testing, functional package, but the package file is not deployed to the local and remote Maven repository Maven repository.
install command:
Complete the project compilation, unit testing, functional package, while the deployment package file to the local Maven repository, but did not deploy to a remote Maven repository.
deploy command:
Complete the project compilation, unit testing, functional package, while the deployment package file to the local and remote Maven repository Maven repository.