SBT下载错误版本的sbt jar

时间:2016-11-22 09:41:57

标签: scala sbt

我有一个多模块项目,我想要激活cached resolutions,这意味着我需要使用SBT 0.13.7 +来构建它。

所以我在sbt.version=0.13.13project/build.properties中指定了project/project/build.properties(我在project/下有scala代码)。

但在完全擦除~/.ivy2/cache/org.scala-sbt之后,我会观察以下日志:

[info] Loading global plugins from /Users/me/.sbt/0.13/plugins
[info] Updating {file:/Users/me/.sbt/0.13/plugins/}global-plugins...
[info] Resolving org.fusesource.jansi#jansi;1.4 ...
[info] downloading https://repo.typesafe.com/typesafe/ivy-releases/org.scala-sbt/sbt/0.13.13/jars/sbt.jar ...
[info]  [SUCCESSFUL ] org.scala-sbt#sbt;0.13.13!sbt.jar (2239ms)

// ... etc, downloading everything SBT 0.13.13

[info] Done updating.
[info] Loading project definition from /Users/me/my-project/project/project
[info] Updating {file:/Users/me/my-project/project/project/}my-project-build-build...
[info] Resolving org.fusesource.jansi#jansi;1.4 ...
[info] Done updating.
[info] Loading project definition from /Users/me/my-project/project
[info] Updating {file:/Users/me/my-project/project/}my-project-build...
[info] Resolving org.fusesource.jansi#jansi;1.4 ...
[info] downloading https://repo.typesafe.com/typesafe/ivy-releases/org.scala-sbt/scripted-plugin/0.13.5/jars/scripted-plugin.jar ...
[info]  [SUCCESSFUL ] org.scala-sbt#scripted-plugin;0.13.5!scripted-plugin.jar (2400ms)

// ... etc, downloading everything SBT 0.13.5

[info] Done updating.
[info] Compiling 1 Scala source to /Users/me/my-project/project/target/scala-2.10/sbt-0.13/classes...
[error] /Users/me/my-project/project/src/main/scala/my/project/sbt/build/Defaults.scala:41: not found: value updateOptions
[error]     updateOptions := updateOptions.value.withCachedResolution(true)
[error]     ^
[error] one error found
[error] (compile:compileIncremental) Compilation failed

显然,SBT试图针对0.13.5罐子建立我的项目定义,这绝对不是我想要的。

有人能指出我为什么SBT使用这个0.13.5版本,虽然我在项目的任何地方都没有引用它吗?

0 个答案:

没有答案