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?
The nonProxyHosts setting accepts wild cards, and each host not to proxy is separated by the | character. This matches the JDK configuration equivalent. Please note that currently NTLM proxies are not supported as they have not been tested.
settings. xml is not required (and thus not autocreated in ~/. m2 folder) unless you want to change the default settings. Standalone maven and the maven in eclipse will use the same local repository (~/.
By default, Maven will use the first active proxy definition it finds. Note that this is the protocol the proxy uses – the protocol of our requests (ftp://, http://, https://) is independent of this.
When settings.xml
is ignored, I tend to check first if the environment variable M2_HOME
:
settings.xml
mglauche comments:
M2_HOME
should specify the systemsettings.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:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With