如何安装sbt eclipse插件?

如何安装sbt eclipse插件?,sbt,sbteclipse,Sbt,Sbteclipse,我遵循了sbt文档中关于如何安装sbt eclipse插件的说明,但在sbt shell中不断出现错误 我正在使用Windows10Pro、SBTv1.3.3和EclipseV4.7.0(在~\Documents\Eclipse中) 我的hello world\build.sbt文件非常简单: scalaVersion := "2.13.1" name := "hello-world" organization := "ch.epfl.scala" version := "1.0" librar

我遵循了sbt文档中关于如何安装sbt eclipse插件的说明,但在sbt shell中不断出现错误

我正在使用Windows10Pro、SBTv1.3.3和EclipseV4.7.0(在~\Documents\Eclipse中)

我的hello world\build.sbt文件非常简单:

scalaVersion := "2.13.1"
name := "hello-world"
organization := "ch.epfl.scala"
version := "1.0"
libraryDependencies += "org.typelevel" %% "cats-core" % "2.0.0"
我的hello world\project\plugins.sbt文件只有一行:

addSbtPlugin("com.typesafe.sbteclipse" % "sbteclipse-plugin" % "5.1.0")
sbt shell中的eclipse命令出错:

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]        ^
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
在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]        ^
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

使用最新版本的插件重新开始

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