0

In build.scala I have the following:

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

However when I run assembly I see:

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

showing that it is using the "deduplicate" strategy, not the "first" strategy. This gives the following error:

[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
Eugene Yokota
  • 94,654
  • 45
  • 215
  • 319
Dan Billings
  • 852
  • 1
  • 8
  • 18

1 Answers1

1

I had not applied this setting in the proper scope. I needed to set

mergeStrategy in assembly <<= ...
Dan Billings
  • 852
  • 1
  • 8
  • 18