When I build my project using sbt assembly
, I get java.util.zip.ZipException: duplicate entry: META-INF/MANIFEST.MF
. The solution that google recommends, is to use MergeStrategy.discard
.
That works in getting the project to build - but it crashes at runtime, because Dropwizard (a dependency) relies on info contained in manifest.mf (full issue details: https://github.com/dropwizard/dropwizard/issues/455 ).
The recommendation when encountering that error, is to merge the manifests.
I've tried all the MergeStrategies on Manifest.MF that seem like they'd do the trick (filterDistinctLines
, concat
, first
, last
), they all cause the build to fail with java.util.zip.ZipException: duplicate entry: META-INF/MANIFEST.MF
. The only thing that compiles is discard
, but that causes the program to crash at runtime due to Dropwizard relying on the mf file.
Any ideas what to do here? Is there a way to merge the manifests as described in the comments at https://github.com/dropwizard/dropwizard/issues/455 ?