Thursday, June 28, 2012

Upgrade from Play 2.0.1 to 2.0.2

Say you have a project in Play 2.0.1, but guess what? There is a new (minor) version out there that might just fix a bug you care about. How do you go about upgrading?
Well, first you need to download the new Play 2.0.2 framework and replace the old one. Then, you need to edit a couple files in  your project in order to make it compatible:

  • edit [appName]/project/build.properties and change sbt version from 0.11.2 to 0.11.3. Like this:
    sbt.version=0.11.3
  • edit [appName]/project/plugins.sbt and change the version of play from 2.0.1 to 2.0.2. Like this:
    addSbtPlugin("play" % "sbt-plugin" % "2.0.2")
That's it! Now launch play again and you should see that it updates a bunch of libraries and then its' ready.
Additionally if you are using Eclipse IDE, you might need to re-eclipsify your app in order to fix the Eclipse project classpath to point to the new 2.0.2 directory.