Sunday, November 9, 2014

Subprojects in PlayFramework 2.3 (Scala): overcoming difficulties

After struggling a bit to configure a Play 2.3 application (Scala) to work with subprojects (including another Play application) I've decided to create a simple example on GitHub.

Things to pay attention to:
  • Build.sbt in the Root project to configure modules
  • Root's conf/routes to attach Play subproject's routes to the routing system
  • Play subproject's routes in modules/{subproject-name}/conf/{subproject-name}.routes
  • Play subproject's build.sbt without unnecessary information
  • Play subproject's controllers and views reside in additional subpackages {subproject-name}
  • Explicitly added Assets controller in Play subproject
  • How assests are referenced in Play subproject's main.scala.html