我正在使用sbt-native-packager构建一个RPM插件。我也在使用Play 2.4。
我启用了Play插件:
lazy val root = (project in file(".")).enablePlugins(PlayScala)
我已经在build.sbt中为我的RPM init.d文件指定了一个自定义文件,就像这样
linuxPackageMappings <<= (mappings in Universal, oneJar, resourceManaged in Compile, name) map { (mappings, jar, res, name) =>
Seq(
LinuxPackageMapping(Seq(res / "manage.sh" -> s"/etc/init.d/my-test")) withUser "root" withGroup "root"
)
}
但是当我执行rpm:packageBin
时,我得到以下错误[error] warning: File listed twice: /etc/init.d/my-app
如果删除Play插件,则错误消失。这证明了播放插件与我的覆盖有些冲突。此外,文档似乎引用了自定义分发版本https://www.playframework.com/documentation/2.3.3/ProductionDist
如何强制使用变量代替播放?
要么是,还是有办法在某些条件下不启用Play插件,例如转速:packageBin