0__
0__

Reputation: 67330

Conflicting cross-version suffixes (sbt, Scala-STM, Play-JSON)

I am using a JSON extension which relies on Mandubian's play-json 2.2-SNAPSHOT. Everything worked fine until now I have a project based on Scala-STM. sbt reports the following problem:

[error] Modules were resolved with conflicting cross-version suffixes 
        in {file:folder}project:
[error]    org.scala-stm:scala-stm _2.10, _2.10.0
java.lang.RuntimeException: Conflicting cross-version suffixes in: 
  org.scala-stm:scala-stm

Is there any chance to dig deeper into where these two "conflicting" versions come from? I am quite surprised that play-json should be depending on scala-stm?!

Furthermore, is there a way to convince sbt to shut the ... up. Because obviously 2.10 and 2.10.0 are equivalent versions.


EDIT: This seems to be an sbt 0.13 bug (and probably has nothing to do with Play-JSON), because if I revert to 0.12.4, the project successfully updates and builds. I am still interested in a work around for sbt 0.13.

Upvotes: 21

Views: 10472

Answers (3)

Jon Onstott
Jon Onstott

Reputation: 13727

If you'd like to see all libraries being pulled in to your SBT project, you can use the SBT dependency graph plugin.

Using this, you can see why scala-stm is being pulled in, and also check for other conflicting scala 2.10 and 2.11 dependencies.

Upvotes: 2

Jukka Nikki
Jukka Nikki

Reputation: 366

Updated Play2 2.2 - downgrading to SBT from 0.13.0 -> 0.12.4 didn't work with me, but excluding using exclude("org.scala-stm", "scala-stm_2.10.0") on ALL app-specific dependencies I had worked fine -- anyway -- none of my dependencies shouldn't have anything to do with scala-stm.

Upvotes: 2

kompot
kompot

Reputation: 798

You can get around this by removing scala-stm with exclude

 "dependencyGroupId" %% "dependencyArtifactId" % "dependencyVersion" exclude("org.scala-stm", "scala-stm_2.10.0")

Do not forget to do sbt clean.

Upvotes: 21

Related Questions