Visit my.sonatype.com for documentation on Nexus Repository version 2.
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:
- 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 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
:
- 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
- Start or restart Nexus Repository to pick up the changes
- 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.