maven settings.xml的一种设置

可以直接复制粘贴,自己在用

<?xml version="1.0" encoding="UTF-8"?>
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
          xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd">

    <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>nexus-aliyun</id>
            <mirrorOf>central</mirrorOf>
            <name>Nexus aliyun</name>
            <url>http://maven.aliyun.com/nexus/content/groups/public</url>
        </mirror>
        <mirror>
            <id>aliyun-public</id>
            <mirrorOf>*</mirrorOf>
            <name>aliyun public</name>
            <url>https://maven.aliyun.com/repository/public</url>
        </mirror>

        <mirror>
            <id>aliyun-central</id>
            <mirrorOf>*</mirrorOf>
            <name>aliyun central</name>
            <url>https://maven.aliyun.com/repository/central</url>
        </mirror>

        <mirror>
            <id>aliyun-spring</id>
            <mirrorOf>*</mirrorOf>
            <name>aliyun spring</name>
            <url>https://maven.aliyun.com/repository/spring</url>
        </mirror>

        <mirror>
            <id>aliyun-spring-plugin</id>
            <mirrorOf>*</mirrorOf>
            <name>aliyun spring-plugin</name>
            <url>https://maven.aliyun.com/repository/spring-plugin</url>
        </mirror>

        <mirror>
            <id>jboss-repository</id>
            <mirrorOf>central</mirrorOf>
            <name>boss repository</name>
            <url>http://repository.jboss.org/nexus/content/groups/public-jboss/</url>
        </mirror>

        <mirror>
            <id>nexus</id>
            <mirrorOf>central</mirrorOf>
            <name>internal nexus repository</name>
            <url>http://repo.maven.apache.org/maven2</url>
        </mirror>


    </mirrors>
</settings>

你可能感兴趣的:(个人经验)