为什么sbt updateClassifier无法下载org.scala-sbt #precompiled?

时间:2015-04-13 17:20:51

标签: sbt

在unix shell中试试这个:

git clone git@github.com:jsuereth/sbt-in-action-examples.git
cd sbt-in-action-examples/chapter11/scalastyle-plugin/
sbt updateClassifiers

使用sbt 0.13.7,我得到了这个:

[warn]  [FAILED     ] org.scala-sbt#precompiled-2_8_2;0.13.7!precompiled-2_8_2.jar:  (0ms)
[warn] ==== typesafe-ivy-releases: tried
[warn]   https://repo.typesafe.com/typesafe/ivy-releases/org.scala-sbt/precompiled-2_8_2/0.13.7/jars/precompiled-2_8_2.jar
…
[warn]  [FAILED     ] org.scala-sbt#precompiled-2_9_2;0.13.7!precompiled-2_9_2.jar:  (0ms)
[warn] ==== typesafe-ivy-releases: tried
[warn]   https://repo.typesafe.com/typesafe/ivy-releases/org.scala-sbt/precompiled-2_9_2/0.13.7/jars/precompiled-2_9_2.jar
…
[warn]  [FAILED     ] org.scala-sbt#precompiled-2_9_3;0.13.7!precompiled-2_9_3.jar:  (0ms)
[warn] ==== typesafe-ivy-releases: tried
[warn]   https://repo.typesafe.com/typesafe/ivy-releases/org.scala-sbt/precompiled-2_9_3/0.13.7/jars/precompiled-2_9_3.jar
… 
[warn]  ::::::::::::::::::::::::::::::::::::::::::::::
[warn]  ::              FAILED DOWNLOADS            ::
[warn]  :: ^ see resolution messages for details  ^ ::
[warn]  ::::::::::::::::::::::::::::::::::::::::::::::
[warn]  :: org.scala-sbt#precompiled-2_8_2;0.13.7!precompiled-2_8_2.jar
[warn]  :: org.scala-sbt#precompiled-2_9_2;0.13.7!precompiled-2_9_2.jar
[warn]  :: org.scala-sbt#precompiled-2_9_3;0.13.7!precompiled-2_9_3.jar
[warn]  ::::::::::::::::::::::::::::::::::::::::::::::
[success] Total time: 4 s, completed Apr 13, 2015 9:51:15 AM

这些警告是否正常?

我注意到SBT试图查找这些工件的URL与发布的工件的URL不匹配。

也就是说,sbt正在寻找这些文物:

https://repo.typesafe.com/typesafe/ivy-releases/org.scala-sbt/precompiled-2_8_2/0.13.7/jars/precompiled-2_8_2.jar https://repo.typesafe.com/typesafe/ivy-releases/org.scala-sbt/precompiled-2_9_2/0.13.7/jars/precompiled-2_9_2.jar https://repo.typesafe.com/typesafe/ivy-releases/org.scala-sbt/precompiled-2_9_3/0.13.7/jars/precompiled-2_9_3.jar

但事实上,可用的工件是:

https://repo.typesafe.com/typesafe/ivy-releases/org.scala-sbt/precompiled-2_8_2/0.13.7/jars/compiler-interface-bin.jar https://repo.typesafe.com/typesafe/ivy-releases/org.scala-sbt/precompiled-2_9_2/0.13.7/jars/compiler-interface-bin.jar https://repo.typesafe.com/typesafe/ivy-releases/org.scala-sbt/precompiled-2_9_3/0.13.7/jars/compiler-interface-bin.jar

看来上面的" compiler-interface-bin.jar"工件对应于"来源"这里的文物:

https://repo.typesafe.com/typesafe/ivy-releases/org.scala-sbt/precompiled-2_8_2/0.13.7/srcs/precompiled-2_8_2-sources.jar https://repo.typesafe.com/typesafe/ivy-releases/org.scala-sbt/precompiled-2_9_2/0.13.7/srcs/precompiled-2_9_2-sources.jar https://repo.typesafe.com/typesafe/ivy-releases/org.scala-sbt/precompiled-2_9_3/0.13.7/srcs/precompiled-2_9_3-sources.jar

  • 尼古拉斯。

1 个答案:

答案 0 :(得分:0)

我猜想,这是由https://repo.typesafe.com/(重定向代理)或Bintray的不稳定引起的。我认为它们不正常。

对于它的价值,我能够运行updateClassifiers很好。