I am attempting to develop a Play 2.0 web application alongside a core Java module and other Java clients using SBT. Is it possible to configure this in a way where the Play application is still built properly?
I have developed a small one-off Play 2.0 app before but I have zero experience working with SBT directly. So far I have come up with the following directory structure and project/Build.scala
file.
root/
|---common/
|
|---client1/
|---client2/
|
|---webapp/
| |---app/
| |---conf/
| |---public/
|
|---project/
.
object ApplicationBuild extends Build {
val appVersion = "1.0-SNAPSHOT"
val appDependencies = Seq(
// Add your project dependencies here,
)
val common = Project("hi-common", file("common"))
val client1 = Project("hi-client1", file("client1")).dependsOn(common)
val client2 = Project("hi-client2", file("client2")).dependsOn(common)
val webapp = PlayProject("hi-webapp", appVersion, appDependencies, path = file("webapp"), mainLang = JAVA).settings(
// Add your own project settings here
).dependsOn(common)
val root = Project("hi", file(".")).aggregate(client1, client2, webapp)
}
Running sbt clean package
seems to work appropriately for the common
, client1
, and client2
modules but the webapp
module is not packaged to a point where I can run webapp/target/start
.
What can I do to achieve this as a single build with proper output?