How to configure a proxy repository to maven.oracle.com – Sonatype Support

Nexus Repository 2

Nexus Repository 2 officially sunsetted June 30, 2025. Visit my.sonatype.com for archived documentation. Migrate to Sonatype Nexus Repository 3 as soon as possible.


Why does proxying maven.oracle.com require a special configuration?

Oracle requires a complicated interaction that involves authentication, large numbers of HTTP redirects, and session cookies for a single content download. These requirements are not typical of other remote URLs you might usually proxy.

More information about Oracle's Maven repository is at http://www.oracle.com/webfolder/application/maven/doc.html

Nexus Repository 3.2.1 and greater

Nexus Repository 3.2.1 and greater can proxy maven.oracle.com

Proxying https://maven.oracle.com requires special HTTP options:

By enabling these options, you allow the repository manager to maintain the authentication state in a cookie that would be sent with each request, limiting the need for authentication-related redirects and avoiding timeouts.

Nexus Repository 3.0 to 3.2

Nexus Repository 3.0 to 3.2 versions do not have support for proxying maven.oracle.com.

Nexus Repository 2.11.2 and greater

Nexus Repository 2.11.2 and greater can be configured to use a Maven 2 proxy repository to https://maven.oracle.com:

  1. Edit ${NEXUS_INSTALL_DIR}/conf/nexus.properties, by adding these lines:
   # Comma separated list of hostnames that needs to accept circular redirections
   nexus.remoteStorage.enableCircularRedirectsForHosts=maven.oracle.com
   # Comma separated list of hostnames that benefit from using cookies
   nexus.remoteStorage.useCookiesForHosts=maven.oracle.com
  1. Start or restart Nexus Repository to pick up the changes
  2. Create an Oracle Maven 2 proxy repository using https://maven.oracle.com as the remote URL. Enter your Oracle credentials into the Authentication section of the repository configuration.

The Nexus Repository 2 Browse Remote feature does not work with the Oracle repository. Oracle does not support browsing the directory listing of their repository.