Skip to content

'[error] 103 errors were encountered during merge' when invoking assembly #836

@CatherineGasnier

Description

@CatherineGasnier

Repro:

./sbt
> cli/assembly

My fix:

diff --git a/build.sbt b/build.sbt
--- a/build.sbt
+++ b/build.sbt
@@ -248,6 +248,7 @@
 lazy val cli = project
   .in(file("scip-java"))
   .settings(
+    fatjarPackageSettings,
     moduleName := "scip-java",
     (Compile / mainClass) := Some("com.sourcegraph.scip_java.ScipJava"),
     (run / baseDirectory) := (ThisBuild / baseDirectory).value,
@@ -591,8 +592,18 @@
       MergeStrategy.discard
     case PathList("sun", _ @_*) =>
       MergeStrategy.discard
+    case "BUILD" =>
+      MergeStrategy.discard
+    case PathList("META-INF", f) if f.endsWith(".kotlin_module") =>
+      MergeStrategy.first
+    case PathList("META-INF", "sisu", "javax.inject.Named") =>
+      MergeStrategy.concat
     case PathList("META-INF", "versions", "9", "module-info.class") =>
       MergeStrategy.discard
+    case PathList("org", "codehaus", "plexus", _ @_*) =>
+      MergeStrategy.first
+    case "overview.html" =>
+      MergeStrategy.first
     case x =>
       val oldStrategy = (assembly / assemblyMergeStrategy).value
       oldStrategy(x)

Shall I submit a PR? Do others have this issue?

I think the issue happens with other modules/projects...

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions