seratch's weblog in Japanese

About Scala, Java and Ruby programming in Japaense. If you need English information, go to http://blog.seratch.net/

conscript で入れた sbt が動かない問題の回避

まずお読みください

conscript 0.3.4 (この記事時点での最新)までの問題で、次のリリース以降では修正済であることがわかりました。

回避方法

cs harrah/xsbt --branch v0.11.2

上記のようにして cs で入れた sbt を起動すると

Error during sbt execution: Invalid section(s): organization

とだけエラーメッセージが出てポカーンってなるわけですが、launchconfig の設定読み込みでおかしくなってるだけなので ~/bin/sbt を以下のように書き換えると、とりあえず回避できます。

#!/bin/sh
#java $CONSCRIPT_OPTS -Xmx1G -jar /home/seratch/.conscript/sbt-launch.jar @/home/seratch/.conscript/harrah/xsbt/sbt/launchconfig "$@"
java $CONSCRIPT_OPTS -Xmx1G -jar /home/seratch/.conscript/sbt-launch.jar "$@"

もし既知の情報などあれば、ぜひお教えください。

(追記)

リアクションありがとうございます。

http://d.hatena.ne.jp/xuwei/20120406/1333697916

~/bin/sbt を書き換えるのではなく ~/.conscript/harrah/xsbt/sbt/launchconfig の

[repositories]
  local
[organization]
  maven-central

となっている箇所が問題なので

[repositories]
  local
  typesafe-ivy-releases: http://repo.typesafe.com/typesafe/ivy-releases/, [organization]/[module]/[revision]/[type]s/[artifact](-[classifier]).[ext]
  maven-central

と書き換えれば回避できるようですが、こんなことしなくてすむように issue 登録するか pull request しないと、ですね。。

(さらに追記)

次のリリースでは直っているようです。@sett4 △!

https://twitter.com/#!/sett4/status/188173707179606016
https://github.com/n8han/conscript/commit/b8a93d74effb2bd589e79b3ec4836fe5c3fc9454