Joerg Viola

Lean. Web. Development.

Upgrading to Play 2.0.1

Play 2.0.1 is here! Learn how to upgrade and what to gain.

What to gain

Here is the announcement.

For me, the following enhancements are important:

  • EBean enhancement seems to be fixed - no enhancement errors until now.
  • more efficient sbt dependency check - the number of files that are compiled after a change seems to have been reduced. That improves turn-around speed a lot.

How to upgrade

  1. Download Play 2.0.1
  2. Unzip and move to $SOMEDIR/play-2.0.1
  3. Add to $PATH: $SOMEDIR/play-2.0.1, removing your play-2.0-setting
  4. Update project/plugins.sbt to include

     addSbtPlugin("play" % "sbt-plugin" % "2.0.1")
    
  5. If you had tweaked your Build.scala to path the ebean enhancement, reset it to something like the following:

     import sbt._
     import Keys._
     import PlayProject._
    
     object ApplicationBuild extends Build {
    
         val appName         = "66and33-web"
         val appVersion      = "1.0-SNAPSHOT"
    
         val appDependencies = Seq(
           "postgresql" % "postgresql" % "8.4-702.jdbc4"
         )
         val main = PlayProject(appName, appVersion, appDependencies, mainLang = JAVA).settings(
                 templatesImport += "util._"
         )
    
     }
    
  6. run play eclipsify

  7. as in 2.0, tweak the generated project by
    1. removing the output folders on the source folders ./app and ./test. The effectively tells eclipse to compile into ./bin which does not interfere with the sbt compilation
    2. add target/scala-2.9.1/classes to your build path. This allows access e.g. to the ReverseControllers

Comments