由于我有一些依赖性问题,我决定将我的计算机上的Scala安装升级到版本2.12.0-M3
。我也跑了sbt -v
,之后下载了很多软件包。升级到版本2.12后无法解决依赖关系
然而,当我尝试刷新以下build.sbt
文件
name := """ScalaWeb"""
version := "1.0-SNAPSHOT"
lazy val root = (project in file(".")).enablePlugins(PlayScala)
scalaVersion := "2.12.0-M3"
libraryDependencies ++= Seq(
jdbc,
cache,
ws,
specs2 % Test,
"org.sorm-framework" % "sorm" % "0.3.18"
)
resolvers += "scalaz-bintray" at "http://dl.bintray.com/scalaz/releases"
// Play provides two styles of routers, one expects its actions to be injected, the
// other, legacy style, accesses its actions statically.
routesGenerator := InjectedRoutesGenerator
scalacOptions += "-Ylog-classpath"
我收到以下错误:
Error:Unresolved dependencies:
com.typesafe.play#twirl-api_2.12.0-M3;1.1.1: not found
com.typesafe.play#play-server_2.12.0-M3;2.4.6: not found
com.typesafe.play#play-netty-server_2.12.0-M3;2.4.6: not found
com.typesafe.play#play-jdbc_2.12.0-M3;2.4.6: not found
com.typesafe.play#play-cache_2.12.0-M3;2.4.6: not found
com.typesafe.play#play-ws_2.12.0-M3;2.4.6: not found
com.typesafe.play#play-test_2.12.0-M3;2.4.6: not found
com.typesafe.play#play-specs2_2.12.0-M3;2.4.6: not found
com.typesafe.play#play-omnidoc_2.12.0-M3;2.4.6: not found
版本2-12.0-M3
出现在2015年10月,它似乎令人怀疑,所有这些包仍然不相容。
我该如何解决这个问题?
PS
我无法使用Scala的版本2.11.7
因为我有依赖
"org.sorm-framework" % "sorm" % "0.3.18"
,由于其依赖关系将产生这样的问题:
[error] org.scala-lang.modules:scala-xml _2.11, _2.12.0-M3
[error] org.scala-lang.modules:scala-parser-combinators _2.11, _2.12.0-M3
我改变了版本,如你所说。此外,我使用'exclude'就像这样:''org.sorm-framework“%”sorm“%”0.3.19“exclude(”org.scala-lang“,”scala-xml“)''。但是,“scala-xml”的问题仍然存在。我试图按照您使用'exclude'链接的指导原则。我的代码不正确? – octavian
我也试过''org.sorm-framework“%”sorm“%”0.3.19“exclude(”org.scala-lang.modules“,”scala-xml“)' – octavian
请参阅我的编辑。你应该强制使用scala编译器版本。 –