Thursday, January 5, 2012

Build Play20 with latest sources, and let's play.

All the steps to run your first play 2 web application using latest play improvements; until the first stable release will be ready. The idea here is to build yourself Play. Eclipsify is now taken into account, so once all the steps described here are done, you can import it into eclipse IDE.
$ cd ~/workdir

$ git clone https://github.com/playframework/Play20.git

$ cd Play20/framework

$ ./build
> build-repository
> exit

$ export PATH=$PATH~/workdir/Play20

$ cd ~/workdir

$ play new firstapp

Getting play console_2.9.1 2.0-RC1-SNAPSHOT ...
:: retrieving :: org.scala-tools.sbt#boot-app
 confs: [default]
 5 artifacts copied, 0 already retrieved (5161kB/19ms)
       _            _ 
 _ __ | | __ _ _  _| |
| '_ \| |/ _' | || |_|
|  __/|_|\____|\__ (_)
|_|            |__/ 
             
play! 2.0-RC1-SNAPSHOT, http://www.playframework.org

The new application will be created in /home/dcr/experiments/firstapp

What is the application name? 
> firstapp

Which template do you want to use for this new application? 

  1 - Create a simple Scala application
  2 - Create a simple Java application
  3 - Create an empty project

> 1

OK, application firstapp is created.

Have fun!

$ cd firstapp

$ play 
> eclipsify
> run
--- (Running the application from SBT, auto-reloading is enabled) ---

[info] play - Listening for HTTP on port 9000...

(Server started, use Ctrl+D to stop and go back to the console...)

Now everything is ready, to test and modify the simple scala project application using eclipse. More information can be found on : play20 and scala ide 20 tutorial.

No comments:

Post a Comment