These are chat archives for sbt/sbt-assembly

12th
Nov 2015
maheshkelkar
@maheshkelkar
Nov 12 2015 14:37

Hello, I am running into merge conflicts:

[error] deduplicate: different file contents found in the following:
[error] /Users/mkelkar/.ivy2/cache/org.ow2.asm/asm/jars/asm-5.0.3.jar:org/objectweb/asm/AnnotationVisitor.class
[error] /Users/mkelkar/.ivy2/cache/asm/asm/jars/asm-3.1.jar:org/objectweb/asm/AnnotationVisitor.class
[error] deduplicate: different file contents found in the following:
[error] /Users/mkelkar/.ivy2/cache/org.ow2.asm/asm/jars/asm-5.0.3.jar:org/objectweb/asm/AnnotationWriter.class
[error] /Users/mkelkar/.ivy2/cache/asm/asm/jars/asm-3.1.jar:org/objectweb/asm/AnnotationWriter.class

so, I tried changing default mergeStrategy as follows, but it didn't work (still seem to using deduplicate)

    assemblyMergeStrategy in assembly := {
      case _ => println("baz"); MergeStrategy.first
    }

I have added this at global level. I do see these prints, but errors are not going away.
I have tried adding these lines inside .settings(...) at root level, but that didnt work.
In short, adding this code, does not change the duplicate or fixes this problem.

Any ideas what I can do? Is this a problem JARs that I am importing?

I do see following backtrace:
deduplicate: different file contents found in the following:
/Users/mkelkar/.ivy2/cache/org.slf4j/slf4j-jdk14/jars/slf4j-jdk14-1.7.7.jar:org/slf4j/impl/StaticMDCBinder.class
/Users/mkelkar/.ivy2/cache/org.slf4j/slf4j-log4j12/jars/slf4j-log4j12-1.7.5.jar:org/slf4j/impl/StaticMDCBinder.class
    at sbtassembly.Assembly$.applyStrategies(Assembly.scala:140)
    at sbtassembly.Assembly$.x$1$lzycompute$1(Assembly.scala:25)
    at sbtassembly.Assembly$.x$1$1(Assembly.scala:23)
    at sbtassembly.Assembly$.stratMapping$lzycompute$1(Assembly.scala:23)
    at sbtassembly.Assembly$.stratMapping$1(Assembly.scala:23)
    at sbtassembly.Assembly$.inputs$lzycompute$1(Assembly.scala:67)
    at sbtassembly.Assembly$.inputs$1(Assembly.scala:57)
    at sbtassembly.Assembly$.apply(Assembly.scala:83)
    at sbtassembly.Assembly$$anonfun$assemblyTask$1.apply(Assembly.scala:242)
    at sbtassembly.Assembly$$anonfun$assemblyTask$1.apply(Assembly.scala:239)
    at scala.Function1$$anonfun$compose$1.apply(Function1.scala:47)
    at sbt.$tilde$greater$$anonfun$$u2219$1.apply(TypeFunctions.scala:40)
    at sbt.std.Transform$$anon$4.work(System.scala:63)
    at sbt.Execute$$anonfun$submit$1$$anonfun$apply$1.apply(Execute.scala:226)
    at sbt.Execute$$anonfun$submit$1$$anonfun$apply$1.apply(Execute.scala:226)
    at sbt.ErrorHandling$.wideConvert(ErrorHandling.scala:17)
    at sbt.Execute.work(Execute.scala:235)
    at sbt.Execute$$anonfun$submit$1.apply(Execute.scala:226)
    at sbt.Execute$$anonfun$submit$1.apply(Execute.scala:226)
    at sbt.ConcurrentRestrictions$$anon$4$$anonfun$1.apply(ConcurrentRestrictions.scala:159)
    at sbt.CompletionService$$anon$2.call(CompletionService.scala:28)
    at java.util.concurrent.FutureTask.run(FutureTask.java:262)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
    at java.util.concurrent.FutureTask.run(FutureTask.java:262)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
    at java.lang.Thread.run(Thread.java:745)