I am using postgresql 9.2 with play framework 2.1
I downloaded the driver here: http://jdbc.postgresql.org/download.html (JDBC4 Postgresql Driver, Version 9.2-1002)
My project/Build.scala
file is as follows:
import sbt._
import Keys._
import play.Project._
object ApplicationBuild extends Build {
val appName = "myApp"
val appVersion = "0.1"
val appDependencies = Seq(
"postgresql" % "postgresql" % "9.2-1002.jdbc4")
val main = play.Project(appName, appVersion, appDependencies)
}
I have placed the jdbc driver in the following locations in the play directory structure:
myApp/lib/postgresql-9.2-1002.jdbc4.jar
myApp/lib/9.2-1002.jdbc4.jar
myApp/lib/postgresql/postgresql/9.2-1002.jdbc4.jar
However, running the app with play run
, I get the following error and the build fails:
[warn] module not found: postgresql#postgresql;9.2-1002.jdbc4
[warn] ==== local: tried
[warn] /home/ubuntu/play-2.1.0/repository/local/postgresql/postgresql/9.2-1002.jdbc4/ivys/ivy.xml
[warn] ==== Typesafe Releases Repository: tried
[warn] http://repo.typesafe.com/typesafe/releases/postgresql/postgresql/9.2-1002.jdbc4/postgresql-9.2-1002.jdbc4.pom
[warn] ==== Typesafe Snapshots Repository: tried
[warn] http://repo.typesafe.com/typesafe/snapshots/postgresql/postgresql/9.2-1002.jdbc4/postgresql-9.2-1002.jdbc4.pom
[warn] ==== public: tried
[warn] http://repo1.maven.org/maven2/postgresql/postgresql/9.2-1002.jdbc4/postgresql-9.2-1002.jdbc4.pom
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[warn] :: UNRESOLVED DEPENDENCIES ::
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[warn] :: postgresql#postgresql;9.2-1002.jdbc4: not found
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
sbt.ResolveException: unresolved dependency: postgresql#postgresql;9.2-1002.jdbc4: not found
Any tips on how to get the Play! to recognize my jar file?