0
votes

I've followed the sbt documentation on how to install the sbt-eclipse plugin, but I keep getting errors in the sbt shell.

I'm using Windows 10 Pro, sbt v1.3.3, and Eclipse v4.7.0 (in ~\Documents\eclipse).

My hello-world\build.sbt file is very simple:

scalaVersion := "2.13.1"
name := "hello-world"
organization := "ch.epfl.scala"
version := "1.0"
libraryDependencies += "org.typelevel" %% "cats-core" % "2.0.0"

And my hello-world\project\plugins.sbt file has only one line:

addSbtPlugin("com.typesafe.sbteclipse" % "sbteclipse-plugin" % "5.1.0")

Error on the eclipse command in sbt shell:

sbt:hello-world> eclipse
[error] Expected ';'
[error] Not a valid command: eclipse (similar: client, help, alias)
[error] Not a valid project ID: eclipse
[error] Expected ':'
[error] Not a valid key: eclipse (similar: deliver, licenses, clean)
[error] eclipse
[error]        ^

Error on compilation in sbt shell:

sbt:hello-world> compile
Nov 09, 2019 2:19:40 PM lmcoursier.internal.shaded.coursier.cache.shaded.org.jline.utils.Log logr
WARNING: Unable to create a system terminal, creating a dumb terminal (enable debug logging for more information)
[info] Updating
[info] Resolved  dependencies
[warn]
[warn]  Note: Some unresolved dependencies have extra attributes.  Check that these dependencies exist with the requested attributes.
[warn]          com.typesafe.sbteclipse:sbteclipse-plugin:5.1.0 (sbtVersion=1.0, scalaVersion=2.13)
[warn]
[warn]  Note: Unresolved dependencies path:
[error] stack trace is suppressed; run last update for the full output
[error] (update) sbt.librarymanagement.ResolveException: Error downloading com.typesafe.sbteclipse:sbteclipse-plugin;sbtVersion=1.0;scalaVersion=2.13:5.1.0
[error]   Not found
[error]   Not found
[error]   not found: C:\Users\colin\.ivy2\local\com.typesafe.sbteclipse\sbteclipse-plugin\scala_2.13\sbt_1.0\5.1.0\ivys\ivy.xml
[error]   not found: https://repo1.maven.org/maven2/com/typesafe/sbteclipse/sbteclipse-plugin_2.13_1.0/5.1.0/sbteclipse-plugin-5.1.0.pom
[error] Total time: 1 s, completed Nov 9, 2019 2:19:41 PM
1

1 Answers

0
votes

Use the latest version of the plugin and start over.

addSbtPlugin("com.typesafe.sbteclipse" % "sbteclipse-plugin" % "5.2.4")

See https://github.com/sbt/sbteclipse.