Given a JAR, namely ojdbc6.jar
from Oracle, I tried to add it as an external JAR to my SBT project.
Note -I'm using this project as a sandbox, which explains the external JAR approach.
First, I copied it to my $SBT_HOME/lib
directory, per this answer to use unmanaged JARs.
To determine the version of the JAR, i.e. the third argument of the libraryDependency
, I ran:
$unzip ojdbc6.jar
$cat ./META-INF/MANIFEST.MF
Manifest-Version: 1.0
Ant-Version: Apache Ant 1.6.5
Created-By: 1.5.0_51-b10 (Sun Microsystems Inc.)
Implementation-Vendor: Oracle Corporation
Implementation-Title: JDBC
Implementation-Version: 11.2.0.4.0
So, then I updated my build.sbt
with:
libraryDependencies ++= Seq(
"com.oracle.jdbc" % "ojdbc6" % "11.2.0.4.0"
)
But, upon running sbt run
, I see:
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[warn] :: UNRESOLVED DEPENDENCIES ::
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[warn] :: com.oracle.jdbc#ojdbc6;11.2.0.4.0: not found
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
How can I add this JAR to my SBT project as an external dependency?