activator dist不包装我的项目

时间:2017-12-16 04:36:14

标签: java scala sbt activator

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将汇编sbtprojectA,但只留下projectC。我想这可能是因为projectB不是任何其他项目的依赖项,也不是播放应用程序。

我可以获得projectBprojectA的jar包。但无论projectC是什么,projectB的jar总是没有打包,即使没有编译。我想知道如何强制pb/build.sbt编译sbt并使用activator dist打包它?

1 个答案:

答案 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)