在currentuser目录下.m2文件夹中,新增一个setting.xml文件
<settings>
<proxies>
<proxy>
<active>true</active>
<protocol>http</protocol>
<host>10.110.1.238</host> =>代理服务器地址
<port>3128</port>
<username>proxyuser</username>
<password>somepassword</password>
<nonProxyHosts>www.google.com|*.somewhere.com</nonProxyHosts>
</proxy>
</proxies>
</settings>