Why is sbt reporting missing libraries for Scala 2.10.2 (from Aug 1st)?

I have several 2.2.x replay apps that build without issue for months. However, starting on August 1, 2014, I started getting the following warnings and errors:

Getting org.scala-sbt sbt 0.13.0 ...

:: summary summary :: WARNINGS module not found: org.scala-languages ​​# scala -library; 2.10.2

==== local: tried it

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

==== typesafe-ivy releases: tried it

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

==== Maven Central: tried it

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 it

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

==== typesafe-ivy releases: tried it

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

==== Maven Central: tried it

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 VERBIS OR DEBUG MESSAGE LEVEL FOR MORE DETAILS NOT ALLOWED dependency: org.scala-lang # scala -library; 2.10.2: no unsolved dependency found: org.scala-lang # scala -compiler; 2.10.2: not found Error during sbt runtime: error getting required libraries (see /Users/dpope/.sbt/boot/update.log for full log) Error: Failed to restore sbt 0.13.0

(I removed http: from the urls above)

My build command:

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, this worked perfectly for several months and was only starting to have problems as of August 1st, 2014.

Going through update.log I can see that there are 404s for those two files. Obviously it makes sense why the job is failing since there are 404s.

Does anyone have any workaround? Since this happens in the pre-Play build, there are no configurations I can install. I have no way to manage the repositories via ~ / .sbt / repositories on our build server as they are ephemeral.

EDIT Aug 2, 10:40 am 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

depends 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 they no longer exist in any ivy repos.

+3


source to share


1 answer


I just found two places where the problem was reported and solved in different ways.

Change converters to include Sonatype editions

This is documented in SI-8772. Lines relying on the Scala 2.10.2 artifact in Maven fail and the solution is to add the following to your build:

resolvers += Resolver.sonatypeRepo("releases")

      



Uploading downloaded files manually

No problem with Scala library 2.10.2 was also reported on the Apache Spark users mailing list and the solution was to download the required files manually:

$ 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

      

It boils down to downloading missing files from another repository into the Ivy2 local cache. Do the same for scala-compiler

and you should be fine.

+2


source







All Articles