Setting up IntelliJ IDEA IDE to work with a Play2 application?
-
11-12-2019 - |
Question
I want to setup IntelliJ IDEA as my IDE for a Play2 application. According to the documentation there should be an idea command that comes with the play framework. See here http://www.playframework.org/documentation/2.0.3/IDE. I just downloaded, unzipped and setup the play framework and even created a new application but the idea command seems to be missing.
Where is this command? If it's not going to be available then I could use some tips on setting up the environment manually.
I already tried Creating an new project and importing the sources but IntelliJ did not detect any frameworks.
Solution
Maybe you forgot to switch to the application folder.
not working:
$ play new my-app
$ play idea
output:
play! 2.0.3, http://www.playframework.org
This is not a play application!
correct:
$ play new my-app
$ cd my-app
$ play idea
If that does not work, please show what you have typed and what is the output.
IntelliJ IDEA 11 has no native support for play 2.
OTHER TIPS
I follow the steps
- play new myproject
- cd myproject
- play idea
And then following the intellij documentation I tried to import the play module, didnt work
But checking the Play wiki I realize that instead of importing the module into an existing project of iltellij I must open the project and everithing is already in place.
For Play 2.0, I ran into issues with the vanilla play idea
command. Most, if not all associated libraries were malformed in the .iml file.
As a workaround, I used play eclipsify
and used Idea's 'Import from External Source' to create a proper idea project with all the dependencies. Worked like a charm.
You can also try using:
play idea with-sources=yes
Works for me.