technologist, entrepreneur, vision­ary, programmer

Configuring Play2War with Play 2.2 and build.sbt


Screen Shot 2014-03-13 at 21.07.45I had previously used Play2War with Play 2 projects that contained a Build.scala file following the configuration directions from Play2War. However, when attempting to configure a newer project which now uses a build.sbt instead of the Build.scala, It wasn’t immediately apparent how to do it.

  1. Add this to your plugins.sbt: addSbtPlugin(“com.github.play2war” % “play2-war-plugin” % “1.2-beta4”)
  2. Add this to the top of your build.sbt:
     import com.github.play2war.plugin._
  3. Add this at the end of your build.sbt: (yes with the line between them, and the servlet Version you need). 
    Play2WarKeys.servletVersion := "2.5"
  4. Run “play war” and when it is done, look in the target directory
If you have read this far, you may as well follow me on Twitter:

Author: poornerd

Tech­nol­o­gist, Entre­pre­neur, Vision­ary, Pro­gram­mer :: Grad­u­ated from USC (Uni­ver­sity of South­ern Cal­i­for­nia) with a degree in Com­puter Sci­ence. After 10+ years of free­lance con­sult­ing and pro­gram­ming, he co-founded Site­Force AG eBusi­ness Solu­tions in 1999 in Munich (München), Ger­many.

Leave a Reply

Required fields are marked *.