---
title: "Configuring Play2War with Play 2.2 and build.sbt"
date: 2014-03-13T20:09:57+00:00
author: "poornerd"
canonical: https://www.poornerd.com/2014/03/13/configuring-play2war-with-play-2-2-and-build-sbt/
source: Raw Markdown twin of the HTML article; content is the original source.
---
[<img class="alignleft size-medium wp-image-433" alt="Screen Shot 2014-03-13 at 21.07.45" src="https://www.poornerd.com/wp-content/uploads/2014/03/Screen-Shot-2014-03-13-at-21.07.45-300x108.png" width="300" height="108" srcset="https://www.poornerd.com/wp-content/uploads/2014/03/Screen-Shot-2014-03-13-at-21.07.45-300x108.png 300w, https://www.poornerd.com/wp-content/uploads/2014/03/Screen-Shot-2014-03-13-at-21.07.45.png 526w" sizes="(max-width: 300px) 100vw, 300px" />](https://www.poornerd.com/wp-content/uploads/2014/03/Screen-Shot-2014-03-13-at-21.07.45.png)I had previously used <a href="https://github.com/dlecan/play2-war-plugin" onclick="javascript:pageTracker._trackPageview('/outbound/article/github.com');" target="_new">Play2War</a> 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&#8217;t immediately apparent how to do it.

  1. Add this to your plugins.sbt: addSbtPlugin(&#8220;com.github.play2war&#8221; % &#8220;play2-war-plugin&#8221; % &#8220;1.2-beta4&#8221;)
  2. Add this to the top of your build.sbt: <pre class="brush: plain; title: ; notranslate" title=""> import com.github.play2war.plugin._</pre>

  3. Add this at the end of your build.sbt: (yes with the line between them, and the servlet Version you need).  <pre class="brush: plain; title: ; notranslate" title="">Play2WarPlugin.play2WarSettings
Play2WarKeys.servletVersion := "2.5"</pre>

  4. Run &#8220;`play war`&#8221; and when it is done, look in the target directory
