How to install multiple versions of sbt on my Linux host?

How to install multiple versions of sbt on my Linux host

For example, some projects use 0.12.x while some use 0.13.x. Installing neither in the system only is not sufficient enough.

asked May 29, 2014 by Eric Z Ma (43,500 points)

1 Answer

 
Best answer

You may use the excellent sbt-extras: https://github.com/paulp/sbt-extras

Most of the time, it detects the version of sbt needed in the project direoctory automatically:

[zma@office Md2BlogText]$ sbt about
[info] Loading global plugins from /home/zma/.sbt/0.13/plugins
[info] Loading project definition from /home/zma/project/zma-etc/scala/Md2BlogText/project
[info] Set current project to md2blogtext (in build file:/home/zma/project/zma-etc/scala/Md2BlogText/)
[info] This is sbt 0.13.2
[info] The current project is {file:/home/zma/project/zma-etc/scala/Md2BlogText/}md2blogtext 0.1-SNAPSHOT
[info] The current project is built against Scala 2.10.3
[info] Available Plugins: com.dscleaver.sbt.SbtQuickFix, org.ensime.sbt.Plugin
[info] sbt, sbt plugins, and build definitions are using Scala 2.10.3

[zma@office Md2BlogText]$ cd ../progfun-004/example/
[zma@office example]$ sbt about
[info] Loading project definition from /home/zma/project/zma-etc/scala/progfun-004/example/project/project
[info] Loading project definition from /home/zma/project/zma-etc/scala/progfun-004/example/project
[info] Set current project to progfun-example (in build file:/home/zma/project/zma-etc/scala/progfun-004/example/)
[info] This is sbt 0.12.4
[info] The current project is {file:/home/zma/project/zma-etc/scala/progfun-004/example/}assignment
[info] The current project is built against Scala 2.10.2
[info] Available Plugins: com.typesafe.sbteclipse.plugin.EclipsePlugin
[info] sbt, sbt plugins, and build definitions are using Scala 2.9.2

Note that 0.13.2 and 0.12.4 of sbt are started although the command are the same as sbt in different project directories (and different versions of scala).

Or, you can specify the sbt version needed (e.g. 0.12.4):

sbt -sbt-version 0.12.4
answered May 29, 2014 by Eric Z Ma (43,500 points)
selected May 29, 2014 by Eric Z Ma

Please log in or register to answer this question.

Copyright © SysTutorials. User contributions licensed under cc-wiki with attribution required.
Hosted on Dreamhost

...