如何找出哪些依赖包含错误版本的Play / Scala在sbt中
我正在尝试将我的Play应用程序从Scala 2.10升级到2.11,并且出现了相互冲突的跨版本后缀:
[info] Done updating.
[error] Modules were resolved with conflicting cross-version suffixes in {file:/E:/Work/MyProject/development/}root:
[error] com.typesafe.akka:akka-actor _2.11, _2.10
[error] com.typesafe.akka:akka-slf4j _2.11, _2.10
[error] org.scala-stm:scala-stm _2.11, _2.10.0
我的build.sbt:
name := """My Project"""
version := "1.0-SNAPSHOT"
lazy val root = (project in file(".")).enablePlugins(PlayScala)
resolvers += "Local Maven Repository" at Path.userHome.asFile.toURI.toURL + ".m2/repository"
resolvers += "scala-sbt.org" at "http://repo.scala-sbt.org/scalasbt/repo"
resolvers += "scala-sbt.org 2" at "http://repo.scala-sbt.org/scalasbt/libs-releases"
resolvers += "scala-sbt.org 3" at "http://repo.scala-sbt.org/scalasbt/plugins-releases"
scalaVersion := "2.11.8"
EclipseKeys.withSource := true
libraryDependencies ++= Seq(
jdbc,
anorm,
cache,
ws,
"com.typesafe.akka" %% "akka-contrib" % "2.3.4",
"com.typesafe.akka" %% "akka-actor" % "2.3.4",
"com.typesafe.akka" %% "akka-slf4j" % "2.3.4",
"com.typesafe.akka" %% "akka-testkit" % "2.3.4" % "test",
"io.argonaut" %% "argonaut" % "6.1",
"org.scalaj" %% "scalaj-http" % "2.3.0",
"my.other.project" % "java-artifact" % "2.2.5")
在sbt compile
的日志中,突然play_2.10被解析:
...
[info] Resolving org.apache.httpcomponents#httpmime;4.0.1 ...
[info] Resolving org.apache.james#apache-mime4j;0.6 ...
[info] Resolving play#play_2.10;2.1.5 ...
[info] Resolving play#sbt-link;2.1.5 ...
[info] Resolving play#play-exceptions;2.1.5 ...
[info] Resolving play#templates_2.10;2.1.5 ...
...
我正在使用sbt 0.13.5。
我之前遇到过这个问题,解决这个问题是一个令人厌烦的过程。 有什么方法可以知道我的哪些依赖包含play_2.10? 我可以从sbt获得依赖树还是类似的东西?
在sbt中没有本地方式,但我有与第三方的良好体验,特别是https://github.com/jrudolph/sbt-dependency-graph。
链接地址: http://www.djcxy.com/p/95143.html上一篇: How to find out which dependency includes wrong version of Play/Scala in sbt