我使用PostgreSQL 9.2与游戏框架2.1在游戏框架的PostgreSQL 9.2罐子未解析的依赖性
我下载此驱动程序: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文件?
是的,我傻了。我需要从“Build”中删除依赖项。如果我想将它手动包含在'myApp/lib'中,可以使用scala。干杯 – 2013-02-12 19:55:39