Java学习之路

maven镜像地址大全

2019-07-07  本文已影响1人  椰子奶糖

引自:https://blog.csdn.net/Hello_World_QWP/article/details/82459915

<mirror>

      <id>alimaven</id>

      <name>aliyun maven</name>

      <url>[http://maven.aliyun.com/nexus/content/groups/public/](http://maven.aliyun.com/nexus/content/groups/public/)</url>

      <mirrorOf>central</mirrorOf>        

</mirror>

 <mirror>

    <id>ibiblio</id>

    <name>Mirror from Maven ibiblio</name>

    <url>[http://mirrors.ibiblio.org/pub/mirrors/maven2/](http://mirrors.ibiblio.org/pub/mirrors/maven2/)</url>

    <mirrorOf>central</mirrorOf>

</mirror>

<mirror>

    <id>huaweicloud</id>

    <name>mirror from maven huaweicloud</name>

    <url>[https://mirror.huaweicloud.com/repository/maven/](https://mirror.huaweicloud.com/repository/maven/)</url>

    <mirrorOf>central</mirrorOf>

</mirror>

<server>

    <id>huaweicloud</id>

    <username>anonymous</username>

    <password>devcloud</password>

</server>

华为的要加server子标签

Ps:配置了国内的镜像库依然从国外中央仓库下载:

<repositories>

<repository>

    <id>nexus-aliyun</id>

    <name>nexus-aliyun</name>

    <url>[http://maven.aliyun.com/nexus/content/groups/public/](http://maven.aliyun.com/nexus/content/groups/public/)</url>

    <releases>

        <enabled>true</enabled>

    </releases>

    <snapshots>

        <enabled>false</enabled>

    </snapshots>

</repository>

</repositories>

只需将这段加到pom.xml文件中即可
上一篇 下一篇

猜你喜欢

热点阅读