2011-08-14 19:59:47 +02:00
|
|
|
sbt: the rebel cut
|
|
|
|
|
==================
|
|
|
|
|
|
2011-08-25 23:55:22 +02:00
|
|
|
An alternative script for running [sbt](https://github.com/harrah/xsbt).
|
2011-08-26 01:06:12 +02:00
|
|
|
It works with sbt 0.7x projects as well as 0.10+. If you're in an sbt
|
|
|
|
|
project directory, the runner will figure out the versions of sbt
|
|
|
|
|
and scala required by the project and download them if necessary.
|
2011-08-25 23:55:22 +02:00
|
|
|
|
2011-08-14 19:59:47 +02:00
|
|
|
There's also a template project sbt coming together, but it's unfinished.
|
|
|
|
|
However the runner is quite useful already.
|
|
|
|
|
|
2011-08-25 23:55:22 +02:00
|
|
|
Here's a sample use of the runner: it creates a new project using a
|
|
|
|
|
snapshot version of sbt as well as a snapshot version of scala, then
|
|
|
|
|
runs the sbt "about" command.
|
2011-08-14 20:17:28 +02:00
|
|
|
|
2011-08-25 23:55:22 +02:00
|
|
|
% sbt -d -sbt-snapshot -210 -sbt-create about
|
2011-08-14 20:17:28 +02:00
|
|
|
# Executing command line:
|
|
|
|
|
java
|
|
|
|
|
-Xss2m
|
|
|
|
|
-Xms256M
|
|
|
|
|
-Xmx1536M
|
|
|
|
|
-XX:MaxPermSize=256M
|
|
|
|
|
-XX:+CMSClassUnloadingEnabled
|
|
|
|
|
-XX:MaxPermSize=512m
|
|
|
|
|
-Xmx2g
|
|
|
|
|
-Xss2m
|
|
|
|
|
-jar
|
2011-08-25 18:34:14 +02:00
|
|
|
/r/sbt-extras/.lib/0.11.0-20110825-052147/sbt-launch.jar
|
|
|
|
|
"set logLevel in Global := Level.Debug"
|
2011-08-25 23:55:22 +02:00
|
|
|
"++ 2.10.0-SNAPSHOT"
|
2011-08-25 18:34:14 +02:00
|
|
|
"iflast shell"
|
|
|
|
|
about
|
|
|
|
|
|
|
|
|
|
Getting net.java.dev.jna jna 3.2.3 ...
|
|
|
|
|
:: retrieving :: org.scala-tools.sbt#boot-app
|
|
|
|
|
confs: [default]
|
2011-08-25 23:55:22 +02:00
|
|
|
1 artifacts copied, 0 already retrieved (838kB/12ms)
|
2011-08-25 18:34:14 +02:00
|
|
|
Getting Scala 2.9.1.RC4 (for sbt)...
|
|
|
|
|
:: retrieving :: org.scala-tools.sbt#boot-scala
|
|
|
|
|
confs: [default]
|
2011-08-25 23:55:22 +02:00
|
|
|
4 artifacts copied, 0 already retrieved (19939kB/32ms)
|
2011-08-25 18:34:14 +02:00
|
|
|
Getting org.scala-tools.sbt sbt_2.9.1.RC4 0.11.0-20110825-052147 ...
|
|
|
|
|
:: retrieving :: org.scala-tools.sbt#boot-app
|
|
|
|
|
confs: [default]
|
2011-08-25 23:55:22 +02:00
|
|
|
38 artifacts copied, 0 already retrieved (6948kB/45ms)
|
|
|
|
|
[info] Set current project to default-30ae78 (in build file:/private/var/folders/1w/zm_1vksn3y7gn127bkwt841w0000gn/T/abc.h9FdreF1/)
|
2011-08-25 18:34:14 +02:00
|
|
|
[info] Reapplying settings...
|
2011-08-25 23:55:22 +02:00
|
|
|
[info] Set current project to default-30ae78 (in build file:/private/var/folders/1w/zm_1vksn3y7gn127bkwt841w0000gn/T/abc.h9FdreF1/)
|
|
|
|
|
Setting version to 2.10.0-SNAPSHOT
|
|
|
|
|
[info] Set current project to default-30ae78 (in build file:/private/var/folders/1w/zm_1vksn3y7gn127bkwt841w0000gn/T/abc.h9FdreF1/)
|
|
|
|
|
Getting Scala 2.10.0-SNAPSHOT ...
|
|
|
|
|
:: retrieving :: org.scala-tools.sbt#boot-scala
|
|
|
|
|
confs: [default]
|
|
|
|
|
4 artifacts copied, 0 already retrieved (20650kB/58ms)
|
2011-08-25 18:34:14 +02:00
|
|
|
[info] This is sbt 0.11.0-20110825-052147
|
2011-08-25 23:55:22 +02:00
|
|
|
[info] The current project is {file:/private/var/folders/1w/zm_1vksn3y7gn127bkwt841w0000gn/T/abc.h9FdreF1/}default-30ae78
|
|
|
|
|
[info] The current project is built against Scala 2.10.0-SNAPSHOT
|
2011-08-25 18:34:14 +02:00
|
|
|
[info] sbt, sbt plugins, and build definitions are using Scala 2.9.1.RC4
|
2011-08-25 23:55:22 +02:00
|
|
|
[info] All logging output for this session is available at /var/folders/1w/zm_1vksn3y7gn127bkwt841w0000gn/T/sbt8625229869994477318.log
|
2011-08-25 18:34:14 +02:00
|
|
|
|
2011-08-14 20:17:28 +02:00
|
|
|
|
|
|
|
|
Current -help output:
|
|
|
|
|
|
|
|
|
|
% ./sbt -help
|
2011-08-14 19:57:18 +02:00
|
|
|
|
2011-08-14 20:04:39 +02:00
|
|
|
Usage: sbt [options]
|
|
|
|
|
|
2011-08-25 23:55:22 +02:00
|
|
|
-h | -help print this message
|
|
|
|
|
-v | -verbose this runner is chattier
|
|
|
|
|
-d | -debug set sbt log level to debug
|
|
|
|
|
-no-colors disable ANSI color codes
|
|
|
|
|
-sbt-create start sbt even if current directory contains no sbt project
|
|
|
|
|
-sbt-dir <path> path to global settings/plugins directory (default: ~/.sbt)
|
|
|
|
|
-sbt-boot <path> path to shared boot directory (default: none, no sharing)
|
|
|
|
|
-ivy <path> path to local Ivy repository (default: ~/.ivy2)
|
|
|
|
|
|
|
|
|
|
# sbt version (default: from project/build.properties if there, else latest release)
|
|
|
|
|
-sbt-version <version> use the specified version of sbt
|
|
|
|
|
-sbt-jar <path> use the specified jar as the sbt launcher
|
|
|
|
|
-sbt-snapshot use a snapshot version of sbt
|
|
|
|
|
|
|
|
|
|
# scala version (default: latest release)
|
|
|
|
|
-28 use 2.8.1
|
|
|
|
|
-29 use 2.9.0-1
|
|
|
|
|
-29rc use 2.9.1.RC4
|
|
|
|
|
-210 use 2.10.0-SNAPSHOT
|
|
|
|
|
-scala-home <path> use the scala build at the specified directory
|
|
|
|
|
-scala-version <version> use the specified version of scala
|
2011-08-14 20:04:39 +02:00
|
|
|
|
2011-08-25 23:55:22 +02:00
|
|
|
# java version (default: java from PATH, currently java version "1.6.0_26")
|
|
|
|
|
-java-home <path> alternate JAVA_HOME
|
2011-08-14 20:04:39 +02:00
|
|
|
|
2011-08-25 18:34:14 +02:00
|
|
|
# jvm options and output control
|
|
|
|
|
JAVA_OPTS environment variable, if unset uses "-Dfile.encoding=UTF8"
|
|
|
|
|
SBT_OPTS environment variable, if unset uses "-XX:+CMSClassUnloadingEnabled -XX:MaxPermSize=512m -Xmx2g -Xss2m"
|
2011-08-25 23:55:22 +02:00
|
|
|
.sbtopts if this file exists in the sbt root, it is prepended to the runner args
|
|
|
|
|
-Dkey=val pass -Dkey=val directly to the java runtime
|
|
|
|
|
-J-X pass option -X directly to the java runtime (-J is stripped)
|
2011-08-14 20:04:39 +02:00
|
|
|
|
2011-08-25 18:34:14 +02:00
|
|
|
In the case of duplicated or conflicting options, the order above
|
|
|
|
|
shows precedence: JAVA_OPTS lowest, command line options highest.
|