我正在努力gen-idea
工作。这就是我安装插件sbt
的方式:idea
http://www.scala-sbt.org/release/docs/Getting-Started/Setup.html
我正在遵循手动安装说明:
$ mkdir -p ~/bin
$ cd ~/bin
$ wget http://repo.typesafe.com/typesafe/ivy-releases/org.scala-sbt/sbt-launch/0.13.0/sbt-launch.jar
$ vi sbt
在sbt
文件中,我放置了以下内容:
SBT_OPTS="-Xms512M -Xmx1536M -Xss1M -XX:+CMSClassUnloadingEnabled -XX:MaxPermSize=256M"
java $SBT_OPTS -jar `dirname $0`/sbt-launch.jar "$@"
然后,保存后:
$ chmod u+x ~/bin/sbt
./sbt
$ ./sbt
Getting org.scala-sbt sbt 0.13.0 ...
:: retrieving :: org.scala-sbt#boot-app
confs: [default]
.
.
.
$ ./sbt --version
sbt launcher version 0.13.0
然后我按照以下说明进行操作:
https://github.com/mpeltonen/sbt-idea
$ vi ~/.sbt/plugins/build.sbt
我输入这个内容:
resolvers += "Sonatype snapshots" at "http://oss.sonatype.org/content/repositories/snapshots/"
addSbtPlugin("com.github.mpeltonen" % "sbt-idea" % "1.6.0-SNAPSHOT")
$ cd ~/tmp
$ ~/bin/sbt
~/tmp$ ~/bin/sbt
[warn] The global sbt directory is now versioned and is located at /home/me/.sbt/0.13.
[warn] You are seeing this warning because there is global configuration in /home/me/.sbt but not in /home/me/.sbt/0.13.
[warn] The global sbt directory may be changed via the sbt.global.base system property.
[info] Set current project to tmp (in build file:/home/me/tmp/)
> gen-idea
[error] Not a valid command: gen-idea
[error] Not a valid project ID: gen-idea
[error] Expected ':' (if selecting a configuration)
[error] Not a valid key: gen-idea
[error] gen-idea
[error] ^
如何更正获取“无效密钥:gen-idea”的问题?