Set up a Play 2.0 app with IDEA and SBT

Play 2.0 uses SBT. However, to create a module for a new project, it provides its own SBT action idea. You must create an IDEA project yourself and add a module to it. Good.

It's not bad that Play 2.0 is used from its source directory when unpacking, and there is a subdirectory repository/that is actually an ivy repository, separate from yours ~/.ivy2.

How do you configure the SBT build for the application? In imported libraries, IDEA cannot recognize the Scala compiler.

Playback sources are not in repository/. When I do publish-localbuild Play 2.0 from git, it lays the jar, currently on 2.0-RC3-SNAPSHOT, there, but not on the sources. Performing an SBT action package-srccreates the original jar, but seems to remain in place. Attaching it from IDEA still does not show the source FakeRequest.

Would it be preferable to rely on gen-ideathe SBT instead idea?

+5
source share
3 answers

Since the game was released in the final, the team of ideas was significantly improved.

You can also call him

idea with-sources

And he will download all the documents and sources and configure them correctly.

You can also connect to the playback debugger by launching the game with

Play debug

9999

+1

, :

play idea with-sources = yes

+5

idea with-sourcesUnfortunately, it doesn’t work with Play 2.0.1 :

$ idea with-sources
[error] Expected end of input.
[error] idea with-sources
[error]     ^

I am using the following workaround:

+2
source

All Articles