作者热门文章
- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
Maven 允许定义多个代理:
<!-- proxies
| This is a list of proxies which can be used on this machine to connect to the network.
| Unless otherwise specified (by system property or command-line switch), the first proxy
| specification in this list marked as active will be used.
|-->
<proxies>
<proxy>
<id>proxy_gcp</id>
<active>true</active>
<protocol>http</protocol>
<host>app-proxy.gcp.acme.fr</host>
<port>80</port>
</proxy>
<proxy>
<id>proxy_aws</id>
<active>false</active>
<protocol>http</protocol>
<host>app-proxy.aws.acme.fr</host>
<port>80</port>
</proxy>
</proxies>
按照默认 settings.xml 中的规定,
Unless otherwise specified (by system property or command-line switch), the first proxy specification in this list marked as active will be used
.
最佳答案
它指的是 JVM 级别的系统属性,而不是 Maven 的:https://docs.oracle.com/javase/8/docs/technotes/guides/net/proxies.html
$ mvn install -Dhttp.proxyHost=<host> -Dhttp.proxyPort=<port> -Dhttp.nonProxyHosts=<nonProxyHosts>
关于maven - 如何让 maven 不使用 settings.xml 中的第一个代理?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/67022473/
我是一名优秀的程序员,十分优秀!