繁体   English   中英

如何在Maven的settings.xml中配置无代理?

[英]how to configure no proxy in settings.xml in maven?

<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0
https://maven.apache.org/xsd/settings-1.0.0.xsd">
<proxies>
<proxy>
  <id>myproxy</id>
  <active>true</active>
  <protocol>http</protocol>
  <host>10.51.0.90</host>
  <port>8181</port>
</proxy>
</proxies>
</settings>

我不想使用任何代理..如何配置以及在此xml文件中要进行哪些更改

保持xml文件不变; 只需删除主机地址和端口即可。 像下面

<host></host><port></port>
<proxy>
      <id>optional</id>
      <active>true</active>
      <protocol>http</protocol>
      <username></username>
      <password></password>
      <host>proxies.proxy.host</host>
      <port>8080</port>
      <nonProxyHosts>local.net|some.host.com</nonProxyHosts>
    </proxy>

您可以通过将true更改为false来关闭Maven的代理:

<proxy>
  <id>optional</id>
  <active>false</active>
</proxy>

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM