How to configure a proxy repository to maven.oracle.com

Why does proxying maven.oracle.com require 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 3.2.1 and greater

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

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

  • Enable circular redirects must be checked
  • Enable cookies must be checked.
  • Valid Oracle authentication credentials must be entered for the proxy repository

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 3.00 to 3.2.0 versions

Nexus 3.00 to 3.2.0 versions do not have support for proxying maven.oracle.com.

Nexus 2 versions 2.11.2 and greater

Nexus 2 versions 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
    
  2. Start or restart Nexus to pick up the changes
  3. 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.

Nexus 2.x Browse Remote does not work with the Oracle repository. Oracle does not support browsing the directory listing of their repository. [NEXUS-8272]

Have more questions? Submit a request

0 Comments

Article is closed for comments.
Powered by Zendesk