maven的settting.xml的镜像地址配置

<!-- mirrors

  | This is a list of mirrors to be used in downloading artifacts from remote repositories.

  |

  | It works like this: a POM may declare a repository to use in resolving certain artifacts.

  | However, this repository may have problems with heavy traffic at times, so people have mirrored

  | it to several places.

  |

  | That repository definition will have a unique id, so we can create a mirror reference for that

  | repository, to be used as an alternate download site. The mirror site will be the preferred

  | server for that repository.

  |-->

  <mirrors>

    <!-- mirror

    | Specifies a repository mirror site to use instead of a given repository. The repository that

    | this mirror serves has an ID that matches the mirrorOf element of this mirror. IDs are used

    | for inheritance and direct lookup purposes, and must be unique across the set of mirrors.

    |

    <mirror>

      <id>mirrorId</id>

      <mirrorOf>repositoryId</mirrorOf>

      <name>Human Readable Name for this Mirror.</name>

      <url>http://my.repository.com/repo/path</url>

    </mirror>

    -->

<mirror>

    <id>alimaven</id>

    <mirrorOf>central</mirrorOf>

    <name>aliyun maven</name>

    <url>https://maven.aliyun.com/repository/central</url>

</mirror>

<mirror> 

<id>nexus-aliyun</id>

<mirrorOf>*</mirrorOf>

<name>Nexus aliyun</name>

<url>http://maven.aliyun.com/nexus/content/groups/public</url>

</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>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>

  <!--<mirror>



来源:https://www.cnblogs.com/ixtao/p/13888004.html

https://blog.csdn.net/qq_37878579/article/details/102552087

https://blog.csdn.net/u010072711/article/details/80516899

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
【社区内容提示】社区部分内容疑似由AI辅助生成,浏览时请结合常识与多方信息审慎甄别。
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

相关阅读更多精彩内容

  • 用eclipse打开旧的xxpay工程,发现不可用,有库无法找到,标记为lastupdated, 打开lastup...
    宁正龙阅读 1,166评论 0 0
  • IDEA配置Maven [TOC] 1.在IDEA需要配置哪些东西 maven程序:IDEA配置maven通俗的讲...
    有_味阅读 13,529评论 0 3
  • 一.配置Maven环境 1.下载apache-maven文件,选择自己需要的版本, 2.解压1所下载文件,本人解压...
    咕噜咕噜_f443阅读 2,490评论 0 1
  • 如何在idea中设置该项目独立的本地仓库和maven设置 1、在你想存放仓库(repository)的目录下创建r...
    d_and_u阅读 3,311评论 0 0
  • 1.官网下载maven最新版本包,windows用,*bin.zip 2.解压到本地目录,防止意外路径不要带中文 ...
    佛系疯子阅读 1,702评论 0 0

友情链接更多精彩内容