I have a simple project with two submodules, proja and projb. Proja contains trait UserController used in UserControllerImpl inside projb.
project on github: https://github.com/aswarcewicz/play-sbt-multimodule
root build.sbt:
name := """proj"""
version := "1.0-SNAPSHOT"
lazy val proja = Project(id = "proj-a", base = file("modules/proj-a"))
.enablePlugins(PlayScala)
lazy val projb = Project(id = "proj-b", base = file("modules/proj-b"))
.enablePlugins(PlayScala)
.dependsOn(proja)
.aggregate(proja)
lazy val root = Project(id = "proj", base = file("."))
.enablePlugins(PlayScala)
.dependsOn(proja, projb)
.aggregate(proja, projb)
scalaVersion := "2.11.6"
libraryDependencies ++= Seq(
)
// Play provides two styles of routers, one expects its actions to be injected, the
// other, legacy style, accesses its actions statically.
routesGenerator := InjectedRoutesGenerator
and error from compiler:
modules/proj-b/app/controllers/UserControllerImpl.scala:5: not found: object controller [error] import controller._
/modules/proj-b/app/controllers/UserControllerImpl.scala:10: not found: type UserController [error] class UserControllerImpl extends Controller with UserController {
I have no idea what can be wrong.