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
This commit is contained in:
hrj 2021-12-27 20:01:12 +05:30
parent f4187720d2
commit 700bd2d910
1 changed files with 7 additions and 0 deletions

View File

@ -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