Merge Strategy in sbt assembly and missing application loader

喜欢而已 提交于 2019-12-04 08:58:28

Play documents the following merge strategy to be used with sbt-assembly:

assemblyMergeStrategy in assembly := {
  case manifest if manifest.contains("MANIFEST.MF") =>
    // We don't need manifest files since sbt-assembly will create
    // one with the given settings
    MergeStrategy.discard
  case referenceOverrides if referenceOverrides.contains("reference-overrides.conf") =>
    // Keep the content for all reference-overrides.conf files
    MergeStrategy.concat
  case x =>
    // For all the other files, use the default sbt-assembly merge strategy
    val oldStrategy = (assemblyMergeStrategy in assembly).value
    oldStrategy(x)
}

play-scala-sbt-assembly-example is a working example demonstrating the necessary configuration.

It looks like Play has their own dist function that uses the sbt native packager plugin under the hood. I was able to get my program working by following the instructions here: https://www.playframework.com/documentation/2.7.x/Deploying#Using-the-dist-task

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!