How to allow version in duplicate transitive dependencies?

I am trying to build the sbt project wiht sbt clean compile here is the error:

 [error] Modules were resolved with conflicting cross-version suffixes in {file:/C:/project-scala/}module: [error] org.json4s:json4s-ast _2.11, _2.10 [error] org.json4s:json4s-jackson _2.11, _2.10 [error] com.fasterxml.jackson.module:jackson-module-scala _2.11, _2.10 [error] org.json4s:json4s-core _2.11, _2.10 [error] org.json4s:json4s-native _2.11, _2.10 [error] org.json4s:json4s-ext _2.11, _2.10 java.lang.RuntimeException: Conflicting cross-version suffixes in: org.json4s:json4s-ast, org.json4s:json4s-jackson, com.fasterxml.jackson.module:jackson-module-scala, org.json4s:json4s-core, org.json4s:json4s-native, org.json4s:json4s-ext 

So, it is obvious that there are duplicate dependencies with different versions, but the real problem is that my project is not directly dependent on them. There are chains (Jackson is used only as an example):

 chain 1: myProject -> Somelib1 -> jackson-module-scala _2.11 chain 2: myProject -> Somelib2 -> jackson-module-scala _2.10 

So how to find out what the actual Somelib1 and Somelib2 are?

also I tried to analyze the dependencies, but sbt failed with an error, see this question

+5
source share
1 answer

For some reason, Somelib1 and Somelib2 are dependent on another version of scala. You forgot %% : sbt dependencies

Sbt also has version conflict managers, but you have different artifacts for different scala versions !: sbt conflicting managers .

To see the artifact dependency tree, try the sbt-dependency-graph plugin

+3
source

Source: https://habr.com/ru/post/1201206/


All Articles