在unix shell中尝试以下操作:

git clone [email protected]: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”工件与此处的“sources”工件相对应:

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
  • Nicolas。
  • 最佳答案

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

    对于它的值(value),我能够很好地运行updateClassifiers

    关于sbt - 为什么sbt updateClassifier无法下载org.scala-sbt#precompiled?,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/29611268/

    10-14 19:07