I want to make fat jar of my project with sbt assembly. Here is my build.sbt:
name := "projName"
version := "1.0"
scalaVersion := "2.12.1"
libraryDependencies ++= Seq(
"com.typesafe.akka" %% "akka-stream" % "2.5.3",
"com.typesafe.akka" %% "akka-actor" % "2.5.3",
"com.typesafe.akka" %% "akka-http" % "10.0.8",
"com.fasterxml.jackson.module" %% "jackson-module-scala" % "2.8.6",
"com.typesafe" % "config" % "1.3.1",
"org.apache.kafka" % "kafka-clients" % "0.10.2.1",
"org.knowm.xchange" % "xchange-core" % "4.2.0",
"org.knowm.xchange" % "xchange-btce" % "4.2.0"
)
assemblyMergeStrategy in assembly := {
case PathList("META-INF", xs @ _*) => MergeStrategy.discard
case x => MergeStrategy.first
}
After running
sbt assembly
i got such warning:
[warn] There may be incompatibilities among your library dependencies.
[warn] Here are some of the libraries that were evicted:
[warn] * com.typesafe.akka:akka-stream_2.12:2.4.19 -> 2.5.3
[warn] * com.typesafe.akka:akka-actor_2.12:2.4.19 -> 2.5.3
[warn] Run 'evicted' to see detailed eviction warnings
Then i run sbt evicted
for more detail and here what i got:
[warn] There may be incompatibilities among your library dependencies.
[warn] Here are some of the libraries that were evicted:
[warn] * com.typesafe.akka:akka-stream_2.12:2.4.19 -> 2.5.3 (caller: com.typesafe.akka:akka-http-core_2.12:10.0.8, default:btceclient_2.12:1.0)
[warn] * com.typesafe.akka:akka-actor_2.12:2.4.19 -> 2.5.3 (caller: com.typesafe.akka:akka-stream_2.12:2.5.3, com.typesafe.akka:akka-parsing_2.12:10.0.8, default:btceclient_2.12:1.0)
[info] Here are other libraries that were evicted:
[info] * com.fasterxml.jackson.core:jackson-databind:2.8.2 -> 2.8.6 (caller: com.fasterxml.jackson.module:jackson-module-paranamer:2.8.6, com.github.mmazi:rescu:1.9.0, com.fasterxml.jackson.module:jackson-module-scala_2.12:2.8.6)
[info] * com.fasterxml.jackson.core:jackson-annotations:2.8.0 -> 2.8.6 (caller: com.fasterxml.jackson.core:jackson-databind:2.8.6, com.fasterxml.jackson.module:jackson-module-scala_2.12:2.8.6)
[info] * com.typesafe:config:1.2.0 -> 1.3.1 (caller: com.typesafe:ssl-config-core_2.12:0.2.1, default:btceclient_2.12:1.0, com.typesafe.akka:akka-actor_2.12:2.5.3)
I know what are eviction warnings but i don't know how to solve that in current situation. Any ideas?
You can safely ignore this message because 2.4 and 2.5 versions are binary compatible, so it is okay to upgrade from 2.4 to 2.5.