使用阿里云Maven镜像仓库时settings.xml配置方法

*阿里云的Maven镜像仓库,速度非常满意,必须点赞。下面是完整settings.xml文件的简单配置:


<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">
    
    <localRepository>D:\Maven\repositorylocalRepository>
      
    <servers>
    servers>
      
    <mirrors>
          
        <mirror>
            <id>aliyunid>
            <mirrorOf>centralmirrorOf>
            <url>http://maven.aliyun.com/nexus/content/groups/public/url>
        mirror>
    mirrors>
    
    <profiles>
          
        <profile>
              
            <id>lovecto_profileid>
              
            <repositories>
                <repository>
                    <id>aliyunid>
                    <name>aliyunname>
                    <url>http://maven.aliyun.com/nexus/content/groups/public/url>
                    <releases>
                        <enabled>trueenabled>
                    releases>
                    <snapshots>
                        <enabled>trueenabled>
                        <updatePolicy>alwaysupdatePolicy>
                    snapshots>
                repository>
            repositories>
            
            <pluginRepositories>
                <pluginRepository>
                    <id>thirdparty_repositoryid>
                    <name>thirdparty_repositoryname>
                    <url>http://maven.aliyun.com/nexus/content/groups/public/url>
                    <releases>
                        <enabled>trueenabled>
                    releases>
                    <snapshots>
                        <enabled>trueenabled>
                        <updatePolicy>alwaysupdatePolicy>
                    snapshots>
                pluginRepository>
            pluginRepositories>
        profile>
    profiles>
    
    <activeProfiles>
        <activeProfile>lovecto_profileactiveProfile>
    activeProfiles>
settings>

copy使用时,记得修改下面的部分:

  
    <localRepository>D:\Maven\repositorylocalRepository>

你可能感兴趣的:(Spring,Boot,maven)