为什么sbt为什么报告缺少Scala 2.10.2的库(自8月1日起)? [英] Why does sbt report missing libraries for Scala 2.10.2 (since Aug, 1th)?

查看:446
本文介绍了为什么sbt为什么报告缺少Scala 2.10.2的库(自8月1日起)?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有许多Play 2.2.x应用程序已经构建了好几个月没有问题了.但是,从2014年8月1日开始,我开始收到以下警告和错误:

I've got a number of Play 2.2.x apps that have been building without problem for months. However, starting on 1 Aug 2014, I started getting the following warnings and errors:

获取org.scala-sbt sbt 0.13.0 ...

Getting org.scala-sbt sbt 0.13.0 ...

::问题摘要:: ::::找不到警告模块: org.scala-lang#scala-library; 2.10.2

:: problems summary :: :::: WARNINGS module not found: org.scala-lang#scala-library;2.10.2

====本地:已尝试

==== local: tried

/Users/dpope/.ivy2/local/org.scala-lang/scala-library/2.10.2/ivys/ivy.xml

/Users/dpope/.ivy2/local/org.scala-lang/scala-library/2.10.2/ivys/ivy.xml

==== typesafe-ivy-releases:尝试

==== typesafe-ivy-releases: tried

repo.typesafe.com/typesafe/ivy-releases/org.scala-lang/scala-library/2.10.2/ivys/ivy.xml

repo.typesafe.com/typesafe/ivy-releases/org.scala-lang/scala-library/2.10.2/ivys/ivy.xml

==== Maven Central:已尝试

==== Maven Central: tried

repo1.maven.org/maven2/org/scala-lang/scala-library/2.10.2/scala-library-2.10.2.pom

repo1.maven.org/maven2/org/scala-lang/scala-library/2.10.2/scala-library-2.10.2.pom

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

====本地:已尝试

==== local: tried

/Users/dpope/.ivy2/local/org.scala-lang/scala-compiler/2.10.2/ivys/ivy.xml

/Users/dpope/.ivy2/local/org.scala-lang/scala-compiler/2.10.2/ivys/ivy.xml

==== typesafe-ivy-releases:尝试

==== typesafe-ivy-releases: tried

repo.typesafe.com/typesafe/ivy-releases/org.scala-lang/scala-compiler/2.10.2/ivys/ivy.xml

repo.typesafe.com/typesafe/ivy-releases/org.scala-lang/scala-compiler/2.10.2/ivys/ivy.xml

==== Maven Central:已尝试

==== Maven Central: tried

repo1.maven.org/maven2/org/scala-lang/scala-compiler/2.10.2/scala-compiler-2.10.2.pom

repo1.maven.org/maven2/org/scala-lang/scala-compiler/2.10.2/scala-compiler-2.10.2.pom

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

  ::          UNRESOLVED DEPENDENCIES         ::

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

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

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

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

:::使用详细或调试消息级别了解更多详细信息 依赖项:org.scala-lang#scala-library; 2.10.2:找不到未解决 依赖关系:org.scala-lang#scala-compiler; 2.10.2:找不到错误 在sbt执行期间:检索所需的库时出错(请参阅 /Users/dpope/.sbt/boot/update.log以获取完整日志)错误:无法 检索sbt 0.13.0

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

(我从上面的网址中删除了http:)

(I removed the http: from the urls above)

我的构建命令是:

java -Xms512M -Xmx1536M -Xss1M -XX:+CMSClassUnloadingEnabled -XX:MaxPermSize=384M -jar /opt/sbt/sbt-launch-0.13.0.jar -Dsbt.log.noformat=true clean compile test dist

同样,这已经好几个月了,并且在2014年8月1日才开始出现问题.

Again, that's been working fine for months and just started having issues on 1 Aug 2014.

通过update.log,我看到这2个文件有404个代码.显然,因为存在404,所以为什么作业失败是有道理的.

Going through update.log, I see there are 404s for the 2 files. Obviously, it makes sense why the job is failing since there are 404s.

有人有任何解决方法吗?由于这是在Play之前进行的,因此似乎没有可以设置的配置.我无法通过构建服务器上的〜/.sbt/repository管理仓库,因为它们是临时的.

Anyone have any kind of workaround? Since this is happening pre-Play build, there doesn't appear to be any configs that I can set. I don't have the ability to manage repos via ~/.sbt/repositories on our build server since they are ephemeral.

编辑美国东部时间10月2日10:40

稍加挖掘后,看起来

http: //repo.typesafe.com/typesafe/ivy-releases/org.scala-sbt/compile/0.13.0/ivys/ivy.xml

依赖

<override org="org.scala-lang" module="scala-library" matcher="exact" rev="2.10.2"/>
<override org="org.scala-lang" module="scala-compiler" matcher="exact" rev="2.10.2"/>

但是那些不再存在于任何常春藤仓库中.

but those no longer exist in any ivy repos.

推荐答案

我刚刚找到了两个报告问题并以不同方式解决问题的地方.

I've just found two places where the issue was reported and solved differently.

SI-8772中描述的依赖于Maven中Scala 2.10.2工件的构建失败,解决方案是将以下内容添加到您的版本中:

It's described in SI-8772 Builds relying on Scala 2.10.2 artifact in Maven are failing and the solution is to add the following to your build:

resolvers += Resolver.sonatypeRepo("releases")

手动下载所需文件

Manually downloading the required files

The missing Scala 2.10.2 libraries issue was also reported in Apache Spark users mailing list and the solution was to download the required files manually as follows:

$ cd ~/.ivy2/cache/org.scala-lang/
$ mkdir -p scala-library && cd scala-library
$ wget https://raw.githubusercontent.com/peterklipfel/scala_koans/master/ivyrepo/cache/org.scala-lang/scala-library/ivy-2.10.2.xml
$ wget https://raw.githubusercontent.com/peterklipfel/scala_koans/master/ivyrepo/cache/org.scala-lang/scala-library/ivydata-2.10.2.properties
$ mkdir -p jars && cd jars
$ wget https://github.com/peterklipfel/scala_koans/raw/master/ivyrepo/cache/org.scala-lang/scala-library/jars/scala-library-2.10.2.jar

归结为将丢失的文件从另一个存储库下载到您的Ivy2本地缓存.对scala-compiler做同样的事情,你应该一切都很好.

It boils down to downloading the missing files from another repository to your Ivy2 local cache. Do the same for scala-compiler and you should be all fine.

这篇关于为什么sbt为什么报告缺少Scala 2.10.2的库(自8月1日起)?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆