0

在 build.scala 我有以下内容:

mergeStrategy <<= (mergeStrategy in assembly) {(old) => {
  case PathList("javax", "servlet",  "resources", xs @ _*) => MergeStrategy.first
  case x => old(x)
}}

但是,当我跑步时,assembly我看到:

[info] Merging 'javax/servlet/resources/web-app_2_2.dtd' with strategy 'deduplicate'

表明它使用的是“去重”策略,而不是“第一”策略。这给出了以下错误:

[error] {file:/home/dan/tesla/}tesla-appengine/*:assembly: deduplicate: different file contents found in the following:
[error] /home/dan/.ivy2/cache/com.google.appengine/appengine-tools-sdk/jars/appengine-tools-sdk-1.7.3.jar:javax/servlet/resources/web-app_2_2.dtd
[error] /home/dan/.ivy2/cache/javax.servlet/servlet-api/jars/servlet-api-2.5.jar:javax/servlet/resources/web-app_2_2.dtd
4

1 回答 1

1

我没有在适当的范围内应用此设置。我需要设置

mergeStrategy in assembly <<= ...
于 2012-11-26T17:39:53.933 回答