我安装了0.13.8。
然而,当在文件夹中输入sbt时,sbt试图获得自己的版本0.13.6。我在build.sbt文件中找不到任何可以解释奇怪行为的内容。请告诉我原因。
以下是build.sbt文件的内容。
enablePlugins(JavaServerAppPackaging)
name := "quiz-management-service"
version := "0.1"
organization := "com.danielasfregola"
scalaVersion := "2.11.7"
resolvers ++= Seq("Typesafe Repository" at "http://repo.typesafe.com/typesafe/releases/",
"Spray Repository" at "http://repo.spray.io")
libraryDependencies ++= {
val akkaVersion = "2.4.4"
val sprayVersion = "1.3.3"
Seq(
"com.typesafe.akka" %% "akka-actor" % akkaVersion,
"io.spray" %% "spray-can" % sprayVersion,
"io.spray" %% "spray-routing" % sprayVersion,
"io.spray" %% "spray-json" % "1.3.3",
"com.typesafe.akka" %% "akka-slf4j" % akkaVersion,
"ch.qos.logback" % "logback-classic" % "1.1.2",
"com.typesafe.akka" %% "akka-testkit" % akkaVersion % "test",
"io.spray" %% "spray-testkit" % sprayVersion % "test",
"org.specs2" %% "specs2" % "2.3.13" % "test"
)
}
// Assembly settings
mainClass in Global := Some("com.danielasfregola.quiz.management.Main")
jarName in assembly := "quiz-management-server.jar"
答案 0 :(得分:1)
我明白了。 sbt版本可以在项目文件夹下的build.properties中强制使用,语法为sbt.version = 0.13.x