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

Scalatron インストールログ(未完)

ビルドツール sbt をインストール

$ wget http://typesafe.artifactoryonline.com/typesafe/ivy-releases/org.scala-sbt/sbt-launch/0.11.3-2/sbt-launch.jar
$ cat ~/bin/sbt >
java -Xms512M -Xmx1536M -Xss1M -XX:+CMSClassUnloadingEnabled -XX:MaxPermSize=384M -jar `dirname $0`/sbt-launch.jar "$@"
$ chmod +x ~/bin/sbt

scalatron をビルド

$ git clone git://github.com/scalatron/scalatron.git
$ cd scalatron
$ sbt

ハマった.
どうやら sbt-assembly とかいうのが無いらしい.
どこに書いてあるかわからんけど sbt 拡張子のファイル見ていけばいいかな?
projects/plugins.sbt あった.

ページを見てみる
https://github.com/sbt/sbt-assembly

下記のように変更したらビルド通ったっぽい.

diff --git a/project/plugins.sbt b/project/plugins.sbt
index e5ad360..46c61d5 100644
--- a/project/plugins.sbt
+++ b/project/plugins.sbt
@@ -1,6 +1,6 @@
 resolvers += Resolver.url(
-  "sbt-plugin-releases", 
-  new URL("http://scalasbt.artifactoryonline.com/scalasbt/sbt-plugin-releases/")
+  "artifactory",
+  url("http://scalasbt.artifactoryonline.com/scalasbt/sbt-plugin-releases")
 )(Resolver.ivyStylePatterns)
 
-addSbtPlugin("com.eed3si9n" % "sbt-assembly" % "0.8.0")
\ No newline at end of file
+addSbtPlugin("com.eed3si9n" % "sbt-assembly" % "0.8.3")

前バージョン残ってないの?

ビルド続き

$ sbt
> compile
...
[warn]  module not found: com.typesafe.akka#akka-actor;2.0
[warn] ==== local: tried
[warn]   /path/to/home/.ivy2/local/com.typesafe.akka/akka-actor/2.0/ivys/ivy.xml
[warn] ==== public: tried
[warn]   http://repo1.maven.org/maven2/com/typesafe/akka/akka-actor/2.0/akka-actor-2.0.pom
[warn]  ::::::::::::::::::::::::::::::::::::::::::::::
[warn]  ::          UNRESOLVED DEPENDENCIES         ::
[warn]  ::::::::::::::::::::::::::::::::::::::::::::::
[warn]  :: com.typesafe.akka#akka-actor;2.0: not found
[warn]  ::::::::::::::::::::::::::::::::::::::::::::::
[error] {file:/path/to/scalatron/}ScalatronCore/*:update: sbt.ResolveException: unresolved dependency: com.typesafe.akka#akka-actor;2.0: not found

うーん?
ドキュメント見てみる.
http://doc.akka.io/docs/akka/2.0/intro/getting-started.html

name := "My Project"
     
    version := "1.0"
     
    scalaVersion := "2.9.1"
     
    resolvers += "Typesafe Repository" at "http://repo.typesafe.com/typesafe/releases/"
     
    libraryDependencies += "com.typesafe.akka" % "akka-actor" % "2.0"

うーんちゃんと定義されてるっぽい.

project/build.scala

 32     lazy val core = Project("ScalatronCore", file("ScalatronCore"),
 33         settings = standardSettings ++ Seq(
 34             libraryDependencies ++= Seq(
 35                 "com.typesafe.akka" % "akka-actor" % "2.0"
 36             )
 37         ) ++ Seq (
 38             jarName in assembly := "ScalatronCore.jar" // , logLevel in assembly := Level.Debug
 39         )
 40     )
...
 68             resolvers += "Typesafe Repository" at "http://repo.typesafe.com/typesafe/releases/",

時間切れ.Scalaわからんので気が向いたらまた続きやる.