Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

java.lang.RuntimeException: deduplicate: different file contents found in the following #559

Open
littlestar1998 opened this issue Oct 17, 2019 · 1 comment

Comments

@littlestar1998
Copy link

build.sbt

name := "algoliaplusfeed"
version := "0.13.6"
scalaVersion := "2.12.4"
libraryDependencies += "com.algolia" %% "algoliasearch-scala" % "[1,)"
resolvers += "Sonatype OSS Snapshots" at "https://oss.sonatype.org/content/repositories/snapshots"

project/plugins.sbt

addSbtPlugin("com.eed3si9n" % "sbt-assembly" % "0.14.10")

run

 sbt clean assembly 

get an error

 xiaoxingxing@littlestar  ~/IdeaProjects/algolia_feed   Elpis ✚ ● ? ⍟3  sudo sbt clean assembly                                                                    SIGINT(2) ↵  148  19:13:42
[info] Loading settings from plugins.sbt ...
[info] Loading project definition from /Users/xiaoxingxing/IdeaProjects/algolia_feed/project
[info] Updating ProjectRef(uri("file:/Users/xiaoxingxing/IdeaProjects/algolia_feed/project/"), "algolia_feed-build")...
[info] Done updating.
[info] Loading settings from build.sbt ...
[info] Set current project to algoliaplusfeed (in build file:/Users/xiaoxingxing/IdeaProjects/algolia_feed/)
[success] Total time: 4 s, completed Oct 17, 2019 7:14:05 PM
[info] Updating ...
[info] Done updating.
[warn] Found version conflict(s) in library dependencies; some are suspected to be binary incompatible:
[warn]  * io.netty:netty-handler:4.1.36.Final is selected over 4.1.34.Final
[warn]      +- org.asynchttpclient:async-http-client:2.10.1       (depends on 4.1.36.Final)
[warn]      +- io.netty:netty-codec-http:4.1.36.Final             (depends on 4.1.36.Final)
[warn]      +- com.typesafe.netty:netty-reactive-streams:2.0.3    (depends on 4.1.34.Final)
[warn] Run 'evicted' to see detailed eviction warnings
[info] Compiling 1 Scala source to /Users/xiaoxingxing/IdeaProjects/algolia_feed/target/scala-2.12/classes ...
[info] Done compiling.
[error] 1 error was encountered during merge
[error] java.lang.RuntimeException: deduplicate: different file contents found in the following:
[error] /private/var/root/.ivy2/cache/io.netty/netty-buffer/jars/netty-buffer-4.1.36.Final.jar:META-INF/io.netty.versions.properties
[error] /private/var/root/.ivy2/cache/io.netty/netty-codec-dns/jars/netty-codec-dns-4.1.36.Final.jar:META-INF/io.netty.versions.properties
[error] /private/var/root/.ivy2/cache/io.netty/netty-codec-http/jars/netty-codec-http-4.1.36.Final.jar:META-INF/io.netty.versions.properties
[error] /private/var/root/.ivy2/cache/io.netty/netty-codec-socks/jars/netty-codec-socks-4.1.36.Final.jar:META-INF/io.netty.versions.properties
[error] /private/var/root/.ivy2/cache/io.netty/netty-codec/jars/netty-codec-4.1.36.Final.jar:META-INF/io.netty.versions.properties
[error] /private/var/root/.ivy2/cache/io.netty/netty-common/jars/netty-common-4.1.36.Final.jar:META-INF/io.netty.versions.properties
[error] /private/var/root/.ivy2/cache/io.netty/netty-handler-proxy/jars/netty-handler-proxy-4.1.36.Final.jar:META-INF/io.netty.versions.properties
[error] /private/var/root/.ivy2/cache/io.netty/netty-handler/jars/netty-handler-4.1.36.Final.jar:META-INF/io.netty.versions.properties
[error] /private/var/root/.ivy2/cache/io.netty/netty-resolver-dns/jars/netty-resolver-dns-4.1.36.Final.jar:META-INF/io.netty.versions.properties
[error] /private/var/root/.ivy2/cache/io.netty/netty-resolver/jars/netty-resolver-4.1.36.Final.jar:META-INF/io.netty.versions.properties
[error] /private/var/root/.ivy2/cache/io.netty/netty-transport-native-epoll/jars/netty-transport-native-epoll-4.1.36.Final-linux-x86_64.jar:META-INF/io.netty.versions.properties
[error] /private/var/root/.ivy2/cache/io.netty/netty-transport-native-unix-common/jars/netty-transport-native-unix-common-4.1.36.Final.jar:META-INF/io.netty.versions.properties
[error] /private/var/root/.ivy2/cache/io.netty/netty-transport/jars/netty-transport-4.1.36.Final.jar:META-INF/io.netty.versions.properties
[error]         at sbtassembly.Assembly$.applyStrategies(Assembly.scala:143)
[error]         at sbtassembly.Assembly$.x$1$lzycompute$1(Assembly.scala:25)
[error]         at sbtassembly.Assembly$.x$1$1(Assembly.scala:23)
[error]         at sbtassembly.Assembly$.stratMapping$lzycompute$1(Assembly.scala:23)
[error]         at sbtassembly.Assembly$.stratMapping$1(Assembly.scala:23)
[error]         at sbtassembly.Assembly$.inputs$lzycompute$1(Assembly.scala:68)
[error]         at sbtassembly.Assembly$.inputs$1(Assembly.scala:58)
[error]         at sbtassembly.Assembly$.apply(Assembly.scala:85)
[error]         at sbtassembly.Assembly$.$anonfun$assemblyTask$1(Assembly.scala:244)
[error]         at scala.Function1.$anonfun$compose$1(Function1.scala:44)
[error]         at sbt.internal.util.$tilde$greater.$anonfun$$u2219$1(TypeFunctions.scala:39)
[error]         at sbt.std.Transform$$anon$4.work(System.scala:66)
[error]         at sbt.Execute.$anonfun$submit$2(Execute.scala:262)
[error]         at sbt.internal.util.ErrorHandling$.wideConvert(ErrorHandling.scala:16)
[error]         at sbt.Execute.work(Execute.scala:271)
[error]         at sbt.Execute.$anonfun$submit$1(Execute.scala:262)
[error]         at sbt.ConcurrentRestrictions$$anon$4.$anonfun$submitValid$1(ConcurrentRestrictions.scala:174)
[error]         at sbt.CompletionService$$anon$2.call(CompletionService.scala:36)
[error]         at java.util.concurrent.FutureTask.run(FutureTask.java:266)
[error]         at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
[error]         at java.util.concurrent.FutureTask.run(FutureTask.java:266)
[error]         at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
[error]         at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
[error]         at java.lang.Thread.run(Thread.java:745)
[error] (assembly) deduplicate: different file contents found in the following:
[error] /private/var/root/.ivy2/cache/io.netty/netty-buffer/jars/netty-buffer-4.1.36.Final.jar:META-INF/io.netty.versions.properties
[error] /private/var/root/.ivy2/cache/io.netty/netty-codec-dns/jars/netty-codec-dns-4.1.36.Final.jar:META-INF/io.netty.versions.properties
[error] /private/var/root/.ivy2/cache/io.netty/netty-codec-http/jars/netty-codec-http-4.1.36.Final.jar:META-INF/io.netty.versions.properties
[error] /private/var/root/.ivy2/cache/io.netty/netty-codec-socks/jars/netty-codec-socks-4.1.36.Final.jar:META-INF/io.netty.versions.properties
[error] /private/var/root/.ivy2/cache/io.netty/netty-codec/jars/netty-codec-4.1.36.Final.jar:META-INF/io.netty.versions.properties
[error] /private/var/root/.ivy2/cache/io.netty/netty-common/jars/netty-common-4.1.36.Final.jar:META-INF/io.netty.versions.properties
[error] /private/var/root/.ivy2/cache/io.netty/netty-handler-proxy/jars/netty-handler-proxy-4.1.36.Final.jar:META-INF/io.netty.versions.properties
[error] /private/var/root/.ivy2/cache/io.netty/netty-handler/jars/netty-handler-4.1.36.Final.jar:META-INF/io.netty.versions.properties
[error] /private/var/root/.ivy2/cache/io.netty/netty-resolver-dns/jars/netty-resolver-dns-4.1.36.Final.jar:META-INF/io.netty.versions.properties
[error] /private/var/root/.ivy2/cache/io.netty/netty-resolver/jars/netty-resolver-4.1.36.Final.jar:META-INF/io.netty.versions.properties
[error] /private/var/root/.ivy2/cache/io.netty/netty-transport-native-epoll/jars/netty-transport-native-epoll-4.1.36.Final-linux-x86_64.jar:META-INF/io.netty.versions.properties
[error] /private/var/root/.ivy2/cache/io.netty/netty-transport-native-unix-common/jars/netty-transport-native-unix-common-4.1.36.Final.jar:META-INF/io.netty.versions.properties
[error] /private/var/root/.ivy2/cache/io.netty/netty-transport/jars/netty-transport-4.1.36.Final.jar:META-INF/io.netty.versions.properties
[error] Total time: 9 s, completed Oct 17, 2019 7:14:14 PM
@littlestar1998
Copy link
Author

add build.sbt

assemblyMergeStrategy in assembly := {
  case x if x.contains("io.netty.versions.properties") => MergeStrategy.discard
  case PathList(ps @ _*) if ps.last endsWith "AnnotatedFingerprint.class" => MergeStrategy.first
  case PathList(ps @ _*) if ps.last endsWith "Event.class" => MergeStrategy.first
  case PathList(ps @ _*) if ps.last endsWith "EventHandler.class" => MergeStrategy.first
  case PathList(ps @ _*) if ps.last endsWith "Framework.class" => MergeStrategy.first
  case PathList(ps @ _*) if ps.last endsWith "Result.class" => MergeStrategy.first
  case PathList(ps @ _*) if ps.last endsWith "Fingerprint.class" => MergeStrategy.first
  case PathList(ps @ _*) if ps.last endsWith "Logger.class" => MergeStrategy.first
  case PathList(ps @ _*) if ps.last endsWith "Runner.class" => MergeStrategy.first
  case PathList(ps @ _*) if ps.last endsWith "Runner2.class" => MergeStrategy.first
  case x =>
    val oldStrategy = (assemblyMergeStrategy in assembly).value
    oldStrategy(x)
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant