zoukankan      html  css  js  c++  java
  • maven配置阿里云仓库镜像

    为什么要配置阿里云镜像呢?

    国内连接maven官方的仓库更新依赖库,网速一般很慢

    原来的maven地址应该是:https://repo.maven.apache.org/maven2,但是太慢了

    阿里云是国内maven仓库镜像,配置以后,当使用maven下载jar包时,速度更快

     

    在maven安装目录下的settings.xml文件里的mirrors节点中,添加如下子节点:

            <mirror>
                <id>alimaven</id>
                <mirrorOf>central</mirrorOf>
                <name>aliyun maven</name>
                <url>http://maven.aliyun.com/nexus/content/repositories/central/</url>
            </mirror>
            <mirror>
                <id>alimaven</id>
                <name>aliyun maven</name>
                <url>http://maven.aliyun.com/nexus/content/groups/public/</url>
                <mirrorOf>central</mirrorOf>
            </mirror>
            <mirror>
                <id>central</id>
                <name>Maven Repository Switchboard</name>
                <url>http://repo1.maven.org/maven2/</url>
                <mirrorOf>central</mirrorOf>
            </mirror>
            <mirror>
                <id>repo2</id>
                <mirrorOf>central</mirrorOf>
                <name>Human Readable Name for this Mirror.</name>
                <url>http://repo2.maven.org/maven2/</url>
            </mirror>
            <mirror>
                <id>ibiblio</id>
                <mirrorOf>central</mirrorOf>
                <name>Human Readable Name for this Mirror.</name>
                <url>http://mirrors.ibiblio.org/pub/mirrors/maven2/</url>
            </mirror>
            <mirror>
                <id>jboss-public-repository-group</id>
                <mirrorOf>central</mirrorOf>
                <name>JBoss Public Repository Group</name>
                <url>http://repository.jboss.org/nexus/content/groups/public</url>
            </mirror>
            <mirror>
                <id>google-maven-central</id>
                <name>Google Maven Central</name>
                <url>https://maven-central.storage.googleapis.com
                </url>
                <mirrorOf>central</mirrorOf>
            </mirror>
            <!-- 中央仓库在中国的镜像 -->
            <mirror>
                <id>maven.net.cn</id>
                <name>oneof the central mirrors in china</name>
                <url>http://maven.net.cn/content/groups/public/</url>
                <mirrorOf>central</mirrorOf>
            </mirror>
  • 相关阅读:
    Spring Bean Expression Language(EL)
    Spring-web-security Issue (Access is denied. User must have one of the these roles: ACTUATOR)
    数据库学习笔记day04
    数据库学习笔记day03
    数据库学习笔记day01+day02
    Java学习笔记--线程day01
    Java学习笔记-Java文件操作流
    第一次月测题
    第一次月测内容疑问总结
    java核心API
  • 原文地址:https://www.cnblogs.com/FengZeng666/p/11992420.html
Copyright © 2011-2022 走看看