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:
Getting org.scala-sbt sbt 0.13.0 ...
:: 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
==== typesafe-ivy-releases: tried
repo.typesafe.com/typesafe/ivy-releases/org.scala-lang/scala-library/2.10.2/ivys/ivy.xml
==== Maven Central: tried
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
==== typesafe-ivy-releases: tried
repo.typesafe.com/typesafe/ivy-releases/org.scala-lang/scala-compiler/2.10.2/ivys/ivy.xml
==== Maven Central: tried
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 ::::::::::::::::::::::::::::::::::::::::::::::
:: 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
(I removed the http: from the urls above)
My build command is:
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
Again, that's been working fine for months and just started having issues on 1 Aug 2014.
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.
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.
EDIT 2 Aug 10:40a EDT
After a little more digging, it looks like
http://repo.typesafe.com/typesafe/ivy-releases/org.scala-sbt/compile/0.13.0/ivys/ivy.xml
has dependencies on
<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.
Change resolvers to include Sonatype Releases
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:
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:
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.