1. Download maven
http://maven.apache.org/
Choose a newer version down
2. Configuring M2_home Environment variables
Unzip first, create a new user variable m2_home, add the bin directory to the PATH variable
3. Test whether the installation is successful: Mvn-version
4, in a directory input MVN archetype:generate, to wait a while
The first time to download a lot of jar package, to generating project in Interactive mode to wait a long time do not close, continue to wait
5, let you enter Groupid:com.hy input artifactid:maven_1 Other default return, show the project build successfully, you can see in the current directory there is a maven_1 maven project
6, Packaging: In the directory of maven_1 input: MVN package Wait, a moment the project more than a target directory, there is a project jar
You can test JAVA-CP target/xx.jar com.hy.App output a Helloword
It worked!
Build a HelloWorld maven project with Maven