Tuesday, October 22, 2013

Updating existing Playframework project from 2.1 to 2.2

It is very trivial but got few minutes wasted for not reading the play migration documentation...

I had my old project in 2.1 and wanted to updated to newer version 2.2.0.

So here I am after downloading latest version of Playframework. Subsequent to downloading, I updated the class path to latest version and changed the version in my plugins.sbt file. Dreaming it will work :(.

First Error
unresolved dependency: play#sbt-plugin;2.2.0: not found

Simple enough to understand that some plugin name has been changes. Previous plugin name was play but now it's com.typesafe.play. Hence the new line looks something like below.

// Use the Play sbt plugin for Play projects
addSbtPlugin("com.typesafe.play" % "sbt-plugin" % "2.2.0")

After updating this I was confident that I will be able to work on my project now but NOPE... Same old exception. After a while realized that new version of Play comes with new SBT version. So had to update build.properties file to 0.13.0

Update line in build.properties file

This time I was super confident that I will feel the taste of success but same error greeted me with smile. I had to come out of play prompt and did "play clean-all" and then started the play console again. 

BOOM!! Could compile it with new version..


No comments:

Post a Comment