2011年9月2日金曜日

SBTを使い始める

とりあえず、sbtを使ってみるということで、インストールログを簡単に。

> curl -O http://simple-build-tool.googlecode.com/files/sbt-launch-0.7.7.jar
※
> wget http://simple-build-tool.googlecode.com/files/sbt-launch-0.7.7.jar
> ln -s sbt-launch-0.7.7.jar sbt-launch.jar
> vi  sbt
> java -Xmx512M -jar `dirname $0`/sbt-launch.jar "$@"
> chmod +x sbt
> ./sbt
kaz@earlgray:~/work/scala/sbt> ./sbt 
Project does not exist, create new project? (y/N/s) y
Name: SampleProject
Organization: ponta
Version [1.0]: 
Scala version [2.9.0]: 
sbt version [0.7.7]: 

ヘルプの内容

ヘルプ 内容
actions Shows all available actions
reload Reloads sbt, picking up modifications to sbt.version or scala.version and recompiling modified project definitions
current Shows the current project, Scala version, and logging level.
trace 'on', 'nosbt', 'off', or <integer> Configures stack trace logging. 'nosbt' prints stack traces up to the first sbt frame. An integer gives the number of frames to show per exception.
project <project name> Sets the currently active project. Use 'project /' to change to the root project or 'project ..' to change to the parent project.
projects Shows all available projects.
exit, quit Terminates the build.
set <property> <value> Sets the value of the property given as its argument.
get <property> Gets the value of the property given as its argument.
console-project Enters the Scala interpreter with the current project definition bound to the variable 'current' and all members imported.
builder Set the current project to be the project definition builder.


以下はプロジェクト作成時のログ


Getting net.java.dev.jna jna 3.2.3 ...
:: retrieving :: org.scala-tools.sbt#boot-app
confs: [default]
1 artifacts copied, 0 already retrieved (838kB/32ms)
Getting Scala 2.7.7 ...
:: retrieving :: org.scala-tools.sbt#boot-scala
confs: [default]
2 artifacts copied, 0 already retrieved (9911kB/54ms)
Getting org.scala-tools.sbt sbt_2.7.7 0.7.7 ...
downloading http://databinder.net/repo/org.scala-tools.sbt/sbt_2.7.7/0.7.7/jars/sbt_2.7.7.jar ...
[SUCCESSFUL ] org.scala-tools.sbt#sbt_2.7.7;0.7.7!sbt_2.7.7.jar (3128ms)
downloading http://databinder.net/repo/org.scala-tools.sbt/launcher-interface/0.7.7/jars/launcher-interface.jar ...
[SUCCESSFUL ] org.scala-tools.sbt#launcher-interface;0.7.7!launcher-interface.jar (336ms)
downloading http://databinder.net/repo/org.scala-tools.sbt/compile_2.7.7/0.7.7/jars/compile_2.7.7.jar ...
[SUCCESSFUL ] org.scala-tools.sbt#compile_2.7.7;0.7.7!compile_2.7.7.jar (342ms)
downloading http://databinder.net/repo/org.scala-tools.sbt/interface/0.7.7/jars/interface.jar ...
[SUCCESSFUL ] org.scala-tools.sbt#interface;0.7.7!interface.jar (341ms)
downloading http://databinder.net/repo/org.scala-tools.sbt/ivy_2.7.7/0.7.7/jars/ivy_2.7.7.jar ...
[SUCCESSFUL ] org.scala-tools.sbt#ivy_2.7.7;0.7.7!ivy_2.7.7.jar (515ms)
downloading http://databinder.net/repo/org.scala-tools.sbt/io_2.7.7/0.7.7/jars/io_2.7.7.jar ...
[SUCCESSFUL ] org.scala-tools.sbt#io_2.7.7;0.7.7!io_2.7.7.jar (352ms)
downloading http://databinder.net/repo/org.scala-tools.sbt/classpath_2.7.7/0.7.7/jars/classpath_2.7.7.jar ...
[SUCCESSFUL ] org.scala-tools.sbt#classpath_2.7.7;0.7.7!classpath_2.7.7.jar (333ms)
downloading http://databinder.net/repo/org.scala-tools.sbt/compiler-interface/0.7.7/jars/compiler-interface-bin.jar ...
[SUCCESSFUL ] org.scala-tools.sbt#compiler-interface;0.7.7!compiler-interface-bin.jar (344ms)
downloading http://databinder.net/repo/org.scala-tools.sbt/compiler-interface/0.7.7/jars/compiler-interface-src.jar ...
[SUCCESSFUL ] org.scala-tools.sbt#compiler-interface;0.7.7!compiler-interface-src.jar (335ms)
downloading http://databinder.net/repo/org.scala-tools.sbt/control_2.7.7/0.7.7/jars/control_2.7.7.jar ...
[SUCCESSFUL ] org.scala-tools.sbt#control_2.7.7;0.7.7!control_2.7.7.jar (336ms)
downloading http://databinder.net/repo/org.scala-tools.sbt/precompiled-2.8.1_2.8.1/0.7.7/jars/compiler-interface-bin.jar ...
[SUCCESSFUL ] org.scala-tools.sbt#precompiled-2.8.1_2.8.1;0.7.7!compiler-interface-bin.jar (344ms)
downloading http://databinder.net/repo/org.scala-tools.sbt/precompiled-2.9.0_2.9.0/0.7.7/jars/compiler-interface-bin.jar ...
[SUCCESSFUL ] org.scala-tools.sbt#precompiled-2.9.0_2.9.0;0.7.7!compiler-interface-bin.jar (346ms)
downloading http://databinder.net/repo/org.scala-tools.sbt/precompiled-2.8.0_2.8.0/0.7.7/jars/compiler-interface-bin.jar ...
[SUCCESSFUL ] org.scala-tools.sbt#precompiled-2.8.0_2.8.0;0.7.7!compiler-interface-bin.jar (345ms)
:: retrieving :: org.scala-tools.sbt#boot-app
confs: [default]
17 artifacts copied, 0 already retrieved (4379kB/58ms)
[success] Successfully initialized directory structure.
Getting Scala 2.9.0 ...
downloading http://repo1.maven.org/maven2/org/scala-lang/scala-compiler/2.9.0/scala-compiler-2.9.0.jar ...
[SUCCESSFUL ] org.scala-lang#scala-compiler;2.9.0!scala-compiler.jar (15211ms)
downloading http://repo1.maven.org/maven2/org/scala-lang/scala-library/2.9.0/scala-library-2.9.0.jar ...
[SUCCESSFUL ] org.scala-lang#scala-library;2.9.0!scala-library.jar (6277ms)
downloading http://repo1.maven.org/maven2/org/scala-lang/jline/2.9.0/jline-2.9.0.jar ...
[SUCCESSFUL ] org.scala-lang#jline;2.9.0!jline.jar (199ms)
downloading http://repo1.maven.org/maven2/org/fusesource/jansi/jansi/1.4/jansi-1.4.jar ...
[SUCCESSFUL ] org.fusesource.jansi#jansi;1.4!jansi.jar (244ms)
:: retrieving :: org.scala-tools.sbt#boot-scala
confs: [default]
4 artifacts copied, 0 already retrieved (20442kB/83ms)
[info] Building project SampleProject 1.0 against Scala 2.9.0
[info]    using sbt.DefaultProject with sbt 0.7.7 and Scala 2.7.7

0 件のコメント:

コメントを投稿