読者です 読者をやめる 読者になる 読者になる

Mac OSX Emacs で、Scala -- sbtを使う (1)

まずは、使ってみる。

ディレクトリを作った後、sbtを動かす。

MBA-0020:hello guutara$ pwd
/Users/guutara/scala-proj/hello
MBA-0020:hello guutara$ sbt
Project does not exist, create new project? (y/N/s) y
Name: sample
Organization: guutara
Version [1.0]: 
Scala version [2.8.1]: 
sbt version [0.7.5]: 
Getting Scala 2.7.7 ...
downloading http://repo1.maven.org/maven2/org/scala-lang/scala-compiler/2.7.7/scala-compiler-2.7.7.jar ...
	[SUCCESSFUL ] org.scala-lang#scala-compiler;2.7.7!scala-compiler.jar (17482ms)
downloading http://repo1.maven.org/maven2/org/scala-lang/scala-library/2.7.7/scala-library-2.7.7.jar ...
	[SUCCESSFUL ] org.scala-lang#scala-library;2.7.7!scala-library.jar (5625ms)
:: retrieving :: org.scala-tools.sbt#boot-scala
	confs: [default]
	2 artifacts copied, 0 already retrieved (9911kB/151ms)
Getting org.scala-tools.sbt sbt_2.7.7 0.7.5 ...
downloading http://databinder.net/repo/org.scala-tools.sbt/sbt_2.7.7/0.7.5/jars/sbt_2.7.7.jar ...
	[SUCCESSFUL ] org.scala-tools.sbt#sbt_2.7.7;0.7.5!sbt_2.7.7.jar (4788ms)
downloading http://repo1.maven.org/maven2/org/scala-tools/testing/test-interface/0.5/test-interface-0.5.jar ...
	[SUCCESSFUL ] org.scala-tools.testing#test-interface;0.5!test-interface.jar (644ms)
downloading http://repo1.maven.org/maven2/org/apache/ivy/ivy/2.2.0/ivy-2.2.0.jar ...
	[SUCCESSFUL ] org.apache.ivy#ivy;2.2.0!ivy.jar (2907ms)
downloading http://repo1.maven.org/maven2/com/jcraft/jsch/0.1.31/jsch-0.1.31.jar ...
	[SUCCESSFUL ] com.jcraft#jsch;0.1.31!jsch.jar (1507ms)
downloading http://databinder.net/repo/org.scala-tools.sbt/launcher-interface/0.7.5/jars/launcher-interface.jar ...
	[SUCCESSFUL ] org.scala-tools.sbt#launcher-interface;0.7.5!launcher-interface.jar (360ms)
downloading http://databinder.net/repo/org.scala-tools.sbt/compile_2.7.7/0.7.5/jars/compile_2.7.7.jar ...
	[SUCCESSFUL ] org.scala-tools.sbt#compile_2.7.7;0.7.5!compile_2.7.7.jar (721ms)
downloading http://databinder.net/repo/org.scala-tools.sbt/interface/0.7.5/jars/interface.jar ...
	[SUCCESSFUL ] org.scala-tools.sbt#interface;0.7.5!interface.jar (548ms)
downloading http://databinder.net/repo/org.scala-tools.sbt/ivy_2.7.7/0.7.5/jars/ivy_2.7.7.jar ...
	[SUCCESSFUL ] org.scala-tools.sbt#ivy_2.7.7;0.7.5!ivy_2.7.7.jar (1294ms)
downloading http://databinder.net/repo/org.scala-tools.sbt/io_2.7.7/0.7.5/jars/io_2.7.7.jar ...
	[SUCCESSFUL ] org.scala-tools.sbt#io_2.7.7;0.7.5!io_2.7.7.jar (911ms)
downloading http://databinder.net/repo/org.scala-tools.sbt/classpath_2.7.7/0.7.5/jars/classpath_2.7.7.jar ...
	[SUCCESSFUL ] org.scala-tools.sbt#classpath_2.7.7;0.7.5!classpath_2.7.7.jar (368ms)
downloading http://databinder.net/repo/org.scala-tools.sbt/compiler-interface/0.7.5/jars/compiler-interface-src.jar ...
	[SUCCESSFUL ] org.scala-tools.sbt#compiler-interface;0.7.5!compiler-interface-src.jar (368ms)
downloading http://databinder.net/repo/org.scala-tools.sbt/compiler-interface/0.7.5/jars/compiler-interface-bin.jar ...
	[SUCCESSFUL ] org.scala-tools.sbt#compiler-interface;0.7.5!compiler-interface-bin.jar (735ms)
downloading http://databinder.net/repo/org.scala-tools.sbt/control_2.7.7/0.7.5/jars/control_2.7.7.jar ...
	[SUCCESSFUL ] org.scala-tools.sbt#control_2.7.7;0.7.5!control_2.7.7.jar (368ms)
downloading http://repo1.maven.org/maven2/jline/jline/0.9.94/jline-0.9.94.jar ...
	[SUCCESSFUL ] jline#jline;0.9.94!jline.jar (1363ms)
downloading http://databinder.net/repo/org.scala-tools.sbt/precompiled-2.8.1_2.8.1/0.7.5/jars/compiler-interface-bin.jar ...
	[SUCCESSFUL ] org.scala-tools.sbt#precompiled-2.8.1_2.8.1;0.7.5!compiler-interface-bin.jar (1426ms)
downloading http://databinder.net/repo/org.scala-tools.sbt/precompiled-2.8.0_2.8.0/0.7.5/jars/compiler-interface-bin.jar ...
	[SUCCESSFUL ] org.scala-tools.sbt#precompiled-2.8.0_2.8.0;0.7.5!compiler-interface-bin.jar (755ms)
:: retrieving :: org.scala-tools.sbt#boot-app
	confs: [default]
	16 artifacts copied, 0 already retrieved (4271kB/239ms)
[success] Successfully initialized directory structure.
Getting Scala 2.8.1 ...
downloading http://repo1.maven.org/maven2/org/scala-lang/scala-compiler/2.8.1/scala-compiler-2.8.1.jar ...
	[SUCCESSFUL ] org.scala-lang#scala-compiler;2.8.1!scala-compiler.jar (17810ms)
downloading http://repo1.maven.org/maven2/org/scala-lang/scala-library/2.8.1/scala-library-2.8.1.jar ...
	[SUCCESSFUL ] org.scala-lang#scala-library;2.8.1!scala-library.jar (17438ms)
:: retrieving :: org.scala-tools.sbt#boot-scala
	confs: [default]
	2 artifacts copied, 0 already retrieved (15118kB/198ms)
[info] Building project sample 1.0 against Scala 2.8.1
[info]    using sbt.DefaultProject with sbt 0.7.5 and Scala 2.7.7

Download した、ファイルは、~/.ivy2は以下に、格納される。
ここで、キャッシュされると、まずいケースもあるかも。。。

2.8.1が、指定されているか、確認。

MBA-0020:hello guutara$ cat project/build.properties 
#Project properties
#Mon Apr 25 19:28:22 JST 2011
project.organization=guutara
project.name=sample
sbt.version=0.7.5
project.version=1.0
build.scala.versions=2.8.1
project.initialize=false