"Error during sbt execution: No Scala version specified or detected" with SBT from Homebrew

homebrew, sbt, scala

Solution

Its not an issue with the upgrade of 0.13.* version. Its the repository cache thats causing the issue. There are possibilities where you have broken / no ivys (when only the jar is downloaded through maven repo) for the sbt jars in your cache.

Once upgraded remove your ivy repo cache (or rename the folder) and remove the .sbt/boot folder (removing this will enable to start from the scratch)

Edit your ./sbt/repositories file and provide preference to the ivy repositories. If you are using proxy repositories which includes both ivy and maven style artifacts, the add it as below

[repositories]

local

maven-local

maven-central-ivy: http://<repository url>, [organization]/[module]/(scala_[scalaVersion]/)(sbt_[sbtVersion]/)[revision]/[type]s/[artifact](-[classifier]).[ext]

maven-central: http://<repository url>

This will enable especially (org.scala-sbt/sbt/*) to be download with the Ivys xml from where the version / revision and dependencies are picked up for the builds. If only the jar is downloaded from "maven-central", then the error occurs.

Problem

I have installed Scala 2.10.3 and SBT 0.13.1. When I execute SBT following Hello, World from the SBT documentation I get the following error message: "Error during sbt execution: No Scala version specified or detected" I've tried to add a `build.sbt` file with the `scalaVersion` but the error keeps showing up. Please advise. I've just downgraded sbt to 0.12.3 and it works ... so what's wrong with 0.13.X ?

Original source