mac下IDEA中修改maven國內鏡像

IDEA默認的maven下載地址:https://repo.maven.apache.org/maven2 下載maven的依賴包很是的慢,須要修改成國內的鏡像,這樣下載就很快。apache

1.找到maven的地址,即IDEA默認maven的安裝地址。maven

 

 

2.新建settings.xml阿里雲

 

settings.xml的內容爲:url

<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0
                          https://maven.apache.org/xsd/settings-1.0.0.xsd">

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

這裏用的是國內阿里雲的鏡像。spa

3.重啓IDEA。code

相關文章
相關標籤/搜索