split()
这是根路径上的lazy val xxxRoot = (project in file("."))
.aggregate(projectA, projectB, projectC)
lazy val xxxSettings = Seq(
organization := "com.xxx",
version := "1.0-SNAPSHOT",
scalaVersion := "2.11.8"
)
lazy val projectA = (project in file("pa"))
.settings(xxxSettings: _*)
val projectB = (project in file("pb"))
.settings(xxxSettings: _*)
.dependsOn(projectA)
lazy val projectC = (project in file("pc"))
.settings(xxxSettings: _*)
.enablePlugins(PlayJava)
.enablePlugins(SbtWeb)
.enablePlugins(play.PlayScala)
.dependsOn(projectA)
我的问题是:
当我运行activator dist时。 build.sbt
将汇编sbt
和projectA
,但只留下projectC
。我想这可能是因为projectB
不是任何其他项目的依赖项,也不是播放应用程序。
我可以获得projectB
和projectA
的jar包。但无论projectC
是什么,projectB
的jar总是没有打包,即使没有编译。我想知道如何强制pb/build.sbt
编译sbt
并使用activator dist打包它?
答案 0 :(得分:0)
问题是没有子项目dependsOn
projectB
。也许您的意思是projectC
dependOn
projectB
而不是projectA
?
lazy val projectC = (project in file("pc"))
.settings(xxxSettings: _*)
.enablePlugins(PlayJava)
.enablePlugins(SbtWeb)
.enablePlugins(play.PlayScala)
.dependsOn(projectB)