【转】IntelliJ IDEA中Maven插件无法更新索引

IDEA使用的时候突然出现: update maven indices 然后需要下载一个大约800mb的包,需要翻墙。

在家挂一晚上估计都下不来。

解决思路,设置国内镜像下载,在pom.xml里面加入如下设置即可

<mirrors>
    <mirror>
        <id>nexus-osc</id>
        <mirrorOf>central</mirrorOf><!--这里指定只屏蔽central仓库-->
        <name>Nexus osc</name>
        <url>http://maven.oschina.net/content/groups/public/</url>
    </mirror>
    <mirror>
        <id>nexus-osc-thirdparty</id>
        <mirrorOf>thirdparty</mirrorOf>
        <name>Nexus osc thirdparty</name>
        <url>http://maven.oschina.net/content/repositories/thirdparty/</url>
    </mirror>
</mirrors>

详细可参考:

http://codepub.cn/2015/12/09/IntelliJ-IDEA-in-Maven-plugin-could-not-update-the-index-of-the-solution/

原文地址:https://www.cnblogs.com/Ronaldo-HD/p/12362232.html