1
votes

having those deps:

libraryDependencies ++= Seq(
  "com.typesafe.akka" %% "akka-http-spray-json" % akkaHttpVersion,
  "com.typesafe.akka" %% "akka-stream" % akkaVersion,
  "com.typesafe.akka" %% "akka-http" % akkaHttpVersion,
  "com.typesafe.akka" %% "akka-actor-typed" % akkaVersion,
  "com.typesafe.akka" %% "akka-stream" % akkaVersion,
  "com.lightbend.akka" %% "akka-stream-alpakka-json-streaming" % akkaJsonStreaming,
  "io.circe" %% "circe-generic-extras" % circeVersion,
  "de.heikoseeberger" %% "akka-http-circe" % akkaHttpCirce,
  "commons-codec" % "commons-codec" % commonsCodecVersion,
  "org.scalatest" %% "scalatest" % scalaTestVersion % "it, test",
)

when I run sbt assembly I get an error:

[error] (assembly) deduplicate: different file contents found in the following:
[error] /home/baku/.cache/coursier/v1/https/repo1.maven.org/maven2/com/fasterxml/jackson/core/jackson-annotations/2.10.5/jackson-annotations-2.10.5.jar:module-info.class
[error] /home/baku/.cache/coursier/v1/https/repo1.maven.org/maven2/com/fasterxml/jackson/core/jackson-core/2.10.5/jackson-core-2.10.5.jar:module-info.class
[error] /home/baku/.cache/coursier/v1/https/repo1.maven.org/maven2/com/fasterxml/jackson/core/jackson-databind/2.10.5/jackson-databind-2.10.5.jar:module-info.class

any idea how to fix this?

1
Can you please share akkaHttpVersion, akkaVersion, akkaJsonStreaming, and all other versions you are using?Tomer Shetah
@TomerShetah val akkaVersion = "2.6.8", val akkaHttpVersion = "10.2.0", val akkaJsonStreaming = "2.0.2"FrancMo

1 Answers

2
votes
assemblyMergeStrategy in assembly := {
      case "module-info.class" => MergeStrategy.discard
      case x =>
        val oldStrategy = (assemblyMergeStrategy in assembly).value
        oldStrategy(x)
    }

this helped