[2.0] gen-idea, IntelliJ and library sources

275 views
Skip to first unread message

Graham Tackley

unread,
Nov 28, 2011, 9:36:56 AM11/28/11
to play-fr...@googlegroups.com
I already extensively use sbt for building scala projects, and have sbt-idea set up in my ~/.sbt/plugins/build.sbt:

  resolvers += "sbt-idea-repo" at "http://mpeltonen.github.com/maven/"

  addSbtPlugin("com.github.mpeltonen" % "sbt-idea" % "0.11.0")

One of the great things about sbt-idea is that it automatically downloads sources and javadoc for any libraries included. I'm using the binary download for play 2.0 beta and it almost all just works: the gen-idea command is available, and it does build the intellij project. However it can't find the sources:

$ ~/tools/play-2.0-beta/play
...
[news-demo] $ gen-idea
[info] Trying to create an Idea module news-demo
[warn] [NOT FOUND  ] org.scala-lang#scala-library;2.9.1!scala-library.jar(doc) (1ms)
[warn] ==== local: tried
[warn]   /home/graham/tools/play-2.0-beta/framework/../repository/local/org.scala-lang/scala-library/2.9.1/docs/scala-library-javadoc.jar
[warn] [NOT FOUND  ] org.scala-lang#scala-library;2.9.1!scala-library.jar(src) (0ms)
[warn] ==== local: tried
[warn]   /home/graham/tools/play-2.0-beta/framework/../repository/local/org.scala-lang/scala-library/2.9.1/srcs/scala-library-sources.jar
[warn] [NOT FOUND  ] play#play_2.9.1;2.0-beta!play_2.9.1.jar(src) (1ms)
[warn] ==== local: tried
[warn]   /home/graham/tools/play-2.0-beta/framework/../repository/local/play/play_2.9.1/2.0-beta/srcs/play_2.9.1-sources.jar
[warn] [NOT FOUND  ] play#play_2.9.1;2.0-beta!play_2.9.1.jar(doc) (0ms)
[
...

Presumably because dependencies are resolved from the local repository provided rather than a central repository. I can't see where this magic happens, but especially while in beta I really want the play sources set up in intelliJ. 

Is there an easy way to make this work?  I can set them up manually, of course, but this is a pain to do every time I re-generate the IntelliJ project file.

Thanks,
g

Julien Richard-Foy

unread,
Nov 28, 2011, 10:19:38 AM11/28/11
to play-fr...@googlegroups.com
What happen if you run the sbt `update` command before running `gen-idea`?

Graham Tackley

unread,
Nov 28, 2011, 10:39:22 AM11/28/11
to play-fr...@googlegroups.com
Same behaviour: the sbt-idea finds the actual jars (from where I've installed the play binary distribution -  /home/graham/tools/play-2.0-beta/framework/../repository/local) but cannot find the sources or javadoc.
Reply all
Reply to author
Forward
0 new messages