从SBT运行控制台时出现错误"无法检索源模块:org.scala-sbt:compiler-interface:0.13.13:component"

时间:2017-04-07 06:25:03

标签: 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

1 个答案:

答案 0 :(得分:1)

我遇到了类似的问题,虽然我不确定是什么原因造成的,但是有一种变通办法可以为我解决该问题:

maven下载compiler-interface.jar以获取您的sbt版本,并将其放入本地常春藤缓存中。

检查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.jar放入C:\Users\sujitd\.ivy2\local\org.scala-sbt\compiler-interface\0.13.13\srcs\