How can I create a new project which compiles in IntelliJ Idea?

603 views
Skip to first unread message

Louise Elmose Hedegaard

unread,
Mar 10, 2016, 4:39:55 AM3/10/16
to play-framework
Hi,

I want to create a new Play framework project which is able to compile in IntelliJ idea (community edition 15).

I tried following the instructions described on the Play framework homepage:
but without any luck:

a) Creating project with the activator command (activator version 1.3.7).
NB: The Play framework page says "play", but I guess it should be "activator" instead?

I execute the following:
1) activator new myFirstApp
2) 3 (minimal-java)
3) cd myFirstApp
4) activator idea

I get the following error:
[error] Not a valid command: idea (similar: eval, alias)
[error] Not a valid project ID: idea
[error] Expected ':' (if selecting a configuration)
[error] Not a valid key: idea (similar: clean)
[error] idea
[error]     ^

If I open the project in idea, all references to play packages are not recognized by idea ("play" is red in the package reference).

b) Create project via sbt

1) I follow the directions described on the Play framework page - when I execute "sbt" I get an error: 
play#sbt-plugin;2.5.0: not found

Does anybody have a simple description of how I can create a new Play framework project which can compile in IntelliJ Idea?

Thanks,
-Louise

azwar akbar

unread,
Mar 10, 2016, 4:59:44 AM3/10/16
to play-fr...@googlegroups.com
Hi Louise,

Have you try to type idea after entering activator?
1) type "activator" enter
2) type "idea" enter

May it help.
Thanks.

--
You received this message because you are subscribed to the Google Groups "play-framework" group.
To unsubscribe from this group and stop receiving emails from it, send an email to play-framewor...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/play-framework/d7fa992e-95bb-48a0-a044-52cfdda59ffa%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--


Best regards,
Azwar Akbar


Steve Chaloner

unread,
Mar 10, 2016, 4:59:56 AM3/10/16
to play-framework
You can find the correct instructions here:

If the dependencies aren't resolved, open the sbt tool tab in IntelliJ and click on the refresh button.

Regards,
Steve

Steve Chaloner

unread,
Mar 10, 2016, 5:00:50 AM3/10/16
to play-framework

Igmar Palsenberg

unread,
Mar 10, 2016, 12:37:27 PM3/10/16
to play-framework
 
I execute the following:
1) activator new myFirstApp
2) 3 (minimal-java)
3) cd myFirstApp
4) activator idea

Install the Scala plugin, and import the newly create Play project as an existing SBT project.


Igmar

Louise Elmose Hedegaard

unread,
Mar 11, 2016, 10:38:02 AM3/11/16
to play-framework
Hi Azwar,

Thank you for your answer.
Unfortunately it did not help - I get the same result while executing "activator idea" or "activator" + enter, and then idea + enter.

-Louise

Louise Elmose Hedegaard

unread,
Mar 11, 2016, 11:58:17 AM3/11/16
to play-framework
Hi Steve,

Thank you for your answers, but unfortunately none of the described steps help - "play" is still red in the package import in e.g. the controllers.
Any other suggestions are appreciated.

-Louise

Louise Elmose Hedegaard

unread,
Mar 11, 2016, 12:00:20 PM3/11/16
to play-framework
Hi Igmar,

Thank you for your answer.
I already had the Scala plugin installed, and following your description still does not enable me to get dependencies resolved in Idea.
The only thing that works is if I use the websocket example from the Play framework homepage, and add my code to that project. So maybe it is the newer versions of the Play framework that does not work with Idea?

-Louise
Reply all
Reply to author
Forward
0 new messages