0

我正在使用 sbt-js 0.3 来构建一个 Scalatra Web 项目。我在build.sbt.

(webappResources in Compile) <+= (resourceManaged in Compile)

(resourceGenerators in Compile) <+= (JsKeys.js in Compile)

(compile in Compile) <<= compile in Compile dependsOn (JsKeys.js in Compile)

当我运行compile压缩文件时,确实会在target/scala_2.9.1文件夹中生成。package但是当我使用(来自 xsbt-web-plugin)或assembly(来自 sbt-assembly)时,我无法在战争中获得这些文件。有任何想法吗?

4

1 回答 1

1

查看xsbt-web-plugin似乎默认情况下从 sourceDirectory/webapp 复制并在 target/webapp 中组装所有内容。

我认为您需要按此处所示按摩您的 WAR (除了复制而不是删除)或重新配置以将您的缩小 JS 包含在 webappResources 设置中。

于 2012-08-10T21:18:52.690 回答