如何提高idea自带maven的更新速度

作死用过idea自带maven的都知道,在国内真的贼慢。就导入几个依赖就得花上大半个小时。于是我一番百度,果断更改了maven镜像源。现在记录下来以免再次踩坑。

过程

  1. 打开File – Settings
    files
  2. 在搜索框内输入maven
  3. 打开如图所示的地址
    bal
  4. 修改, 加入如下代码
        <mirrors>
            <mirror>
                <id>alimaven</id>
                <name>aliyun maven</name>
                <url>http://maven.aliyun.com/nexus/content/groups/public/</url>
                <mirrorOf>central</mirrorOf>
            </mirror>
            <mirror>
             <id>uk</id>
                <mirrorOf>central</mirrorOf>
                <name>Human Readable Name for this Mirror.</name>
                <url>http://uk.maven.org/maven2/</url>
            </mirror>
            <mirror>
                <id>CN</id>
                <name>OSChina Central</name>
                <url>http://maven.oschina.net/content/groups/public/</url>
                <mirrorOf>central</mirrorOf>
            </mirror>
            <mirror>
                <id>nexus</id>
                <name>internal nexus repository</name>
                <!-- <url>http://192.168.1.100:8081/nexus/content/groups/public/</url>-->
                <url>http://repo.maven.apache.org/maven2</url>
                <mirrorOf>central</mirrorOf>
            </mirror>
        </mirrors>

    如图s

  5. 重启一下idea,试试效果