Skip to content
benmccann edited this page Sep 4, 2012 · 15 revisions

Building Play 2.0 from sources

To benefit from the latest improvements and bug fixes after the initial beta release, you may want to compile Play 2.0 from sources. You’ll need a Git client to fetch the sources.

From the shell, first checkout the Play 2.0 sources:

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

Then go to the Play20/framework directory and launch the build script to enter the sbt build console:

$ cd Play20/framework
$ ./build
> publish-local

Note that you don’t need to install sbt yourself: Play 2.0 embeds its own version (Play 2.0.x uses sbt 0.11.3 and Play 2.1.x uses sbt 0.12.0).

If you want to make changes to the code you can use publish-local to rebuild the framework.

Running tests

You can run basic tests from the sbt console using the test task:

> test

We are also using several Play applications to test the framework. To run this complete test suite, use the runtests script:

$ ./runtests

Creating projects

Creating projects using the Play version you have built from source works much the same as a regular Play application.

export PATH=$PATH:/Play20

If you have an existing Play 2.0 application that you are upgrading from Play 2.0 Beta to edge, please add

resolvers ++= Seq(
  ...
  Resolver.file("Local Repository", file("<projdir>/Play20/repository/local"))(Resolver.ivyStylePatterns),
  ...
)

addSbtPlugin("play" % "sbt-plugin" % "2.1-SNAPSHOT")

to project/plugins.sbt. If you switch from 2.0.x to trunk you must change build.properties to contain sbt.version=0.12.0

Using Code in eclipse.

You can find at Stackoverflow some information how to setup eclipse to work on the code.

Clone this wiki locally