Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I manage multiple versions of Scala & SBT in my dev environment?

Tags:

scala

sbt

I just finished the awesome Coursera Scala course and am eager to continue learning more about Scala by exploring some existing open source projects. I've hit a snag while trying to get some of them running locally, though.

I come from a background in Ruby, where we use tools such as rvm or rbenv to manage multiple Ruby interpreters/versions on one system. What is the approach that Scala users take for working with projects that use different versions of Scala/SBT?

I suspect that I'm missing something big since this doesn't seem to be a popular issue.

Please note that I'm pretty new to the world of Java and the JVM in general.

like image 845
Jordan Sitkin Avatar asked Nov 16 '12 18:11

Jordan Sitkin


2 Answers

I suggest you take a look at paulp's excellent sbt-extras script. This will enable you to pick which version of sbt you want to use on a per-project basis, and sbt will allow you to pick which version(s) of Scala you want on a per-project basis.

like image 150
Paul Butcher Avatar answered Nov 07 '22 10:11

Paul Butcher


I always use the latest sbt from Homebrew (OS X) and then control the Scala version and libraries from within the build.sbt.

like image 4
akauppi Avatar answered Nov 07 '22 09:11

akauppi