0
我想建立一個簡單的SBT項目,但它與一個惱人的錯誤而失敗:SBT啓動失敗
λ sbt
Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=256m; support was removed in 8.0
[info] Loading global plugins from C:\Users\name.surname\.sbt\0.13\plugins
[info] Loading project definition from C:\work\ScalaKafkaScripts\project
[error] [C:\work\ScalaKafkaScripts\build.sbt]:9: illegal start of simple expression
[error] [C:\work\ScalaKafkaScripts\build.sbt]:12: ')' expected but eof found.
Project loading failed: (r)etry, (q)uit, (l)ast, or (i)gnore?
這裏是build.sbt
全部內容:
import Dependencies._
lazy val root =
(project in file("."))
.settings(
inThisBuild(List(
organization := "yo.jevramonitor",
scalaVersion := "2.12.1",
)),
name := "ScalaKafkaScripts",
libraryDependencies ++= allDeps
)
這裏是Dependencies
文件內容:
import sbt._
object Dependencies {
lazy val kafka = "org.apache.kafka" %% "kafka_2.11" % "0.10.1.0"
lazy val allDeps = Seq(kafka)
}
這裏是目錄結構:
FFS,SBT是與錯誤信息可怕的無助:(非常感謝 – eddyP23
諷刺,現在如果您使用SBT 1(使用2.12),那麼現在就可以使用尾隨逗號。 – Grogs