Maven Proxy settings.xml ignored

我是研究僧i 提交于 2019-12-04 10:11:47

问题


Maybe someone can help me with the following Problem:

I have declared a proxy in M as described at maven - Configuring a proxy.

For some reason the proxy is ignored, although the proxy itself works correctly with maven when setting the proxy via command line.

When calling the maven goal like this, it works:

mvn -DproxySet=true -DproxyHost=myproxy.com -DproxyPort=3128 eclipse:eclipse

Any suggestions for this problem?


回答1:


When settings.xml is ignored, I tend to check first if the environment variable M2_HOME:

  • exists in the current shell session
  • refers to the parent directory of said settings.xml

mglauche comments:

M2_HOME should specify the system settings.xml to use.
You still have your user settings in ${home}/.m2/settings.xml, which should overwrite anything in the system settings.


For Maven Eclipse, as mglauche mentions in the comments, specify the full path in the maven preferences:



来源:https://stackoverflow.com/questions/4828567/maven-proxy-settings-xml-ignored

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