如果您使用 SBT,请连接以下设置...
val deps_database : Seq[Setting[_]] =
Seq(
libraryDependencies ++= Seq(
"javax.jdo" % "jdo-api" % "3.1",
"org.datanucleus" % "datanucleus-core" % "4.0.6", //TODO:: Versions.datanucleus,
"org.datanucleus" % "datanucleus-api-jdo" % "4.0.5",
"org.datanucleus" % "datanucleus-jdo-query" % "4.0.4",
"org.datanucleus" % "datanucleus-rdbms" % "4.0.11",
"org.datanucleus" % "datanucleus-mongodb" % "4.0.5",
"com.h2database" % "h2" % "1.4.185",
"org.mongodb" % "mongo-java-driver" % "2.1.3",
"org.postgresql" % "postgresql" % "1.4-1200-jdbc41" ))
...在您的项目或子模块中,如下所示:
lazy val root =
project.in(file("."))
.settings(buildInfoSettings:_*)
.settings(disablePublishing:_*)
.aggregate(model, data, headless)
lazy val util =
project.in(file("util"))
.settings(publishSettings:_*)
.settings(librarySettings:_*)
.settings(paranoidOptions:_*)
.settings(otestFramework: _*)
.settings(deps_resolvers:_*)
.settings(deps_essential:_*)
lazy val model =
project.in(file("model"))
.settings(publishSettings:_*)
.settings(librarySettings:_*)
.settings(paranoidOptions:_*)
.settings(otestFramework: _*)
.settings(deps_resolvers:_*)
.settings(deps_essential:_*)
.settings(deps_database:_*)
.settings(managedSources:_*)
您可以在以下位置查看完整示例:http: //github.com/frgomes/poc-scala-datanucleus