1
我有使用1個插件和3相關性的SBT構建文件:爲什麼sbt爲聲明的依賴項使用不正確的版本號?
scalaVersion := "2.10.4"
val reflect = Def.setting { "org.scala-lang" % "scala-reflect" % "2.10.4" }
val compiler = Def.setting { "org.scala-lang" % "scala-compiler" % "2.10.4" }
lazy val macrosSettings = Project.defaultSettings ++ Seq(
addCompilerPlugin("org.scala-lang.plugins" % "macro-paradise_2.10.4-SNAPSHOT" % "2.0.0-SNAPSHOT"),
libraryDependencies ++= {
import Dependencies._
Seq(play_json, specs2, reflect.value)
}
)
lazy val Macros = Project(id="IScala-Macros", base=file("macros"), settings=macrosSettings)
但是編譯器給了我下面的錯誤在編譯的iScala-宏:
[warn] :: org.scala-lang#scala-compiler;2.10.4-SNAPSHOT: not found
[warn] :: org.scala-lang#scala-library;2.10.4-SNAPSHOT: not found
[warn] :: org.scala-lang#scala-reflect;2.10.4-SNAPSHOT: not found
這似乎是一個錯誤的我不想讓他們解決2.10.4-SNAPSHOT,但只有2.10.4,這是sbt的錯誤嗎?如果不是,這個SNAPSHOT從哪裏來?
對不起原構建文件很長,而且令人費解:我從這次修改: https://github.com/mattpap/IScala/blob/master/project/Build.scala 即我改變scalaVersion從2.10.2到2.10.4 – tribbloid
讓我來分享一個新的git項目來向你展示完整的文件 – tribbloid
好的,我分叉了一個新的分支:https://github.com/tribbloid/IScala/blob/master/project/ Build.scala – tribbloid