Where the public network, Ali maven maven source is switched to the source, ultrafast

Premise: install jdk, after the installation maven, finally eclise development tools

1. Installation jdk1.8 (omitted)

2 maven installation

2.1 Quguan network https://maven.apache.org/download.cgi download maven version, I use 3.3.9

2.2 extract the apache-maven-3.3.9-bin.tar.gz to the specified directory: for example, F: \ apache-maven-3.3.9

2.3 new environment variable, select the computer, right-click and select "" Properties "", then press the icon MAVEN_HOME, assignment F: \ apache-maven-3.3.9

2.4 editing environment variable Path path value added% MAVEN_HOME% \ bin \;


Note the semicolon:;% MAVEN_HOME% \ bin \;

2.5 maven has been installed, you can check whether we installed the DOS command success


 

2.6 into the maven installation directory, find the configuration file settings.xml, such as


 

Then edit settings.xml file, find node <mirrors> maven to fill in the source address </ mirrors>, the following content to fill between the node

 <mirror>
<id>alimaven</id> <name>aliyun maven</name> <url>http://maven.aliyun.com/nexus/content/groups/public/</url> <mirrorOf>central</mirrorOf> </mirror> <mirror> <id>alimaven</id> <mirrorOf>central</mirrorOf> <name>aliyun maven</name> <url>http://maven.aliyun.com/nexus/content/repositories/central/</url> </mirror>

Also be built as a local repository folder: F: \ mavenlib


 

2.7 Run command to check whether success

mvn help:system


   At this point, maven installed, download whiz! ! ! I am very satisfied.

 3. Alternatively, visual development tools I use eclipse (installation omitted)

    Open eclipse 3.1 development tools, find windows -------> preference -------> Installations add maven configuration, as shown:


Finally, click the Apply button in the lower right corner 

3.2 continues to find windows -------> preference -------> maven ------ > user settings, click update setting, update under settings.xml file, according to label operations, as shown :

 

maven installation and configuration all over, maven in eclipse tool can also be used

Guess you like

Origin www.cnblogs.com/dongguangming/p/12657526.html