为什么 SBT libraryDependencies %% 会截断 scalaVersion? [英] Why does SBT libraryDependencies %% truncate scalaVersion?
本文介绍了为什么 SBT libraryDependencies %% 会截断 scalaVersion?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
在我的 build.sbt 中有这些行
In my build.sbt I have the lines
scalaVersion := "2.10.0-M6"
libraryDependencies ++= List(
"com.typesafe" %% "slick" % "0.11.0",
"org.slf4j" %% "slf4j-nop" % "1.6.4"
)
运行 sbt update
显示未解决的依赖项异常.当我查看 sbt 试图为库检索的 URL 时,我看到它正在寻找 com.typesafe$slick_2.10;0.11.0
.
running sbt update
shows an unresolved dependency exception. When I look at the URL sbt is trying to retrieve for the library, I see it's looking for com.typesafe$slick_2.10;0.11.0
.
为什么没有附加完整的 ScalaVersion
?有没有一个选项可以让我使用整个版本而不是截断的版本?
Why isn't the full ScalaVersion
appended? Is there an option I can use to cause it to use the entire version instead of the truncated one?
推荐答案
这应该从 sbt 0.12
开始工作.请参阅 sbt wiki 上的 Cross-building.
This should work starting with sbt 0.12
. See Cross-building at sbt wiki.
"com.typesafe" % "slick" % "0.11.0" cross CrossVersion.full
这篇关于为什么 SBT libraryDependencies %% 会截断 scalaVersion?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文