moritetuのIT関連技術メモ

sbteclipse

sbteclipseを使うと、ScalaプロジェクトをEclipseプロジェクトにインポートできる。
Eclipseのプロジェクトメタファイルを生成してくれる。

アカウント単位で有効にする。

$ mkdir -p ~/.sbt/<version>/plugins
$ cat <<EOF > plugins.sbt
addSbtPlugin("com.typesafe.sbteclipse" % "sbteclipse-plugin" % "5.2.4")
EOF
$ sbt new scala/scala-seed.g8 --name=myproject
$ (cd myproject && sbt "eclipse with-source=true")

プロジェクト固有で有効にする。

$ sbt new scala/scala-seed.g8 --name=myproject
$ cat <<EOF > myproject/project/plugins.sbt
addSbtPlugin("com.typesafe.sbteclipse" % "sbteclipse-plugin" % "5.2.4")
EOF
$ (cd myproject && sbt "eclipse with-source=true")

後は、Eclipseのメニューから、「ファイル>インポート」で対象ディレクトリを選択すれば良い。

参考リンク


トップ   差分 バックアップ リロード   一覧 単語検索 最終更新   ヘルプ   最終更新のRSS
目次
ダブルクリックで閉じるTOP | 閉じる
GO TO TOP