【1】Download and install
Download the installation-free version, directly configure maven_home and path environment variables, enter mvn -v in the CMD interface, print out the expected information, and the installation is complete
[2] Configure maven in eclipse
![](http://dl2.iteye.com/upload/attachment/0115/8236/304fd3ee-3435-313b-9282-643872cf5ed2.png)
Click ok to complete the configuration
[3] Create a maven project and encounter the first error
Could not resolve archetype org.apache.maven.archetypes:maven-archetype-quickstart
(1) Add the following content to the setting.xml file
<mirror> <id>ibiblio.org</id> <name>ibiblio Mirror of http://repo1.maven.org/maven2/</name> <url>http://mirrors.ibiblio.org/pub/mirrors/maven2</url> <mirrorOf>central</mirrorOf> </mirror>
problem not solved
(2)
Download http://repo1.maven.org/maven2/archetype-catalog.xml to the local, and configure the document as follows:
![](http://dl2.iteye.com/upload/attachment/0115/8239/e0d28b17-80dd-35dd-902b-504c7a60d715.png)
problem not solved
(3)
Download a package first, maven-archetype-quickstart-XXjar
Execute under the path to the package in CMD
mvn install:install-file -DgroupId=org.apache.maven.archetypes -DartifactId=maven-archetype-quickstart -Dversiproblem not solved
(4) Modify the setting path in Eclipse, as shown below
![](http://dl2.iteye.com/upload/attachment/0115/8241/7663ff86-f647-3f42-8711-453cfab80baa.png)
Create the maven project again, the previous problem is solved, but a new problem arises:
![](http://dl2.iteye.com/upload/attachment/0115/8243/8aad7675-2332-341b-8f6b-a70b9f9ef52f.png)
(5)
![](http://dl2.iteye.com/upload/attachment/0115/8245/d97635c7-2308-3bdb-b580-0f753186ffbf.png)
The default working path of the maven project, not under the path of other projects~~~ Mine is in the path of other projects, I change it It will be fine after that~~~
![](http://dl2.iteye.com/upload/attachment/0115/8243/8aad7675-2332-341b-8f6b-a70b9f9ef52f.png)
(5)
![](http://dl2.iteye.com/upload/attachment/0115/8245/d97635c7-2308-3bdb-b580-0f753186ffbf.png)
The default working path of the maven project, not under the path of other projects~~~ Mine is in the path of other projects, I change it It will be fine after that~~~
Summarize:
[1] The use of maven requires downloading jar packages from the network, so the machine using maven must be able to connect to the Internet (or there are enough jar packages in the local repository of the machine)
[2] When configuring maven in eclipse, not only the installation path, but also the setting path must be configured
[3] The created maven project should be in the default workspace (this requires further exploration, not very clear)
Reference page:
【1】http://blog.csdn.net/zhshulin/article/details/37921705
【2】http://www.xuebuyuan.com/1900072.html
【3】http://zhidao.baidu.com/link?url=I4D8id2ZUZRw7h-XB-7gD_bVPXIpMJoSb-ZbqbSlh5JuQ1F-vMZnxj3z0EDJKSvn8UQRKb8tLpBlLoEzsm79ZK