scala - 从 SBT 运行控制台时出现错误 "Couldn' t 检索源模块 : org. scala-sbt :compiler-interface:0. 13.13:component"

标签 scala sbt

在 Window 命令上,我安装 Scala 和 SBT 。
从 SBT 运行控制台命令时出现错误。

有人可以帮我解决这个问题吗?

低于错误
>sbt

Java HotSpot(TM) Client VM warning: ignoring option MaxPermSize=256m; support was removed in 8.0
[info] Set current project to sujitd (in build file:/C:/Users/sujitd/)

> 控制台
   [info] Compiling 1 Scala source to C:\Users\sujitd\target\scala-2.10\classes...
    [info] Resolving org.scala-sbt#interface;0.13.13 ...
    [warn] Host repo1.maven.org not found. url=https://repo1.maven.org/maven2/org/scala-sbt/compiler-interface/0.13.13/compiler-interface-0.13.13-sources.jar
    [info] You probably access the destination server through a proxy server that is not well configured.
    [warn] Host repo.typesafe.com not found. url=https://repo.typesafe.com/typesafe/ivy-releases/org.scala-sbt/compiler-interface/0.13.13/srcs/compiler-interface-sources.jar
    [info] You probably access the destination server through a proxy server that is not well configured.
    [warn] Host repo.scala-sbt.org not found. url=https://repo.scala-sbt.org/scalasbt/ivy-snapshots/org.scala-sbt/compiler-interface/0.13.13/srcs/compiler-interface-sources.jar
    [info] You probably access the destination server through a proxy server that is not well configured.
    [warn]  [FAILED     ] org.scala-sbt#compiler-interface;0.13.13!compiler-interface.jar(src):  (0ms)
    [warn] ==== local: tried
    [warn]   C:\Users\sujitd\.ivy2\local\org.scala-sbt\compiler-interface\0.13.13\srcs\compiler-interface-sources.jar
    [warn] ==== public: tried
    [warn]   https://repo1.maven.org/maven2/org/scala-sbt/compiler-interface/0.13.13/compiler-interface-0.13.13-sources.jar
    [warn] ==== typesafe-ivy-releases: tried
    [warn]   https://repo.typesafe.com/typesafe/ivy-releases/org.scala-sbt/compiler-interface/0.13.13/srcs/compiler-interface-sources.jar
    [warn] ==== sbt-ivy-snapshots: tried
    [warn]   https://repo.scala-sbt.org/scalasbt/ivy-snapshots/org.scala-sbt/compiler-interface/0.13.13/srcs/compiler-interface-sources.jar
    [warn]  ::::::::::::::::::::::::::::::::::::::::::::::
    [warn]  ::              FAILED DOWNLOADS            ::
    [warn]  :: ^ see resolution messages for details  ^ ::
    [warn]  ::::::::::::::::::::::::::::::::::::::::::::::
    [warn]  :: org.scala-sbt#compiler-interface;0.13.13!compiler-interface.jar(src)
    [warn]  ::::::::::::::::::::::::::::::::::::::::::::::
    [trace] Stack trace suppressed: run last compile:compileIncremental for the full output.
    [error] (compile:compileIncremental) sbt.InvalidComponent: Couldn't retrieve source module: org.scala-sbt:compiler-interface:0.13.13:component
    [error] Total time: 2 s, completed Apr 7, 2017 9:59:20 AM

最佳答案

我遇到了类似的问题,虽然我不确定是什么原因造成的,但这里有一个解决方法可以为我解决:

下载 compiler-interface.jar来自 maven对于您的 sbt 版本并将其放入本地 Ivy 缓存中。

检查 sbt 输出以查看系统的本地缓存路径: [warn] ==== local: tried [warn] C:\Users\sujitd\.ivy2\local\org.scala-sbt\compiler-interface\0.13.13\srcs\compiler-interface-sources.jar
因此,在这种情况下,您应该输入 compiler-interface-sources.jarC:\Users\sujitd\.ivy2\local\org.scala-sbt\compiler-interface\0.13.13\srcs\

关于scala - 从 SBT 运行控制台时出现错误 "Couldn' t 检索源模块 : org. scala-sbt :compiler-interface:0. 13.13:component",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/43271076/

相关文章:

list - 将元素添加到作为 IMMUTABLE 映射的 scala 集

sbt - 为什么 SBT 项目被声明为惰性验证?

java - 未找到 Spark RDD 类

git - 来自 github PR (ScalaNative) 的 sbt scala 插件失败,未找到值

scala - 如何在 Scala 中使用 Flink 的 KafkaSource?

apache - 使用 Apache Sling 的 Scala 2.8 脚本引擎

scala - 为什么这样的操作符定义在 Scala 中是可能的?

maven - 如何处理多个构建目标,例如开发、测试、主要?

scala - sbt 0.10下收集依赖(将所有依赖jar放到target/scala-version/lib/)

scala - Spark结构化流将聚合数据帧连接到数据帧