美文网首页
maven的settting.xml的镜像地址配置

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

作者: 你的努力时光不会辜负 | 来源:发表于2020-12-18 15:15 被阅读0次

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

    相关文章

      网友评论

          本文标题:maven的settting.xml的镜像地址配置

          本文链接:https://www.haomeiwen.com/subject/jbaxnktx.html