maven,conf,setting.xml配置

<?xml version="1.0" encoding="UTF-8"?>
<settings xmlns="http://maven.apache.org/SETTINGS/1.2.0"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.2.0 http://maven.apache.org/xsd/settings-1.2.0.xsd">
    <!-- localRepository
   | The path to the local repository maven will use to store artifacts.
   |
   | Default: ${user.home}/.m2/repository
  <localRepository>/path/to/local/repo</localRepository>
  -->
    <localRepository>D:\maven_repository</localRepository>
    <pluginGroups />

    <!-- <servers>
        <server>
            <id>goplay-public</id>
            <username>maven</username>
            <password>******</password>
        </server>
        <server>
            <id>goplay-releases</id>
            <username>maven</username>
            <password>******</password>
        </server>
        <server>
            <id>goplay-snapshots</id>
            <username>maven</username>
            <password>******</password>
        </server>
    </servers> -->

    <profiles>
        <profile>
            <id>your-project</id>
            <repositories>
                <repository>
                    <id>tencent</id>
                    <name>Nexus tencentyun</name>
                    <url>http://mirrors.cloud.tencent.com/nexus/repository/maven-public/</url>
                    <releases>
                        <enabled>true</enabled>
                    </releases>
                    <snapshots>
                        <enabled>true</enabled>
                    </snapshots>
                </repository>

                <repository>
                    <id>aliyun</id>
                    <name>Nexus aliyun</name>
                    <url>https://maven.aliyun.com/repository/public</url>
                    <releases>
                        <enabled>true</enabled>
                    </releases>
                    <snapshots>
                        <enabled>true</enabled>
                    </snapshots>
                </repository>

                <repository>
                    <id>nexus-163</id>
                    <name>Nexus 163</name>
                    <url>http://mirrors.163.com/maven/repository/maven-public/</url>
                    <layout>default</layout>
                    <snapshots>
                        <enabled>false</enabled>
                    </snapshots>
                    <releases>
                        <enabled>true</enabled>
                    </releases>
                </repository>

                <repository>
                    <id>central</id>
                    <name>Maven Central Repository</name>
                    <url>https://repo.maven.apache.org/maven2/</url>
                    <releases>
                        <enabled>true</enabled>
                    </releases>
                    <snapshots>
                        <enabled>true</enabled>
                    </snapshots>
                </repository>
                <!-- <repository>
                    <id>goplay-public</id>
                    <name>Maven Public</name>
                    <url>https://nexus3.tools5c6ae5402bbe9415.com/repository/goplay-public/</url>
                    <releases>
                        <enabled>true</enabled>
                    </releases>
                    <snapshots>
                        <enabled>true</enabled>
                    </snapshots>
                </repository> -->
            </repositories>

            <!-- <pluginRepositories>
                <pluginRepository>
                    <id>goplay-public</id>
                    <name>Maven Public</name>
                    <url>https://nexus3.tools5c6ae5402bbe9415.com/repository/goplay-public/</url>
                    <releases>
                        <enabled>true</enabled>
                    </releases>
                    <snapshots>
                        <enabled>true</enabled>
                    </snapshots>
                </pluginRepository>
            </pluginRepositories> -->

            <activation>
                <activeByDefault>true</activeByDefault>
            </activation>
        </profile>
    </profiles>

    <activeProfiles>
        <activeProfile>your-project</activeProfile>
    </activeProfiles>

    <mirrors>
        <mirror>
            <id>aliyunmaven</id>
            <mirrorOf>*</mirrorOf>
            <name>阿里云公共仓库</name>
            <url>https://maven.aliyun.com/repository/public</url>
        </mirror>

        <mirror>
            <id>nexus-tencentyun</id>
            <mirrorOf>*</mirrorOf>
            <name>Nexus tencentyun</name>
            <url>http://mirrors.cloud.tencent.com/nexus/repository/maven-public/</url>
        </mirror>
    </mirrors>

</settings>
posted @ 2024-03-25 14:54  Journey&Flower  阅读(12)  评论(0编辑  收藏  举报