I want to download the oracle database drivers via SBT. As outlined here https://blogs.oracle.com/dev2dev/get-oracle-jdbc-drivers-and-ucp-from-oracle-maven-repository-without-ides they are password protected. In the SBT manual (http://www.scala-sbt.org/0.13/docs/Publishing.html) it is mentioned that credentials can be specified for an resolver. When applying it like:
resolvers += "oracle" at "https://maven.oracle.com"
credentials += Credentials("oracle download", "maven.oracle.com", "myEmail@gmail.com", "password")
libraryDependencies ++= Seq(
"com.oracle.jdbc" % "ojdbc8" % "12.2.0.1"
)
I still get an
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[warn] :: UNRESOLVED DEPENDENCIES ::
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[warn] :: com.oracle.jdbc#ojdbc8;12.2.0.1: not found
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
What is missing in the configuration?
edit
When changing the credentials to
credentials += Credentials("maven.oracle.com", "maven.oracle.com", "E-Mail", "password")
The result is
[error] Unable to find credentials for [OAM 11g @ login.oracle.com].
[warn] module not found: com.oracle.jdbc#ojdbc8;11.2.0.4
[warn] ==== local: tried
[warn] /Users/geoheil/.ivy2/local/com.oracle.jdbc/ojdbc8/11.2.0.4/ivys/ivy.xml
[warn] ==== oracle: tried
[warn] https://maven.oracle.com/com/oracle/jdbc/ojdbc8/11.2.0.4/ojdbc8-11.2.0.4.pom
[info] Resolving org.apache#apache;14 ...
[error] Unable to find credentials for [OAM 11g @ login.oracle.com].
[info] Resolving jline#jline;2.12.1 ...
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[warn] :: UNRESOLVED DEPENDENCIES ::
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[warn] :: com.oracle.jdbc#ojdbc8;11.2.0.4: not found
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
How can I find the correct oracle realm?
Unable to find credentials for [OAM 11g @ login.oracle.com]
would suggest that OAM 11g
is the realm, but that still results in the same problem. Also the https://blogs.oracle.com/dev2dev/get-oracle-jdbc-drivers-and-ucp-from-oracle-maven-repository-without-ides suggested OAM 11g
does not work.
For gradle, there seems to be a workaround: https://groups.google.com/forum/#!topic/gradle-dev/G8X_41lOIlU
maven {
url 'https://www.oracle.com/content/secure/maven/content'
credentials {
username 'user'
password 'password'
}
but so far I could not get any option (correct realm via SSO, workaround) to work with SBT.
edit2
The best workaround so far is Find Oracle JDBC driver in Maven repository
edit3
find a reproducible example here: https://github.com/geoHeil/oracleJBCMavenSBT