sbt, the interactive build tool
Go to file
Paul Phillips 1bd64f2381 Added .sbtopts facility. Put such a file in the sbt root directory
and these options will be passed always.  Specific handy use is a file
with "-snapshot" if the project depends on snapshot sbt.
2011-08-25 09:03:41 -07:00
.lib More path/symlink issues, a few bugs which had crept in 2011-08-14 12:29:10 -07:00
project Nearly ready to ship. 2011-08-14 09:55:31 -07:00
src/main/scala Main. 2011-08-14 10:17:16 -07:00
.gitignore Added more options. Can choose to use an sbt snapshot with -snapshot. 2011-08-25 08:23:24 -07:00
README.md More path/symlink issues, a few bugs which had crept in 2011-08-14 12:29:10 -07:00
sbt Added .sbtopts facility. Put such a file in the sbt root directory 2011-08-25 09:03:41 -07:00

README.md

sbt: the rebel cut

An alternative script for running sbt 0.10. There's also a template project sbt coming together, but it's unfinished. However the runner is quite useful already.

Here's a sample first run, which uses a shared boot directory and a local scala.

% ./sbt -shared /tmp/bippy -local /scala/inst/3 run
Downloading sbt launcher, this should only take a moment...
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  915k  100  915k    0     0   339k      0  0:00:02  0:00:02 --:--:--  354k
[info] Set current project to project-name-here (in build file:/repo/sbt-template/)
[info] Running template.Main 
Skeleton main, reporting for duty on version 2.10.0.r25487-b20110811131227
[success] Total time: 0 s, completed Aug 14, 2011 11:12:58 AM

Adding -debug to the same command line reveals the command line arguments:

% ./sbt -shared /tmp/bippy -local /scala/inst/3 run
# Executing command line:
java
-Xss2m
-Xms256M
-Xmx1536M
-XX:MaxPermSize=256M
-XX:+CMSClassUnloadingEnabled
-XX:MaxPermSize=512m
-Xmx2g
-Xss2m
-Dsbt.boot.directory=/tmp/bippy
-jar
/repo/sbt-template/lib/sbt-launch.jar
"set logLevel := Level.Debug"
"set scalaHome := Some(file("/scala/inst/3"))"
run

Current -help output:

% ./sbt -help

Usage: sbt [options]

  -help           prints this message
  -nocolor        disable ANSI color codes
  -debug          set sbt log level to debug
  -sbtjar <path>  location of sbt launcher (default: ./.lib/sbt-launch.jar)
  -sbtdir <path>  location of global settings and plugins (default: ~/.sbt)
     -ivy <path>  local Ivy repository (default: ~/.ivy2)
  -shared <path>  shared sbt boot directory (default: none, no sharing)

  # setting scala version
  -28           set scala version to 2.8.1
  -29           set scala version to 2.9.0-1
  -210          set scala version to 2.10.0-SNAPSHOT
  -local <path> set scala version to local installation at path

  # passing options to jvm
  JAVA_OPTS     environment variable  # default: "-Dfile.encoding=UTF8"
  SBT_OPTS      environment variable  # default: "-XX:+CMSClassUnloadingEnabled -XX:MaxPermSize=512m -Xmx2g -Xss2m"
  -Dkey=val     pass -Dkey=val directly to the jvm
  -J-X          pass option -X directly to the jvm (-J is stripped)

The defaults given for JAVA_OPTS and SBT_OPTS are only used if the
corresponding variable is unset. In the case of a duplicated option,
SBT_OPTS takes precedence over JAVA_OPTS, and command line options
take precedence over both.