我正在尝试使用 SBT 开发 Play 2.0 Web 应用程序以及核心 Java 模块和其他 Java 客户端。是否可以通过仍然正确构建 Play 应用程序的方式进行配置?
我之前开发过一个小型的一次性 Play 2.0 应用程序,但我直接使用 SBT 的经验为零。到目前为止,我已经提出了以下目录结构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
似乎适合common
, client1
, and client2
模块但是webapp
模块未打包到我可以运行的程度webapp/target/start
.
我可以做什么来实现这一点作为具有正确输出的单个构建?