我应该将我的项目还原为scala 2.10.0,但看起来我无法从控制台获取。我试图在build.sbt中使用scalaVersion:=“2.10.0”进行清理和重建,但它继续使用2.10.2。 我怎么能做“播放scala-version 2.10.0”之类的东西? (这似乎不正确) 我知道它使用2.10.2,因为它使用的是scala编译器并反映了2.10.2
答案 0 :(得分:2)
jacek:~/sandbox/play-ground/xApp
$ play
[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/play-ground/xApp/project
[info] Set current project to xApp (in build file:/Users/jacek/sandbox/play-ground/xApp/)
_
_ __ | | __ _ _ _
| '_ \| |/ _' | || |
| __/|_|\____|\__ /
|_| |__/
play 2.2.2 built with Scala 2.10.3 (running Java 1.7.0_51), http://www.playframework.com
> Type "help play" or "license" for more information.
> Type "exit" or use Ctrl+D to leave this console.
[xApp] $ show scalaVersion
[info] 2.10.3
[xApp] $ set scalaVersion := "2.10.0"
[info] Defining *:scalaVersion
[info] The new value will be used by *:allDependencies, *:dependencyUpdatesData and 11 others.
[info] Run `last` for details.
[info] Reapplying settings...
[info] Set current project to xApp (in build file:/Users/jacek/sandbox/play-ground/xApp/)
[xApp] $ show scalaVersion
[info] 2.10.0
[xApp] $ session save
[info] Reapplying settings...
[info] Set current project to xApp (in build file:/Users/jacek/sandbox/play-ground/xApp/)
[xApp] $ show scalaVersion
[info] 2.10.0
[xApp] $ about
[info] This is sbt 0.13.0
[info] The current project is {file:/Users/jacek/sandbox/play-ground/xApp/}xapp 1.0-SNAPSHOT
[info] The current project is built against Scala 2.10.0
[info] Available Plugins: com.typesafe.sbt.SbtGit, com.typesafe.sbt.SbtProguard, growl.GrowlingTests, org.sbtidea.SbtIdeaPlugin, sbtman.Plugin, np.Plugin, com.timushev.sbt.updates.UpdatesPlugin, play.Project, com.typesafe.sbteclipse.plugin.EclipsePlugin, com.typesafe.sbt.SbtNativePackager
[info] sbt, sbt plugins, and build definitions are using Scala 2.10.3
之后您应该在项目的build.sbt
中看到该版本。
jacek:~/sandbox/play-ground/xApp
$ cat build.sbt
name := "xApp"
version := "1.0-SNAPSHOT"
libraryDependencies ++= Seq(
jdbc,
anorm,
cache
)
scalaVersion := "2.10.0"