如何让maven不使用settings.xml中的第一个代理?

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.

但是我找不到关于如何通过系统属性或命令行开关指定其他方式的任何方向。

如何告诉 Maven 使用列表中的第二个代理(命令行或带有属性)?

以上是如何让maven不使用settings.xml中的第一个代理?的全部内容。
THE END
分享
二维码
< <上一篇
下一篇>>