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で見ることができます。