eddyP23
eddyP23

Reputation: 6855

SBT startup failing

I am trying to setup a simple SBT project, but it is failing with an annoying error:

λ 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?

Here are the full contents of build.sbt:

import Dependencies._

lazy val root =
    (project in file("."))
      .settings(
        inThisBuild(List(
          organization := "yo.jevramonitor",
          scalaVersion := "2.12.1",
        )),
        name := "ScalaKafkaScripts",
        libraryDependencies ++= allDeps
      )

And here are the contents of Dependencies file:

import sbt._

object Dependencies {
  lazy val kafka = "org.apache.kafka" %% "kafka_2.11" % "0.10.1.0"
  lazy val allDeps = Seq(kafka)
}

Here is the directory structure:

Directory Structure

Upvotes: 0

Views: 262

Answers (1)

user355252
user355252

Reputation:

Remove the trailing comma in scalaVersion := "2.12.1",. Like in Scala itself trailing commas are not allowed in SBT syntax, ie, you can have

Seq("foo", "bar")

but not

Seq("foo", "bar",)

Upvotes: 1

Related Questions