From 700bd2d9109a7e82c1ec2445c9e70cf665bf8171 Mon Sep 17 00:00:00 2001 From: hrj Date: Mon, 27 Dec 2021 20:01:12 +0530 Subject: [PATCH] assembly merge strategy that discards module-info This is to fix this error: deduplicate: different file contents found in the following: [error] [snip] jackson-annotations/2.12.4/jackson-annotations-2.12.4.jar:module-info.class [error] [snip] jackson-core/2.12.4/jackson-core-2.12.4.jar:module-info.class --- build.sbt | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/build.sbt b/build.sbt index 7b10b65..8575b3a 100644 --- a/build.sbt +++ b/build.sbt @@ -29,4 +29,11 @@ assembly / mainClass := Some("lc.LCFramework") Compile / run / mainClass := Some("lc.LCFramework") assembly / assemblyJarName := "LibreCaptcha.jar" +assembly / assemblyMergeStrategy := { + case x if x.endsWith("/module-info.class") => MergeStrategy.discard + case x => + val oldStrategy = (assembly / assemblyMergeStrategy).value + oldStrategy(x) +} + run / fork := true