15
votes

I have a Scala project consisting of a few ones. I decided to start using sbt 0.13. Here is ~/sbt/repositories:

[repositories]
  local
  sbt-releases-repo: http://repo.typesafe.com/typesafe/ivy-releases/, [organization]/[module]/(scala_[scalaVersion]/)(sbt_[sbtVersion]/)[revision]/[type]s/[artifact](-[classifier]).[ext]
  sbt-plugins-repo: http://repo.scala-sbt.org/scalasbt/sbt-plugin-releases/, [organization]/[module]/(scala_[scalaVersion]/)(sbt_[sbtVersion]/)[revision]/[type]s/[artifact](-[classifier]).[ext]
  maven-central: http://repo1.maven.org/maven2/

But still I get an error:

Getting org.scala-sbt sbt 0.13 ...

:: problems summary ::
:::: WARNINGS
        module not found: org.scala-sbt#sbt;0.13

    ==== local: tried

      /home/alex/.ivy2/local/org.scala-sbt/sbt/0.13/ivys/ivy.xml

    ==== sbt-releases-repo: tried

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

    ==== sbt-plugins-repo: tried

      http://repo.scala-sbt.org/scalasbt/sbt-plugin-releases/org.scala-sbt/sbt/0.13/ivys/ivy.xml

    ==== maven-central: tried

      http://repo1.maven.org/maven2/org/scala-sbt/sbt/0.13/sbt-0.13.pom

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

        ::          UNRESOLVED DEPENDENCIES         ::

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

        :: org.scala-sbt#sbt;0.13: not found

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



:: USE VERBOSE OR DEBUG MESSAGE LEVEL FOR MORE DETAILS
unresolved dependency: org.scala-sbt#sbt;0.13: not found
Error during sbt execution: Error retrieving required libraries
  (see /home/alex/.sbt/boot/update.log for complete log)
Error: Could not retrieve sbt 0.13

If I remove this file then the error remains.

4
What do you mean by "I decided to start using sbt 0.13"? Did you download sbt 0.13?Jacek Laskowski
Did you mean ~/.sbt/repositories instead of ~/sbt/repositories?James Moore

4 Answers

8
votes

Try using 0.13.1.

Put the following in project/build.properties:

sbt.version=0.13.1

You will probably need the 0.13 sbt launcher as well. See sbt Getting-Started - Setup

2
votes

It looks like you are experiencing version mismatch issue.

If you have modified your project/build.properties to include sbt.version=0.13.0, it could mean that you are using wrong launcher.

Try running

sbt sbt-version

and check if the version matches your sbt version in project/build.properties.

2
votes

I had the same issue when first installing openjdk-9-jdk and then openjdk-8-jdk on Ubuntu.

I ended up uninstalling both, rm -rfing /etc/ssl/certs/java and /etc/java-*, reinstalling openjdk-8-jdk and running sudo update-ca-certificates -f, which fixed it for me.

0
votes

Two steps only

  1. Update the certificates using

    $ update-ca-certificates -f
    
  2. Enter

    $ sbt  
    

It will fetch the requisite files, if connected to internet.