First, MAVEN common commands
1. Installation configuration maven: slightly
 2, create Create Java project: MVN Archetype:generate-dgroupid=com.demo (package name)-dartifactid=java-app (project name) & nbsp Create Web project: MVN archetype:generate -dgroupid=com.demo (registration)-dartifactid=web-app (project name)-darchetypeartifactid=maven-archetype-webapp build Eclipse Project: MVN eclipse:eclipse 3, General Command &NBS P  MVN Validate//Verify that the project is correct and that all required resources are available &NBS P  MVN compile//compiling the project's source code &NBS P &NBsp  MVN test-compile //compiling project test code  MVN test //using compiled test code to test compiled source codes & nbsp  MVN package //published formats, such as jars, bundle compiled source code &NBS P  MVN integration-test//process and publish packages in an environment where integration testing can run &NBS P  MVN Verify//Run any checks to verify that the package is valid and quality Standard  MVN Install//pack Installed in a local repository, can be used by other projects as a dependency /  MVN Deploy//execute in an integrated or release environment, copy the final version of the package to a remote repository so that other developers or projects can share  MVN generate-sources//Generate any additional source code required for the application, such as xdoclet &NBSP ;  MVN archetype:generate//Create Maven Project &NB Sp  MVN compile//compile source code  MVN test-compile//compile test code  MVN test//Run in Application Unit testing  MVN site//Build Project-related information sites  MVN clean Clear build results in target directory  MVN Package//Based on Project Generation JAR file  MVN Install/ /install in local Repository jar . NBSP;MVN eclipse:eclipse//Generate Eclipse project files &NB Sp
Ii. Example one: Create a MAVEN project 1, execute: MVN archetype:generate Enter information such as GroupID after prompting, such as: 2, modify the Pom.xml, here to test the new JSON dependency package JSON warehouse address in:http://mvnrepository.com/You can query add the following dependency 3, execute the MVN eclipse:eclipse command, import the project in eclipse after execution is complete 4. View the jar information introduced by the project
Maven3 common commands and using MAVEN to manage your own projects