<commit_before># WAR Plugin for Play framework 2.0

    Current version: 0.4

    Project-status: BETA

This project is a module for Play framework 2 to package your apps into standard WAR packages.

Live demo: JBoss7@Cloudbees : http://servlet30.play-war.cloudbees.net/

Other references built with Play 2 and Play2War:
 - [Factile](http://factile.net/) (Survey platform)

## Known limitations
* **Play2War is only compatible with Servlet 3.0 containers** (Tomcat 7, Jetty 8, JBoss 7, ...)
* **Play2War is only compatible with Java 6 JRE** (most of the application servers aren't compatible with too)
* **Your WAR must be deployed at root context** (sub-context deployment will be available with Play 2.1)
* As of version 0.3.1, it is only compatible with Play **2.0.1** (use Play2War 0.3 if you need Play 2.0 compatibility)
 
## What's new ?

See [Changelog](/dlecan/play2-war-plugin/wiki/Changelog).

## Features
<table>
  <tr>
	<th rowspan="2" colspan="2">Feature</th>
    <th rowspan="2">Native Play 2</th>
	<th colspan="2">Servlet engine</th>
  </tr>
  <tr>
	<th>3.0</th>
	<th>2.4/2.5</th>
  </tr>
  <tr>
	<td colspan="2">Available ?</td>
	<td><img src="http://openclipart.org/image/800px/svg_to_png/161503/OK-1.png" height="20"></td>
    <td><img src="http://openclipart.org/image/800px/svg_to_png/161503/OK-1.png" height="20"></td>
    <td>TBD</td>
  </tr>
  <tr>
	<td rowspan="4">HTTP</td>
    <td>Asynchronous request<br/>processing</td>
	<td><img src="http://openclipart.org/image/800px/svg_to_png/161503/OK-1.png" height="20"></td>
	<td><img src="http://openclipart.org/image/800px/svg_to_png/161503/OK-1.png" height="20"></td>
	<td><img src="http://openclipart.org/image/800px/svg_to_png/161515/OK-2.png" height="20"></td>
  </tr>
  <tr>
    <td>GET/POST<br/>HTTP 1.0/1.1</td>
	<td><img src="http://openclipart.org/image/800px/svg_to_png/161503/OK-1.png" height="20"></td>
	<td><img src="http://openclipart.org/image/800px/svg_to_png/161503/OK-1.png" height="20"></td>
	<td>TBD</td>
  </tr>
  <tr>
    <td>Chunked response<br/>For long-polling</td>
	<td><img src="http://openclipart.org/image/800px/svg_to_png/161503/OK-1.png" height="20"></td>
	<td><img src="http://openclipart.org/image/800px/svg_to_png/161503/OK-1.png" height="20"></td>
	<td>TBD</td>
  </tr>
  <tr>
    <td>Web Socket</td>
	<td><img src="http://openclipart.org/image/800px/svg_to_png/161503/OK-1.png" height="20"></td>
	<td><img src="http://openclipart.org/image/800px/svg_to_png/161515/OK-2.png" height="20"></td>
	<td><img src="http://openclipart.org/image/800px/svg_to_png/161515/OK-2.png" height="20"></td>  
  </tr>
  <tr>
	<td rowspan="4">Container</td>
    <td>Data sources</td>
	<td>Built-in<br/>(<a href="http://jolbox.com/">Bone CP</a>)</td>
	<td colspan="2">Built-in (<a href="http://jolbox.com/">Bone CP</a>)<br/>External DS support : TBD</td>
  </tr>
  <tr>
    <td>Root context path
    <br/>Eg: http://local/</td>
	<td><img src="http://openclipart.org/image/800px/svg_to_png/161503/OK-1.png" height="20"></td>
	<td colspan="2"><img src="http://openclipart.org/image/800px/svg_to_png/161503/OK-1.png" title="WAR package must be deployed at root context" height="20"></td>
  </tr>
  <tr>
    <td>Non root context path
    <br/>Eg: http://local/myAppContext</td>
	<td>
        2.0.x : <img src="http://openclipart.org/image/800px/svg_to_png/161515/OK-2.png" height="20" title="Always deployed at root context">
        <br/>2.1.x (alpha) : <img src="http://openclipart.org/image/800px/svg_to_png/161503/OK-1.png" height="20">
    </td>
	<td colspan="2"><img src="http://openclipart.org/image/800px/svg_to_png/161515/OK-2.png" title="WAR package must be deployed at root context" height="20"><br/>TBD for Play 2.1</td>
  </tr>
  <tr>
    <td>WAR customization<br/>(web.xml, ...)</td>
	<td>N/A</td>
	<td>TBD</td>
	<td>TBD</td>  
  </tr>
</table>

## Server compatibility
<table>
  <tr>
	<th>Servlet engine</th>
    <th>Server</th>
	<th>Standalone deployment</th>
	<th>PaaS</th>
  </tr>
  <tr>
	<td rowspan="4">Servlet 3.0</td>
	<td>Tomcat 7</td>
	<td><img src="http://openclipart.org/image/800px/svg_to_png/161503/OK-1.png" height="20"></td>
	<td><img src="http://openclipart.org/image/800px/svg_to_png/161503/OK-1.png" height="20"> 
		<a href="http://play2war.jelastic.dogado.eu/" title="Play 2 WAR demo hosted at Jelastic PaaS provider">Demo</a> @Jelastic
	</td>
  </tr>
  <tr>
	<td>JBoss 7.0</td>
	<td><img src="http://openclipart.org/image/800px/svg_to_png/161503/OK-1.png" height="20"></td>
	<td><img src="http://openclipart.org/image/800px/svg_to_png/161503/OK-1.png" height="20">
		<a href="http://servlet30.play-war.cloudbees.net/" title="Play 2 WAR demo hosted at Cloudbees PaaS provider">Demo</a> @Cloudbees
		<br/><a href="https://github.com/dlecan/play2-war-plugin/wiki/FAQ#jboss7-deployment-at-cloudbees">Need extra configuration</a> when deploying
	</td>
  </tr>
  <tr>
	<td>JBoss 7.1</td>
	<td><img src="http://openclipart.org/image/800px/svg_to_png/161503/OK-1.png" height="20"></td>
	<td>TBD<br/>(Openshift)</td>
  </tr>
  <tr>
	<td>Glassfish 3</td>
	<td>TBD</td>
	<td>TBD<br/>(Jelastic)</td>
  </tr>
  <tr>
	<td rowspan="2">Servlet 2.4/2.5</td>
	<td>Tomcat 6</td>
	<td>TBD</td>
	<td>TBD<br/>(Cloudbees)</td>
  </tr>
  <tr>
	<td>Jetty 6</td>
	<td>TBD</td>
	<td>TBD<br/>(Jelastic)</td>
  </tr>
</table>

The plugin may work on others containers, such as Weblogic or Websphere (not tested yet).

## Usage

In the next descriptions, APP_HOME is the root of your Play 2.0 application you want to package as a WAR file.

### Add play2war plugin

In ``APP_HOME/project/plugins.sbt``, add:

```scala
resolvers += "Play2war plugins release" at "http://repository-play-war.forge.cloudbees.com/release/"

addSbtPlugin("com.github.play2war" % "play2-war-plugin" % "0.4")
```

### Add play2war runtime

In ``APP_HOME/project/Build.scala``, modify ``appDependencies`` and ``main`` values to add:

```scala
val appDependencies = Seq(
  ...
  "com.github.play2war" %% "play2-war-core" % "0.4"
  ...<commit_msg>Improvements<commit_after># WAR Plugin for Play framework 2.0

    Current version: 0.4

    Project-status: BETA

This project is a module for Play framework 2 to package your apps into standard WAR packages.

Live demo: JBoss7@Cloudbees : http://servlet30.play-war.cloudbees.net/

Other references built with Play 2 and Play2War:
 - [Factile](http://factile.net/) (Survey platform)

## Known limitations
* **Play2War is only compatible with Servlet 3.0 containers** (Tomcat 7, Jetty 8, JBoss 7, ...)
* **Play2War is only compatible with Java 6 JRE** (most of the application servers aren't compatible with too)
* **Your WAR must be deployed at root context** (sub-context deployment will be available with Play 2.1)
* As of version 0.3.1, it is only compatible with Play **2.0.1** (use Play2War 0.3 if you need Play 2.0 compatibility)
 
## What's new ?

See [Changelog](/dlecan/play2-war-plugin/wiki/Changelog).

## Features
<table>
  <tr>
	<th rowspan="2" colspan="2">Feature</th>
    <th rowspan="2">Native Play 2</th>
	<th colspan="2">Servlet engine</th>
  </tr>
  <tr>
	<th>3.0</th>
	<th>2.4/2.5</th>
  </tr>
  <tr>
	<td colspan="2">Available ?</td>
	<td><img src="http://openclipart.org/image/800px/svg_to_png/161503/OK-1.png" height="20"></td>
    <td><img src="http://openclipart.org/image/800px/svg_to_png/161503/OK-1.png" height="20"></td>
    <td>TBD</td>
  </tr>
  <tr>
	<td rowspan="4">HTTP</td>
    <td>Asynchronous request<br/>processing</td>
	<td><img src="http://openclipart.org/image/800px/svg_to_png/161503/OK-1.png" height="20"></td>
	<td><img src="http://openclipart.org/image/800px/svg_to_png/161503/OK-1.png" height="20"></td>
	<td><img src="http://openclipart.org/image/800px/svg_to_png/161515/OK-2.png" height="20"></td>
  </tr>
  <tr>
    <td>GET/POST<br/>HTTP 1.0/1.1</td>
	<td><img src="http://openclipart.org/image/800px/svg_to_png/161503/OK-1.png" height="20"></td>
	<td><img src="http://openclipart.org/image/800px/svg_to_png/161503/OK-1.png" height="20"></td>
	<td>TBD</td>
  </tr>
  <tr>
    <td>Chunked response<br/>For long-polling</td>
	<td><img src="http://openclipart.org/image/800px/svg_to_png/161503/OK-1.png" height="20"></td>
	<td><img src="http://openclipart.org/image/800px/svg_to_png/161503/OK-1.png" height="20"></td>
	<td>TBD</td>
  </tr>
  <tr>
    <td>Web Socket</td>
	<td><img src="http://openclipart.org/image/800px/svg_to_png/161503/OK-1.png" height="20"></td>
	<td><img src="http://openclipart.org/image/800px/svg_to_png/161515/OK-2.png" height="20"></td>
	<td><img src="http://openclipart.org/image/800px/svg_to_png/161515/OK-2.png" height="20"></td>  
  </tr>
  <tr>
	<td rowspan="4">Container</td>
    <td>Data sources</td>
	<td>Built-in<br/>(<a href="http://jolbox.com/">Bone CP</a>)</td>
	<td colspan="2">Built-in (<a href="http://jolbox.com/">Bone CP</a>)<br/>External DS support : TBD</td>
  </tr>
  <tr>
    <td>Root context path
    <br/>Eg: http://local/</td>
	<td><img src="http://openclipart.org/image/800px/svg_to_png/161503/OK-1.png" height="20"></td>
	<td colspan="2"><img src="http://openclipart.org/image/800px/svg_to_png/161503/OK-1.png" title="WAR package must be deployed at root context" height="20"></td>
  </tr>
  <tr>
    <td>Non root context path
    <br/>Eg: http://local/myAppContext</td>
	<td>
        2.0.x : <img src="http://openclipart.org/image/800px/svg_to_png/161515/OK-2.png" height="20" title="Always deployed at root context">
        <br/>2.1.x (alpha) : <img src="http://openclipart.org/image/800px/svg_to_png/161503/OK-1.png" height="20">
    </td>
	<td colspan="2"><img src="http://openclipart.org/image/800px/svg_to_png/161515/OK-2.png" title="WAR package must be deployed at root context" height="20"><br/>TBD for Play 2.1</td>
  </tr>
  <tr>
    <td>WAR customization<br/>(web.xml, ...)</td>
	<td>N/A</td>
	<td>TBD</td>
	<td>TBD</td>  
  </tr>
</table>

## Server compatibility
<table>
  <tr>
	<th>Servlet engine</th>
    <th>Server</th>
	<th>Standalone deployment</th>
	<th>PaaS</th>
  </tr>
  <tr>
	<td rowspan="4">Servlet 3.0</td>
	<td>Tomcat 7</td>
	<td><img src="http://openclipart.org/image/800px/svg_to_png/161503/OK-1.png" height="20"></td>
	<td><img src="http://openclipart.org/image/800px/svg_to_png/161503/OK-1.png" height="20"></td>
  </tr>
  <tr>
	<td>JBoss 7.0</td>
	<td><img src="http://openclipart.org/image/800px/svg_to_png/161503/OK-1.png" height="20"></td>
	<td><img src="http://openclipart.org/image/800px/svg_to_png/161503/OK-1.png" height="20">
		<a href="http://servlet30.play-war.cloudbees.net/" title="Play 2 WAR demo hosted at Cloudbees PaaS provider">Demo</a> @Cloudbees
		<br/><a href="https://github.com/dlecan/play2-war-plugin/wiki/FAQ#jboss7-deployment-at-cloudbees">Need extra configuration</a> when deploying
	</td>
  </tr>
  <tr>
	<td>JBoss 7.1</td>
	<td><img src="http://openclipart.org/image/800px/svg_to_png/161503/OK-1.png" height="20"></td>
	<td>TBD<br/>(Openshift)</td>
  </tr>
  <tr>
	<td>Glassfish 3</td>
	<td>TBD</td>
	<td>TBD</td>
  </tr>
  <tr>
	<td rowspan="2">Servlet 2.4/2.5</td>
	<td>Tomcat 6</td>
	<td>TBD</td>
	<td>TBD<br/>(Cloudbees)</td>
  </tr>
  <tr>
	<td>Jetty 6</td>
	<td>TBD</td>
	<td>TBD</td>
  </tr>
</table>

The plugin may work on others containers, such as Weblogic or Websphere (not tested yet).

## Usage

In the next descriptions, APP_HOME is the root of your Play 2.0 application you want to package as a WAR file.

### Add play2war plugin

In ``APP_HOME/project/plugins.sbt``, add:

```scala
resolvers += "Play2war plugins release" at "http://repository-play-war.forge.cloudbees.com/release/"

addSbtPlugin("com.github.play2war" % "play2-war-plugin" % "0.4")
```

### Add play2war runtime

In ``APP_HOME/project/Build.scala``, modify ``appDependencies`` and ``main`` values to add:

```scala
val appDependencies = Seq(
  ...
  "com.github.play2war" %% "play2-war-core" % "0.4"
  ...
{'fraction_non_alphanumeric': 0.21283954783195547, 'fraction_numerical': 0.060401552218660365, 'mean_word_length': 4.046828437633035, 'pattern_counts': {'":': 0, '<': 429, '<?xml version=': 0, '>': 429, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 2}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3645858', 'n_tokens_mistral': 5373, 'n_tokens_neox': 4974, 'n_words': 893}