码迷,mamicode.com
首页 > 其他好文 > 详细

maven settings.xml

时间:2020-05-01 20:30:57      阅读:67      评论:0      收藏:0      [点我收藏+]

标签:xsd   epo   set   tor   配置   mil   version   支付宝   robot   

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>

    【微信】打赏二维码:

    技术图片

    【支付宝】打赏二维码:

    技术图片

maven settings.xml

标签:xsd   epo   set   tor   配置   mil   version   支付宝   robot   

原文地址:https://www.cnblogs.com/bill-robot/p/12814488.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!