Category:其他
Article From:https://www.cnblogs.com/williamjie/p/9121970.html

 

 

1: configuring maven

1.Download maven, select Binary tar.gz, extract copy to directory /usr/local/

1
https://maven.apache.org/download.cgi

2.Configure the default Maven path for the system to open the configuration file

1
$ open ~/.bash_profile

   Write path information

1
2
export M2_HOME=/usr/local/apache-maven-3.3.9
export PATH=$PATH:$M2_HOME/bin

   Bring it into effect

1
$ source ~/.bash_profile

3.Check:

1
Enter MVN -v to see whether Maven is successfully installed

4.Replace the Maven source, the source of the Ali cloud:

Open the Maven configuration file, such as:

1
$ open /usr/local/apache-maven-3.3.9/conf/settings.xml

Find < mirrors> < /mirrors> label pair

The effect after adding is:

1
2
3
4
5
6
7
8
9
10
<mirrors>
 
  <mirror> 
    <id>alimaven</id> 
    <name>aliyun maven</name> 
    <url>http://maven.aliyun.com/nexus/content/groups/public/</url> 
    <mirrorOf>central</mirrorOf> 
  </mirror> 
 
</mirrors>

 

Leave a Reply

Your email address will not be published. Required fields are marked *