play 2.0 beta - IntelliJ IDEA configuration (Java)

618 views
Skip to first unread message

Dominik Dorn

unread,
Nov 16, 2011, 9:38:18 AM11/16/11
to play-fr...@googlegroups.com
Hi,

Ive just tried to get the new PlayFramework 2.0 java zentasks app
running in my IDE (IntelliJ Idea),
and finally managed to get it running.
This is a guide on how you'll have to configure your IntelliJ IDEA
project to get running with it.

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
(play_00.png)

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

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"
(play_01.png) and click next until the window disappears.

next, open up the module settings and configure it like play_02.png
Source folders:
$APP/app

then add a new library (play_03.png) 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 screenshot play_04.png
( $APP/target/scala-2.9.1/classes )


voila, you can now develop with play 2.0 in your favorite IDEa ;)


I hope this helps some of you!

Dominik

--
Dominik Dorn
http://dominikdorn.com
http://twitter.com/domdorn

Skripten, Mitschriften, Lernunterlagen, etc. findest Du auf
http://www.studyguru.eu !

play_00.png
play_01.png
play_02.png
play_03.png
play_04.png

Guillaume Bort

unread,
Nov 16, 2011, 9:50:15 AM11/16/11
to play-fr...@googlegroups.com
Thank you for that Dominik.

Also for any idea it useful to add the
target/scala-2.9.1/classes-managed to the classpath as well. It
contains all generated classes like the reverse routing and the
templates.

> --
> You received this message because you are subscribed to the Google Groups "play-framework" group.
> To post to this group, send email to play-fr...@googlegroups.com.
> To unsubscribe from this group, send email to play-framewor...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/play-framework?hl=en.
>
>

--
Guillaume Bort

Francisco Canedo

unread,
Nov 16, 2011, 9:54:26 AM11/16/11
to play-fr...@googlegroups.com
On Wed, Nov 16, 2011 at 03:38:18PM +0100, Dominik Dorn wrote:
> Hi,
>
> Ive just tried to get the new PlayFramework 2.0 java zentasks app
> running in my IDE (IntelliJ Idea),
> and finally managed to get it running.
> This is a guide on how you'll have to configure your IntelliJ IDEA
> project to get running with it.
>
> So this is what you'll have to do to get a play 2.0 beta JAVA app running.

> I hope this helps some of you!

I highly recommend using the sbt-idea plugin:
https://github.com/mpeltonen/sbt-idea

See also:
http://groups.google.com/group/play-framework/msg/35ebec0ea26d66bb?hl=en

Regards,

--
Francisco Canedo

-----

"There are, it has been said, two types of people in the world. There
are those who, when presented with a glass that is exactly half full,
say: this glass is half full. And then there are those who say: this
glass is half empty.
The world belongs, however, to those who can look at the glass and
say: 'What's up with this glass? Excuse me? Excuse me? This is my
glass? I don't think so. My glass was full! And it was a bigger glass!"

Terry Pratchett, The Truth

Reply all
Reply to author
Forward
0 new messages