maven - setting.xml 国内资源中央仓库配置样例

<?xml version="1.0" encoding="UTF-8"?>

<settings>

<localRepository>D:\repository</localRepository><!--需要改成自己的maven的本地仓库地址-->

    <mirrors>

        <!-- <mirror>

            <id>alimaven</id>

            <name>aliyun maven</name>

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

            <mirrorOf>central</mirrorOf>

        </mirror> -->

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

            <name>aliyun maven</name>

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

            <mirrorOf>central</mirrorOf>     

        </mirror>

    </mirrors>

  <profiles>

    <profile>

      <id>nexus</id>

        <repositories>

            <repository>

                <id>nexus</id>

                <name>local private nexus</name>

                <url>http://maven.oschina.net/content/groups/public/</url>

                <releases>

                    <enabled>true</enabled>

                </releases>

                <snapshots>

                    <enabled>false</enabled>

                </snapshots>

            </repository>

        </repositories>

        <pluginRepositories>

            <pluginRepository>

            <id>nexus</id>

            <name>local private nexus</name>

            <url>http://maven.oschina.net/content/groups/public/</url>

            <releases>

                <enabled>true</enabled>

            </releases>

            <snapshots>

                <enabled>false</enabled>

            </snapshots>

            </pluginRepository>

        </pluginRepositories>

    </profile></profiles>

</settings>

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。