编辑~/.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>
注意:
proxyuser
和proxypass
两行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设置代理下载依赖库