Leif160519的blog Leif160519的blog

——————

目录
maven设置代理下载依赖库
/      

maven设置代理下载依赖库

编辑~/.m2/settings.xml

settings中间插入下列内容:

<proxies>
<proxy>
      <id>cn-squid</id>
      <active>true</active>
      <protocol>http</protocol>
      <username>proxyuser</username>
      <password>proxypass</password>
      <host><agent_ip></host>
      <port>3128</port>
      <nonProxyHosts>127.0.0.1|other.host</nonProxyHosts>
  </proxy>
</proxies>

注意:

  • 如果代理无需身份验证,则可以删除proxyuserproxypass两行
  • 如果配置了多个代理,则排在第一个的代理生效
  • nonProxyHosts可以用|分割多个不需要代理的地址

“The first 90% of the code accounts for the first 90% of the development time. The remaining 10% of the code accounts for the other 90% of the development time.” – Tom Cargill

标  题maven设置代理下载依赖库
作  者Leif160519
出  处https://github.icu/articles/2021/05/27/1622076837301.html
关于博主:坐标南京,运维工程师,如有问题探讨可以直接下方留言。
声援博主:如果您觉得文章对您有帮助,可以评论、订阅、收藏。您的鼓励是博主的最大动力!