[2.0.2] Importing idea module to IntelliJ

470 views
Skip to first unread message

Ian Downard

unread,
Oct 4, 2012, 12:51:09 PM10/4/12
to play-fr...@googlegroups.com

I'm having problems opening the .iml modules for a new play 2.0.2. project in IntelliJ.  After I run "play idea", I get the following three .iml files:

.idea/IdeaProject.iml
.idea_modules/appui-build.iml   
.idea_modules/appui.iml

If I import the IdeaProject.iml, I don't get any errors, however, the dependencies list is empty.

If I import the appui.iml  into a new IntelliJ project, I get 84 errors that relate to "invalid item in the depencies list".  Here's an example of one of those errors:

Module 'appui': invalid item 'play_play_2.9.1_2.0.2-RC1' in the dependencies list

Here's a screenshot of those errors:


Thanks for any help.

biesior

unread,
Oct 4, 2012, 12:53:57 PM10/4/12
to play-fr...@googlegroups.com
Upgrade your version to 2.0.3 (or better to latest 2.0.4) after that after play idea command all what you will have to do in IntelliJ will be "open project" command.

Ian Downard

unread,
Oct 4, 2012, 1:36:53 PM10/4/12
to play-fr...@googlegroups.com

Thanks for the reply.  I am able to open a new play-2.0.4 project in IntelliJ.

I did have to run the application, exercise it from a web browser, and reopen the project in IntelliJ so the IDE could resolve all my View methods.  For example, initially, IntelliJ couldn't resolve the index.render method on the following line:
    return ok(index.render("Your new application is ready."));

James Roper

unread,
Oct 4, 2012, 7:07:23 PM10/4/12
to play-fr...@googlegroups.com
I did have to run the application, exercise it from a web browser, and reopen the project in IntelliJ so the IDE could resolve all my View methods.  For example, initially, IntelliJ couldn't resolve the index.render method on the following line:
    return ok(index.render("Your new application is ready."));

This is to be expected, Play compiles templates and routes into Scala code and then to bytecode, until that happens, IntelliJ won't be able to resolve the methods.  One way to trigger this to happen, as you discovered, is to hit the app in the browser.  Another way is to run play compile on the command line.
Reply all
Reply to author
Forward
0 new messages