https://github.com/jasongoodwin/play21-multimodule-demo has the code. I've recreated this problem on 3 different projects. I don't know what's up. once you put the aggregate and dependsOn in the build.scala file the project throws an error when trying to start play.
[info] Loading global plugins from /Users/jgoodwin/.sbt/plugins [info] Loading project definition from /Users/jgoodwin/Development/src/ninjakeyboard/test/tmp/play21-multimodule-demo/project [error] java.lang.ExceptionInInitializerError [error] Use 'last' for the full log. Project loading failed: (r)etry, (q)uit, (l)ast, or (i)gnore? q
Build file
import sbt._ import Keys._ import play.Project._
object ApplicationBuild extends Build {
val appName = "multimodule-demo" val appVersion = "1.0-SNAPSHOT" //val scalaVersion = "2.10.0"
val appDependencies = Seq( // Add your project dependencies here, jdbc, anorm )
val buildSettings = ( scalaVersion := "2.10.0" )
val main = play.Project(appName, appVersion, appDependencies, path = file("web")).settings( // Add your own project settings here ).aggregate(testmodule).dependsOn(testmodule)
val testmodule = Project( "testmodule", file("testmodlue"), settings = buildSettings )
}