maven applying proxy to nonProxyHost

亡梦爱人 提交于 2019-12-21 11:29:58

问题


I have the following proxy set up in my settings.xml file

<proxy>
  <id>optional</id>
  <active>true</active>
  <protocol>http</protocol>
  <username>someusername</username>
  <password>somepassword</password>
  <host>some.proxy.host.com</host>
  <port>5150</port>
  <nonProxyHosts>localhost|127.0.0.1</nonProxyHosts>
</proxy>

But it still applies the proxy to my localhost, everytime I have to do something with localhost I have to change active to false.


回答1:


According to the docs[1] you can set

<useProxy>false</useProxy>

to prevent this from happening.

[1] http://dev.day.com/docs/en/cq/current/core/how_to/how_to_use_the_vlttool/vlt-mavenplugin.html#Common%20Parameters




回答2:


if you are looking to deploy on localhost

try this

<nonProxyHosts>*localhost*</nonProxyHosts>

should work



来源:https://stackoverflow.com/questions/13728547/maven-applying-proxy-to-nonproxyhost

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!