maven settings.xml

2020-05-01 16:04:58来源:博客园 阅读 ()

新老客户大回馈,云服务器低至5折

maven settings.xml

maven settings.xml
每次重装maven都需要配置settings.xml所以在这里记录一下
win

C:\Users\Administrator\.m2\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">
  <localRepository>D:\dev_mavenRepository</localRepository>
  <pluginGroups>    
  </pluginGroups>
  <proxies>
  </proxies>
  <servers>
  </servers>
  <mirrors>
    <mirror>
      <id>aliyun</id>
      <name>aliyun</name>
      <mirrorOf>*</mirrorOf>
      <url>https://maven.aliyun.com/repository/public</url>
    </mirror>
  </mirrors>
  <profiles>
  </profiles>
</settings>

linux

/etc/maven/settings.xml或者/opt/apache-maven-3.3.9/conf/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">
  <localRepository>/home/dev_mavenRepository</localRepository>
  <pluginGroups>
  </pluginGroups>
  <proxies>
  </proxies>
  <servers>
  </servers>
  <mirrors>
  <!--设置远程库地址-->
    <mirror>
    <id>aliyun</id>
    <name>aliyun</name>
    <url>https://maven.aliyun.com/repository/public</url>
    <mirrorOf>*</mirrorOf>
    </mirror>
  </mirrors>
  <profiles>
  </profiles>
</settings>

    【微信】打赏二维码:

    微信二维码

    【支付宝】打赏二维码:

    支付宝二维码

原文链接:https://www.cnblogs.com/bill-robot/p/12814488.html
如有疑问请与原作者联系

标签:

版权申明:本站文章部分自网络,如有侵权,请联系:west999com@outlook.com
特别注意:本站所有转载文章言论不代表本站观点,本站所提供的摄影照片,插画,设计作品,如需使用,请与原作者联系,版权归原作者所有

上一篇:SpringCloudAlibaba微服务实战教程系列

下一篇:LeetCode 面试题14- II. 剪绳子 II