【发布时间】:2017-03-29 17:15:57
【问题描述】:
来自this question 我正在尝试让我的设置正常工作,但测试不断失败,因为它们无法连接到远程站点。我升级到 Maven 3.3.9。
这是我想要工作的settings.xml:
<settings>
<proxies>
<proxy>
<id>httpProxy</id>
<active>true</active>
<protocol>http</protocol>
<host>proxy.local</host>
<port>3128</port>
<nonProxyHosts>localhost|*.local</nonProxyHosts>
</proxy>
<proxy>
<id>httpsProxy</id>
<active>true</active>
<protocol>https</protocol>
<host>10.20.20.208</host>
<port>3128</port>
<nonProxyHosts>localhost|*.local</nonProxyHosts>
</proxy>
</proxies>
:
这是一小部分,已经不行了:
<settings>
<proxies>
<proxy>
<protocol>https</protocol>
<host>10.20.20.208</host>
<port>3128</port>
</proxy>
</proxies>
:
我也尝试在其中输入 IP 地址。
我知道 Maven 选择了那个 XML,因为 Maven 在它的调试消息中这么说,如果我破坏了它的语法,Maven 会抱怨。
唯一真正有效的是将-Dhttps.proxyHost=proxy.local -Dhttps.proxyPort=3128 传递给 Maven。
我在 XML 中做错了什么?
【问题讨论】: