Sbt汇编未使用正确的jar名称?

时间:2018-12-21 12:17:37

标签: sbt sbt-assembly

我在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 /

感谢您的帮助! 谢谢,

0 个答案:

没有答案