sbt has moved
sbt has now completely moved to GitHub.
See https://github.com/harrah/xsbt/wiki/FAQ.
- Problem
- The compiler cannot find classes
- Solution
- Ensure the classes are on the classpath. You need to run update if you have declared managed dependencies. Unmanaged jars should go in lib/ by default.
- Discussion
- You can use console-project to list the contents of classpaths. Check that the expected jars exist and contain the classes you want. You can also use javap for this purpose.
A common cause is forgetting to run update. See the documentation on classpaths and managing dependencies for more information.
- Problem
- Corrupted download of sbt or Scala
- Solution
- Restart sbt after deleting:
- ~/.m2/repository
- ~/.ivy2/cache
- project/boot
- Discussion
- While this should not normally be necessary assuming Ivy is doing its job properly, removing these directories will reset things to a clean state so you can be sure whatever problem isn't being caused by corrupt or stale cached files. If you find yourself doing this repeatedly, please report the issue.
It would probably be better to recommend deleting ~/.m2/repository (rather than ~/.m2) to avoid losing settings.xml
Thanks, updated.
I tried the above mentioned solution but it did not help. Please help.
root@vish-laptop:~# sbt clean update package-dist Getting Scala 2.7.7 ... downloading http://repo1.maven.org/maven2/org/scala-lang/scala-compiler/2.7.7/scala-compiler-2.7.7.jar ...
downloading http://repo1.maven.org/maven2/org/scala-lang/scala-library/2.7.7/scala-library-2.7.7.jar ... :: retrieving :: org.scala-tools.sbt#boot-scala Error: Could not retrieve Scala 2.7.7: missing scala.tools.nsc.Global root@vish-laptop:~# rm -rf ~/.m2/repository root@vish-laptop:~# rm -rf ~/.ivy2/cache/ root@vish-laptop:~# rm -rf project/boot root@vish-laptop:~# sbt update Getting Scala 2.7.7 ... downloading http://repo1.maven.org/maven2/org/scala-lang/scala-compiler/2.7.7/scala-compiler-2.7.7.jar ... downloading http://repo1.maven.org/maven2/org/scala-lang/scala-library/2.7.7/scala-library-2.7.7.jar ... :: retrieving :: org.scala-tools.sbt#boot-scala Error: Could not retrieve Scala 2.7.7: missing scala.tools.nsc.Global root@vish-laptop:~# rm -rf ~/.m2/repository root@vish-laptop:~# rm -rf ~/.ivy2/cache/ root@vish-laptop:~# rm -rf project/boot root@vish-laptop:~# sbt clean update package-dist Getting Scala 2.7.7 ... downloading http://repo1.maven.org/maven2/org/scala-lang/scala-compiler/2.7.7/scala-compiler-2.7.7.jar ... downloading http://repo1.maven.org/maven2/org/scala-lang/scala-library/2.7.7/scala-library-2.7.7.jar ... :: retrieving :: org.scala-tools.sbt#boot-scala Error: Could not retrieve Scala 2.7.7: missing scala.tools.nsc.Global root@vish-laptop:~#it doesn't seem able to download the scala 2.7.7 compiler, i have the same problem, can download the file in the browser though.