我有一个像这样的多项目sbt构建文件
import sbt._
import Keys._
object TestBuild extends Build {
lazy val root = Project(id = "test",
base = file(".")) aggregate(core, handlers)
lazy val core = Project(id = "test-core",
base = file("core"))
lazy val handlers = Project(id = "test-handlers",
base = file("handlers")) dependsOn (core)
}
如何构建包含所有依赖项+核心+处理程序
的程序集jar答案 0 :(得分:3)
好的我用
解决了这个问题import sbt._
import Keys._
object TestBuild extends Build {
lazy val root = Project(id = "test",
base = file(".")) aggregate(core, handlers) dependsOn(core,handlers)
lazy val core = Project(id = "test-core",
base = file("core"))
lazy val handlers = Project(id = "test-handlers",
base = file("handlers")) dependsOn (core)
}
我将程序集设置放在build.sbt文件中
答案 1 :(得分:0)
您可以使用sbt-assembly插件。
addSbtPlugin("com.eed3si9n" % "sbt-assembly" % "0.7.3")