I have a requirement to override a transitive dependency to a later version of the same.
In maven I can do this by simply adding the overriding one on top.
<dependencies>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
<version>2.8.9</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-annotations</artifactId>
<version>2.8.9</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.module</groupId>
<artifactId>jackson-module-scala_2.11</artifactId>
<version>2.8.9</version>
</dependency>
<dependency>
<groupId>org.apache.spark</groupId>
<artifactId>spark-core_${scala.version.dist}</artifactId>
<version>${spark.version}</version>
</dependency>
<dependency>
<dependency>
<groupId>com.mypackage.road</groupId>
<artifactId>package-that-contains-transitive-deps</artifactId>
<version>4.2.0</version>
</dependency>
How can i do this in sbt? Also like the GUI that is available in maven (Dependency-Hierarchy tab) which shows which jars are overriding the others, how can i see that in sbt?
I have already tried to force the versions I want using dependencyOverrides. But the issue is still there.So how can I check that the older version is exactly evicted by the version I am overriding. sbt dependencyTree is not showing that the newer one has evicted the transitive dependency.