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

做~自己de王妃 提交于 2019-12-09 07:48:42

问题


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.


回答1:


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.




回答2:


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.




回答3:


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.



来源:https://stackoverflow.com/questions/19242450/conflicting-cross-version-suffixes-sbt-scala-stm-play-json

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!