【问题标题】:Upgraded to sbt 0.13.9; now I cannot launch sbt升级到 sbt 0.13.9;现在我无法启动 sbt
【发布时间】:2015-11-14 09:55:51
【问题描述】:

我将 sbt 从版本 0.13.8 升级到 0.13.9。我们有 Nexus 代理许多存储库。现在,当我发出“sbt”命令时 - 我得到未解决的依赖项

scala-library
scala-compilre
scala-reflect 

都是由于 sha1 与计算的不同。有没有办法绕过 sha1 验证? 供参考。在build.sbt 中设置checksums in update := Nil 并不能解决问题。我什至试着把 ~/.ivy/ivysettings.xml 中的 <property name="ivy.checksums" value=""/> 仍然失败。

这是控制台输出:

D:\Temp\test>sbt -v update
Getting org.scala-sbt sbt 0.13.9 ...

:: problems summary ::
:::: WARNINGS
        problem while downloading module descriptor: http://nexusserver:8081/nexus/content/groups/mvn-repositories/org/scala-lang/scala-library/2.10.5/scala-library-2.10.5.pom: invalid sha1: expected=c39e31e37ce77d8d5fb8e8c640222275815d36f2 computed=4e8b721680f2defb491fe90447302658d464d5c
0 (351ms)

                module not found: org.scala-lang#scala-library;2.10.5

        ==== local: tried

          C:\Users\ak\.ivy2\local\org.scala-lang\scala-library\2.10.5\ivys\ivy.xml

          -- artifact org.scala-lang#scala-library;2.10.5!scala-library.jar:

          C:\Users\ak\.ivy2\local\org.scala-lang\scala-library\2.10.5\jars\scala-library.jar

        ==== my-ivy-proxy-releases: tried

          http://nexusserver:8081/nexus/content/groups/ivy-releases/org.scala-lang/scala-library/2.10.5/ivys/ivy.xml

        ==== my-maven-proxy-releases: tried

          http://nexusserver:8081/nexus/content/groups/mvn-repositories/org/scala-lang/scala-library/2.10.5/scala-library-2.10.5.pom

        problem while downloading module descriptor: http://nexusserver:8081/nexus/content/groups/mvn-repositories/org/scala-lang/scala-compiler/2.10.5/scala-compiler-2.10.5.pom: invalid sha1: expected=9a85822af1f9ea46b49dfdfa99eafc0bd819abaf computed=c3e0b6cf2f45a5a7cb052ef9e00f8fdac55e7
1b7 (69ms)

                module not found: org.scala-lang#scala-compiler;2.10.5

        ==== local: tried

          C:\Users\ak\.ivy2\local\org.scala-lang\scala-compiler\2.10.5\ivys\ivy.xml

          -- artifact org.scala-lang#scala-compiler;2.10.5!scala-compiler.jar:

          C:\Users\ak\.ivy2\local\org.scala-lang\scala-compiler\2.10.5\jars\scala-compiler.jar

        ==== my-ivy-proxy-releases: tried

          http://nexusserver:8081/nexus/content/groups/ivy-releases/org.scala-lang/scala-compiler/2.10.5/ivys/ivy.xml

        ==== my-maven-proxy-releases: tried

          http://nexusserver:8081/nexus/content/groups/mvn-repositories/org/scala-lang/scala-compiler/2.10.5/scala-compiler-2.10.5.pom

        problem while downloading module descriptor: http://nexusserver:8081/nexus/content/groups/mvn-repositories/org/scala-lang/scala-reflect/2.10.5/scala-reflect-2.10.5.pom: invalid sha1: expected=3a6fa11041ac0c8b4d5fcf9d4f1372ba8c0b7216 computed=30f1f646114a79eeefb254ead190f045c460564
9 (67ms)

                module not found: org.scala-lang#scala-reflect;2.10.5

        ==== local: tried

          C:\Users\ak\.ivy2\local\org.scala-lang\scala-reflect\2.10.5\ivys\ivy.xml

          -- artifact org.scala-lang#scala-reflect;2.10.5!scala-reflect.jar:

          C:\Users\ak\.ivy2\local\org.scala-lang\scala-reflect\2.10.5\jars\scala-reflect.jar

        ==== my-ivy-proxy-releases: tried

          http://nexusserver:8081/nexus/content/groups/ivy-releases/org.scala-lang/scala-reflect/2.10.5/ivys/ivy.xml

        ==== my-maven-proxy-releases: tried

          http://nexusserver:8081/nexus/content/groups/mvn-repositories/org/scala-lang/scala-reflect/2.10.5/scala-reflect-2.10.5.pom

                ::::::::::::::::::::::::::::::::::::::::::::::

                ::          UNRESOLVED DEPENDENCIES         ::

                ::::::::::::::::::::::::::::::::::::::::::::::

                :: org.scala-lang#scala-library;2.10.5: not found

                :: org.scala-lang#scala-compiler;2.10.5: not found

                :: org.scala-lang#scala-reflect;2.10.5: not found

                ::::::::::::::::::::::::::::::::::::::::::::::



:: USE VERBOSE OR DEBUG MESSAGE LEVEL FOR MORE DETAILS
unresolved dependency: org.scala-lang#scala-library;2.10.5: not found
unresolved dependency: org.scala-lang#scala-compiler;2.10.5: not found
unresolved dependency: org.scala-lang#scala-reflect;2.10.5: not found
Error during sbt execution: Error retrieving required libraries
  (see C:\Users\ak\.sbt\boot\update.log for complete log)
Error: Could not retrieve sbt 0.13.9

【问题讨论】:

  • 你试过清理你的 ivy2-cache 吗?我认为默认的externalResolvers 在 0.13.9 中发生了变化
  • 我做到了。我删除了“缓存”目录。
  • 你的项目目标和插件目标文件夹呢?
  • 什么 scala 版本?我刚刚尝试过并且适用于 sbt 0.13.9 和 scalaVersion := 2.11.7
  • 抱歉,在床上 ;) 问题似乎出在您的 nexus 代理中。您可能需要重新配置您的 sbt 插件存储库。但我对 Sonatype Nexus 没有任何经验。

标签: scala sbt


【解决方案1】:

原来是我们的 Nexus 代理存储库的订购问题。 oss.sonatype.org maven repo 被放置在 Maven Central repo 之前导致了一个问题。删除 oss.sonatype.org maven 仓库解决了这个问题。

【讨论】:

  • 也解决这个问题。 sonatype-oss 似乎仍然存在错误哈希的问题:-/
猜你喜欢
  • 2016-02-17
  • 2018-09-14
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2017-05-20
  • 1970-01-01
  • 2015-09-16
  • 1970-01-01
相关资源
最近更新 更多