Gradle currently can't handle the redirects needed by the realm-based
SSO mechanism used by Oracle's maven repo.
A workaround is to use this URL instead
url "https://www.oracle.com/content/secure/maven/content"
In addition, you need to supply credentials for authentication.
Here's a minimal example:
plugins {
id 'java'
}
repositories {
jcenter()
maven {
url "https://www.oracle.com/content/secure/maven/content"
credentials {
username = '<Oracle Account email address>'
password = '<Oracle Account password>'
}
}
}
dependencies {
compile 'com.oracle.jdbc:ojdbc7:12.1.0.2'
}
I have a github repo with full example including a way of encrypting the password using maven's settings.xml
and settings-security.xml
: example-gradle-oracle
I am adding = after username and password as mentioned in Gradle AuthenticationSupported.java file
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…