I have been trying to build up a project with some subprojects but I cannot get it to work as I want..
What I have now is a Play scala main project. I added two sub-modules, domain and infrastructure. I want everything to depend on everything. What I mean is that my infrastructure which is a scala module should have access to my main projects application.conf etc.
I'm going to use my infrastructure to store stuff in the database, which is set in the main projects conf-directory.
I have this structure right now:
- Main project
- app
-controllers
-views
- conf
-evolutions
-application.conf
-routes
- domain <- scala module
- infrastructure <- scala module
- project
- public
- test
- build.sbt
I want everything to be as one. All dependencies and modules should be accessable in all modules.
I want to be able to access the database that is setup in application.conf from infrastructure
My build.sbt now is:
name := "Main"
version := "1.0-SNAPSHOT"
play.Project.playScalaSettings
lazy val Main = project.in(file("."))
lazy val domain = project dependsOn Main
lazy val infrastructure = project dependsOn domain
libraryDependencies ++= Seq(
anorm,
jdbc,
cache,
"org.scala-tools" % "maven-scala-plugin" % "2.15.2"
)
How should my build.sbt be configured so that all modules can access everything in this project?
Thanks