我怎樣才能在編譯使用SORM斯卡拉2.11.6, 我收到以下錯誤SORM:如何使用SORM在斯卡拉2.11.6
[error] Modules were resolved with conflicting cross-version suffixes in ...
[error] org.scala-lang.modules:scala-xml _2.11, _2.12.0-M1
[error] org.scala-lang.modules:scala-parser-combinators _2.11, _2.12.0-M1
在我build.sbt我使用...
name := "api-psi"
version := "1.0-SNAPSHOT"
lazy val root = (project in file(".")).enablePlugins(PlayScala)
scalaVersion := "2.11.6"
libraryDependencies ++= Seq(
"com.h2database" % "h2" % "1.4.177",
"org.sorm-framework" % "sorm" % "0.3.18",
"org.webjars" % "bootstrap" % "3.3.5",
specs2 % Test
)
resolvers += "scalaz-bintray" at "http://dl.bintray.com/scalaz/releases"
routesGenerator := InjectedRoutesGenerator
我想這個例子:https://www.youtube.com/watch?v=eNCerkVyQdcI,但在任何時候,他進口SORM ...
夥計們,我設法解決...
要解決這個矛盾,你應該明確你的常春藤緩存:
~/.ivy2/cache
但是你也想修復斯卡拉編譯器使用的版本,你想讓它匹配您的配置scalaVersion:
dependencyOverrides += "org.scala-lang" % "scala-compiler" % scalaVersion.value
現在我SBT
name := """api-my-psi"""
version := "1.0-SNAPSHOT"
lazy val root = (project in file(".")).enablePlugins(PlayScala)
scalaVersion := "2.11.6"
libraryDependencies ++= Seq(
jdbc,
cache,
ws,
specs2 % Test,
"org.sorm-framework" % "sorm" % "0.3.18",
"org.webjars" % "webjars-play_2.11" % "2.4.0-1",
"org.webjars" % "bootstrap" % "3.3.5"
)
dependencyOverrides += "org.scala-lang" % "scala-compiler" % scalaVersion.value
resolvers += "scalaz-bintray" at "http://dl.bintray.com/scalaz/releases"
routesGenerator := InjectedRoutesGenerator
我編輯我的答案這應該解決這個問題 – anquegi
我有相同的問題和清理緩存不起作用。目前我正在使用臨時解決方案,只需在build.sbt文件中添加「conflictWarning:= ConflictWarning.disable」這一行。有用。 – Luke
您的解決方案有效! –