I'm used to Spring and Maven projects where I set up a multi-module project in Maven with projects like:
app-web
app-models
app-services
app-common
I'm now getting into using Play Framework 2 (Scala) and sbt.
Is there a similar concept with Play and sbt that I could group all of these projects into a single IntelliJ IDEA solution and sbt?
IntelliJ IDEA 13 (the latest version is 13.1.3) comes with the built-in SBT support, and the Ultimate edition adds Play support.
A multi-module sbt project can be imported to IDEA and is fully supported out of the box however it's Play-based or not (they're sbt projects after all).
You should try it out yourself with the following very simplistic build file build.sbt (or just generate a Play project with play new
or better now activator new [your-project-name] play-scala
):
lazy val a, b, c = project
and the following project/build.properties
:
sbt.version=0.13.5
Nothing but these two above files are needed to get you started with sbt/activator.
In IDEA, open the project using File > Open...
and select build.sbt
.
Click OK
to see another window where you specify additional configuration options for the project. Then the modules show up.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With