使用playPackageAssets时引用play sbt中的未定义设置

时间:2018-06-20 00:53:32

标签: java playframework sbt playframework-2.2 playframework-2.6

我用sbt assembly命令构建了play框架项目jar。当我使用Java -jar“ jarName.jar”运行jar时,抛出错误“未提供根服务器路径”。并参考此https://www.playframework.com/documentation/2.3.6/ProductionDist

我在build.sbt中添加了这些行

import AssemblyKeys._
assemblySettings
mainClass in assembly := Some("play.core.server.NettyServer")
fullClasspath in assembly += Attributed.blank(PlayKeys.playPackageAssets.value)

导入sbt更改时出现此错误

Reference to undefined setting:
[error]
[error]   root/*:playPackageAssets from root/*:assembly::fullClasspath

任何Play / Sbt Guru都可以帮助解决此问题吗?

0 个答案:

没有答案