0

I am building a tool that I will deploy in an Uber jar using addSbtPlugin("com.eed3si9n" % "sbt-assembly" % "0.14.6")

The merge strategies confuse me. (see https://github.com/sbt/sbt-assembly). Rather than specifying which version of duplicate dependencies to keep (or instructing to keep latest version), the compiler picks which to keep or discard based on position in the CP.

Based on previous experience, this seems to invite problems. How do I specify which version of, say, Jackson or Slf4j I want to keep?

Jake
  • 4,322
  • 6
  • 39
  • 83
  • Yes, I agree the answer appears to be a duplicate, but my point of entry was assemblyMergeStrategy, so people may search for this question and then link to the fuller answer in the original question – Jake Feb 22 '19 at 23:40

1 Answers1

1

If you just want to pick a version, use dependencyOverrides. You can also inspect version conflicts via show evicted command. See here for a related answer.

laughedelic
  • 6,230
  • 1
  • 32
  • 41