我已经按照关于如何安装 sbt-eclipse 插件的 sbt 文档进行操作,但是我一直在 sbt shell 中遇到错误。
我正在使用 Windows 10 Pro、sbt v1.3.3 和 Eclipse v4.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 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