settings.xml模板

<settings>
  <!-- localRepository | The path to the local repository maven will use to store artifacts. | | Default: ~/.m2/repository -->
  <localRepository>D:/.m2/repository</localRepository>




    <pluginGroups> 

    </pluginGroups> 

    <proxies> 

    </proxies> 

    <!-- servers | This is a list of authentication profiles,keyed by the server-id used within the system. | Authentication profiles can be used whenever maven must make a connection to a Remote Server. |--> 
    <servers> 

        <server> 
            <id>snapshots</id> 
            <username>snapshotsAdmin</username> 
            <password>123456</password> 
        </server> 

    </servers> 


    <mirrors> 

        <mirror> 
            <id>tbmirror</id> 
            <mirrorOf>central</mirrorOf> 
            <name>alibaba mirror</name> 
            <url>http://mvnrepo.xxxxxx.com/mvn/repository</url>

        </mirror> 
        <mirror> 
            <id>tbmirror-snapshots</id> 
            <mirrorOf>snapshots</mirrorOf> 
            <name>alibaba mirror snapshots</name> 
            <url>http://mvnrepo.xxxxxx.com/mvn/repository</url> 
        </mirror> 
    </mirrors> 


    <profiles> 

        <profile> 
            <id>nexus</id> 
            <repositories> 
                <repository> 
                    <id>central</id> 
                    <url>http://mvnrepo.xxxxxx.com/mvn/repository</url> 
                    <releases> 
                        <enabled>true</enabled> 
                    </releases> 
                    <snapshots> 
                        <enabled>false</enabled> 
                    </snapshots> 
                </repository> 
                <repository> 
                    <id>snapshots</id> 
                    <url>http://mvnrepo.xxxxxx.com/mvn/repository</url> 
                    <releases> 
                        <enabled>false</enabled> 
                    </releases> 
                    <snapshots> 
                        <enabled>true</enabled> 
                    </snapshots> 
                </repository> 
            </repositories> 
            <pluginRepositories> 
                <pluginRepository> 
                    <id>central</id> 
                    <url>http://mvnrepo.taobao.ali.com/mvn/repository</url> 
                    <releases> 
                        <enabled>true</enabled> 
                    </releases> 
                    <snapshots> 
                        <enabled>false</enabled> 
                    </snapshots> 
                </pluginRepository> 
                <pluginRepository> 
                    <id>snapshots</id> 
                    <url>http://mvnrepo.xxxxxx.com/mvn/repository</url> 
                    <releases> 
                        <enabled>false</enabled> 
                    </releases> 
                    <snapshots> 
                        <enabled>true</enabled> 
                    </snapshots> 
                </pluginRepository> 
            </pluginRepositories> 
        </profile> 

    </profiles> 

    <!-- activeProfiles | List of profiles that are active for all builds. | --> 
    <activeProfiles> 
        <activeProfile>nexus</activeProfile> 
    </activeProfiles> 

</settings>

相关文章

php输出xml格式字符串
J2ME Mobile 3D入门教程系列文章之一
XML轻松学习手册
XML入门的常见问题(一)
XML入门的常见问题(三)
XML轻松学习手册(2)XML概念