我在sbt中有一个多模块项目。我有如下通用设置:
object AssemblySettings {
lazy val commonAssemblySettings = Seq(
Project.inConfig(Test)(baseAssemblySettings),
assemblyOutputPath in Test := file(s"${target.value}/docker2/${name.value}.jar"),
assemblyOutputPath in assembly := file(s"${target.value}/docker2/${name.value}.jar"),
assemblyMergeStrategy in assembly := {
case PathList("META-INF", _*) => MergeStrategy.discard
case x =>
val oldStrategy = (assemblyMergeStrategy in assembly).value
oldStrategy(x)
}
)
}
但是,当我运行test:assembly时,assemblyOutputPath会被忽略,它将jar放入target / scala-2.12 /
感谢您的帮助! 谢谢,