How can I configure Nexus Repository 2 to use a SOCKS proxy?

Visit for documentation on Nexus Repository version 2.

To configure Nexus Repository 2 to go through a SOCKS proxy server when accessing the internet, edit $NEXUS_HOME/bin/jsw/wrapper.conf and add the following lines:<proxy-host><proxy-port>

The numbers after are sequence numbers, you need to use the next ones available after the other exiting lines.

If you're running a recent version of Java 8 you can also configure non-proxy hosts by adding the following:|someotherhost

The format of this is the same as for http.nonProxyHosts, as described here.  It isn't clear exactly what version the non-proxy hosts setting went into (the change is here from the JDK issue, but it isn't documented anywhere). Version 1.8.0_40 definitely has it.

Make sure Nexus Repository 2 is using the latest version of Java 8 or newer - Java 7 is known not to work.

Note: If you are using Nexus Repository 2 Pro you will need to uninstall the p2 plugins in order for this to work. This is because Nexus Repository 2 Pro comes with a stripped-down instance of Eclipse. This embedded instance is needed for Eclipse p2 repository support, and the code in the embedded Eclipse instance clears the socks system properties.

To remove these plugins delete the following directories from the installation:

  • $NEXUS_HOME/nexus/WEB-INF/plugin-repository/nexus-p2-bridge-plugin-2.11.2-06
  • $NEXUS_HOME/nexus/WEB-INF/plugin-repositorynexus-p2-repository-plugin-2.11.2-06

This will remove p2 repository support in Nexus Repository 2 Pro but will not have any other impact.

Have more questions? Submit a request


Article is closed for comments.