我使用PostgreSQL 9.2与游戏框架2.1
我这里下载的驱动程序: http://jdbc.postgresql.org/download.html (JDBC4 PostgreSQL驱动,版本9.2-1002)
我的project/Build.scala
文件如下:
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)
}
我已经把JDBC驱动程序在游戏目录结构中的以下位置:
myApp/lib/postgresql-9.2-1002.jdbc4.jar
myApp/lib/9.2-1002.jdbc4.jar
myApp/lib/postgresql/postgresql/9.2-1002.jdbc4.jar
但是,在运行与应用程序play run
,我得到以下错误,并构建失败:
[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
关于如何获得播放任何提示! 认识我的jar文件?