I have a project which looks like this, using sbt 0.13.2:
base
- project
- Build.scala
- plugins.sbt
- lib
- unmanaged jar #1
- unmanaged jar #2
- core
- src
- .......
- clp
- src
- .......
- server
- src
- ......
where core
contains common code and clp
and server
are two related projects which both depend on core
.
I'm trying to find the right mojo in Build.scala
such that all three of these modules depend on base/lib
. Currently I'm cheating by using a symlink'd lib
dir in each of the modules, but I'd like to do it automatically without the symlinks.
Here's an example of Build.scala
file - how should I modify this to make the dependencies work?
import sbt._
import Keys._
object RootBuild extends Build {
lazy val buildSettings = Defaults.defaultSettings ++ Seq(
scalaVersion := "2.11.1",
unmanagedBase := baseDirectory.value / "lib"
)
lazy val standardSettings = buildSettings ++ Seq(
libraryDependencies ++= Seq(
"org.scalatest" % "scalatest_2.11" % "2.1.6" % "test",
"org.testng" % "testng" % "6.8.8"
)
)
lazy val Projects = Seq(root, core, clp)
lazy val root = Project("root", file("."), settings=standardSettings) aggregate(core, clp)
lazy val core = Project("core", file("core"), settings=standardSettings)
lazy val clp = Project("clp", file("clp"), settings=standardSettings) dependsOn core
lazy val server = Project("server", file("server"), settings=standardSettings) depensOn core
}