当我sbt
在一个项目目录上运行Detected sbt version 0.12.1
时,启动时会出现问题。
打字about
,它会重复那个版本。
但是,sbt
在不同的项目目录中运行会将其版本标识为0.11.3
.
即使在同一个终端会话中,这也会重现。版本只是因项目目录而异。在 build.sbt 文件中找不到任何会导致此问题的显式部分。
这有什么可以解释的?
就我而言,我想在这两种情况下都使用 sbt 0.12.1,如何强制该版本也用于以后的项目?
当我sbt
在一个项目目录上运行Detected sbt version 0.12.1
时,启动时会出现问题。
打字about
,它会重复那个版本。
但是,sbt
在不同的项目目录中运行会将其版本标识为0.11.3
.
即使在同一个终端会话中,这也会重现。版本只是因项目目录而异。在 build.sbt 文件中找不到任何会导致此问题的显式部分。
这有什么可以解释的?
就我而言,我想在这两种情况下都使用 sbt 0.12.1,如何强制该版本也用于以后的项目?
该项目是一个 SBT 多项目,由于每个子项目都是一个单独的项目,您可以使用它 project/build.properties
来设置不同版本的 SBT。该命令只是特定于项目的。
jacek:~/sandbox/stackoverflow
$ mkdir sbt-sample-project
jacek:~/sandbox/stackoverflow
$ cd sbt-sample-project
jacek:~/sandbox/stackoverflow/sbt-sample-project
$ tree
.
0 directories, 0 files
jacek:~/sandbox/stackoverflow/sbt-sample-project
$ sbt about
[info] Loading global plugins from /Users/jacek/.sbt/0.13/plugins
[info] Set current project to sbt-sample-project (in build file:/Users/jacek/sandbox/stackoverflow/sbt-sample-project/)
[info] This is sbt 0.13.0
[info] The current project is {file:/Users/jacek/sandbox/stackoverflow/sbt-sample-project/}sbt-sample-project 0.1-SNAPSHOT
[info] The current project is built against Scala 2.10.2
[info] Available Plugins: com.typesafe.sbt.SbtGit, com.typesafe.sbt.SbtProguard, growl.GrowlingTests, org.sbtidea.SbtIdeaPlugin, com.timushev.sbt.updates.UpdatesPlugin
[info] sbt, sbt plugins, and build definitions are using Scala 2.10.2
jacek:~/sandbox/stackoverflow/sbt-sample-project
$ mkdir project
jacek:~/sandbox/stackoverflow/sbt-sample-project
$ echo "sbt.version=0.13.1-RC5" > project/build.properties
jacek:~/sandbox/stackoverflow/sbt-sample-project
$ sbt about
[info] Loading global plugins from /Users/jacek/.sbt/0.13/plugins
[info] Updating {file:/Users/jacek/.sbt/0.13/plugins/}global-plugins...
[info] Resolving org.fusesource.jansi#jansi;1.4 ...
[info] Done updating.
[info] Loading project definition from /Users/jacek/sandbox/stackoverflow/sbt-sample-project/project
[info] Updating {file:/Users/jacek/sandbox/stackoverflow/sbt-sample-project/project/}sbt-sample-project-build...
[info] Resolving org.fusesource.jansi#jansi;1.4 ...
[info] Done updating.
[info] Set current project to sbt-sample-project (in build file:/Users/jacek/sandbox/stackoverflow/sbt-sample-project/)
[info] This is sbt 0.13.1-RC5
[info] The current project is {file:/Users/jacek/sandbox/stackoverflow/sbt-sample-project/}sbt-sample-project 0.1-SNAPSHOT
[info] The current project is built against Scala 2.10.3
[info] Available Plugins: com.typesafe.sbt.SbtGit, com.typesafe.sbt.SbtProguard, growl.GrowlingTests, org.sbtidea.SbtIdeaPlugin, com.timushev.sbt.updates.UpdatesPlugin
[info] sbt, sbt plugins, and build definitions are using Scala 2.10.3