Open nextdtinc opened 5 years ago
It works when the external dependency is replaced with an earlier version of the aws library, "com.amazonaws" % "aws-java-sdk" % "1.11.80", because that one does not contain any duplicates of META-INF/io.netty.versions.properties.
Thank you for this part. This is at least a working workaround.
Is there a work around to this problem with more recent versions of aws-sdk
. I have similar issues with 2.17.99
; None of the typical strategies seem to work. At this point its a lot of trial and error.
Using SBT 1.5.8 and aws-sdk 2.17.269, the following assemblyMergeStrategy does work:
assembly / assemblyMergeStrategy := {
case PathList("META-INF", "io.netty.versions.properties") => MergeStrategy.concat
case PathList("META-INF", "versions", "9", "module-info.class") => MergeStrategy.discard
case x => defaultTritonMergeStrategy(x) // Custom default strategy
}
steps
sbt assembly
.my-app.zip
The minimal test case contains only a single external library dependency,
"com.amazonaws" % "aws-java-sdk" % "1.11.500"
, which contains duplicates of the fileMETA-INF/io.netty.versions.properties
, and this breaks the assembly.problem
the assembly fails with this error:
expectation
The assembly should have been successful, and the merge strategy should have discarded the duplicate file
META-INF/io.netty.versions.properties
.Two different ways to accomplish this were attempted, none of them work:
notes
It works when the external dependency is replaced with an earlier version of the aws library,
"com.amazonaws" % "aws-java-sdk" % "1.11.80"
, because that one does not contain any duplicates ofMETA-INF/io.netty.versions.properties
.