我有一个像这样的多项目 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
最佳答案
好的,我使用解决了这个问题
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 文件中
关于scala - 用于多项目构建的 sbt 组件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15577670/