Dominik has posted 1 posts at DZone. View Full User Profile

Configuring IntelliJ IDEA for PlayFramework 2.0 Beta

11.16.2011
| 8740 views |
  • submit to reddit

So this is what you'll have to do to get a play 2.0 beta JAVA app running.


Create a new project using play new sampleTest

Play 2.0 Beta PlayFramework folder structure

in this example, it would be
$APP=/home/domdorn/work/play/



and I have play 2.0 beta installed in

$PLAY=/home/domdorn/work/playframework/play-2.0-beta

In IDEA, create a new project and select "Create Java Project from
existing sources"
Create a new Play 2.0 Project
  and click next until the window disappears.

next, open up the module settings and configure it like here
Configure the Module of your Playframework 2.0 Application Source folders:
$APP/app

then add a new library  Configure the PlayFramework dependency
with the following paths

JAR-Directories
$PLAY/framework/sbt/boot/scala-2.9.1/play/play/2.0-beta/
$PLAY/framework/sbt/boot/scala-2.9.1/lib/

Source-Folders:
$PLAY/framework/play/src/main/java/


For the module

then add another dependency (single entry library)
(you might have to compile your play app first using play compile)
and configure it like in this screenshotConfigure the local generated classses as dependencies
- $APP/target/scala-2.9.1/classes
- $APP/target/scala-2.9.1/classes-managed  voila, you can now develop with play 2.0 in your favorite IDEa ;)


I hope this helps some of you! p.s.: on the Play Framework Mailing list, Francisco Canedo mentioned to instead of manually configuring IDEA you should integrate with the IDEA SBT Plugin. See this thread for further information.   
Published at DZone with permission of its author, Dominik Dorn.

(Note: Opinions expressed in this article and its replies are the opinions of their respective authors and not those of DZone, Inc.)

Comments

George Pligor replied on Wed, 2012/09/12 - 11:57pm

Shouldn't this article be removed since it is outdated? From version 2.02 of Play Framework things got much easier and we thank whoever worked on this. All you need to do now is execute "play idea" and you are ready

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.