You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by "BARANSKI, MIKE" <mb...@att.com> on 2016/08/23 14:24:30 UTC
How do I specify SOCKS Proxy in settings.xml
I have a SOCKS proxy that I need Maven to use when connecting to a certain mirror.
<mirrors>
<mirror>
<id>proxied.maven.central</id>
<name>proxied maven central</name>
<url>http://proxied-mvn-repo.mydomain.net:18080</url>
<mirrorOf>*</mirrorOf>
</mirror>
</mirrors>
I need something like the following to proxy, but can't figure out how to specify SOCKS:
<proxy>
<id>socks_proxy</id>
<active>true</active>
<protocol>socks</protocol>
<host>myhost</host>
<port>9999</port>
<username></username>
<password></password>
<nonProxyHosts> localhost,127.0.0.1|mavencentral|somethingelse</nonProxyHosts>
</proxy>
If I use MAVEN_OPTS=" -DsocksProxyHost=localhost -DsocksProxyPort=9999" it works OK, but I want to be able to set it in my settings so my IDE can use it. The IDE (Eclipse) does not use the MAVEN_OPTS for some reason with the m2e plugin.
IMO, it would be even better if we could specify a proxy in the mirror definition, or have a corresponding proxyHosts tag in the proxy definition so we could explicitly include hosts to proxy instead of the other way around.
Thanks,
M.