Build from source

Install the current stable binary release of sbt (see Setup), which will be used to build sbt from source.

Get the source code.

$ git clone git://github.com/harrah/xsbt.git
$ cd xsbt

The initial branch is the development branch 0.13, which contains the latest code for the next major sbt release. To build a specific release or commit, switch to the associated tag. The tag for the latest stable release is v0.12.1:

$ git checkout v0.12.1

Note that sbt is always built with the previous stable release. For example, the 0.13 branch is built with 0.12.1, the v0.11.2 tag is built with 0.11.1, and the v0.11.0 tag is built with 0.10.1.

To build the launcher, publish all components locally, and build API and SXR documentation:

$ sbt build-all

Alternatively, the individual commands run by build-all may be executed directly:

$ sbt publish-local proguard sxr doc

To use this locally built version of sbt, copy your stable ~/bin/sbt script to ~/bin/xsbt and change it to use the launcher jar in <xsbt>/target/. For the v0.12.1 tag, the full location is:

<xsbt>/target/sbt-launch-0.12.1.jar

If using the 0.13 development branch, the launcher is at:

<xsbt>/target/sbt-launch-0.13.0-SNAPSHOT.jar

Modifying sbt

New development takes place on the 0.13 branch. Fixes and improvements that are binary compatible with 0.12 can be backported to the 0.12 branch at the time of the next release.

When developing sbt itself, there is no need to run build-all, since this generates documentation as well. For the fastest turnaround time for checking compilation only, run compile.

To use your modified version of sbt in a project locally, run publish-local. If you have modified the launcher, also run proguard.

After each publish-local, clean the ~/.sbt/boot/ directory. Alternatively, if sbt is running and the launcher hasn't changed, run reboot full to have sbt do this for you.

If a project has project/build.properties defined, either delete the file or change sbt.version to 0.13.0-SNAPSHOT.

Building Documentation

Documentation is built using sphinx and requires some external programs and libraries to be manually installed first: