<commit_before>[![Build Status](https://travis-ci.org/earldouglas/xsbt-web-plugin.png?branch=master)](https://travis-ci.org/earldouglas/xsbt-web-plugin)
[![Codacy Badge](https://www.codacy.com/project/badge/29fa98e63b3842d9adc221d3edd67089)](https://www.codacy.com)

**Note: this is the readme for version 1.0 and newer.  For older versions, see the [0.9 branch](https://github.com/earldouglas/xsbt-web-plugin/tree/0.9).**

## About

xsbt-web-plugin is an [sbt](http://www.scala-sbt.org/) extension for building enterprise Web applications based on the [Java J2EE Servlet specification](http://en.wikipedia.org/wiki/Java_Servlet).

xsbt-web-plugin supports both Scala and Java, and is best suited for projects that:

* Deploy to common cloud platforms (e.g. [Google App Engine](https://developers.google.com/appengine/), [Heroku](https://www.heroku.com/), [Elastic Beanstalk](https://console.aws.amazon.com/elasticbeanstalk/home), [Jelastic](http://jelastic.com/))
* Deploy to production J2EE environments (e.g. Tomcat, Jetty, GlassFish, WebSphere)
* Incorporate J2EE libraries (e.g. [JSP](http://en.wikipedia.org/wiki/JavaServer_Pages), [JSF](http://en.wikipedia.org/wiki/JavaServer_Faces), [EJB](http://en.wikipedia.org/wiki/Ejb))
* Utilize J2EE technologies (e.g. [`Servlet`](http://docs.oracle.com/javaee/6/api/javax/servlet/Servlet.html)s, [`Filter`](http://docs.oracle.com/javaee/6/api/javax/servlet/Filter.html)s, [JNDI](http://en.wikipedia.org/wiki/Java_Naming_and_Directory_Interface))
* Have a specific need to be packaged as a [*.war* file](https://en.wikipedia.org/wiki/WAR_%28Sun_file_format%29)

## Quick reference

Add xsbt-web-plugin to *project/plugins.sbt*:

```scala
addSbtPlugin("com.earldouglas" % "xsbt-web-plugin" % "1.1.0")
```

Choose either Jetty or Tomcat with default setings:

*build.sbt*:

```scala
jetty()
```

```scala
tomcat()
```

From the sbt console:

* Start (or restart) the container with `container:start`
* Stop the container with `container:stop`<commit_msg>Add requirements section<commit_after>[![Build Status](https://travis-ci.org/earldouglas/xsbt-web-plugin.png?branch=master)](https://travis-ci.org/earldouglas/xsbt-web-plugin)
[![Codacy Badge](https://www.codacy.com/project/badge/29fa98e63b3842d9adc221d3edd67089)](https://www.codacy.com)

**Note: this is the readme for version 1.0 and newer.  For older versions, see the [0.9 branch](https://github.com/earldouglas/xsbt-web-plugin/tree/0.9).**

## About

xsbt-web-plugin is an [sbt](http://www.scala-sbt.org/) extension for building enterprise Web applications based on the [Java J2EE Servlet specification](http://en.wikipedia.org/wiki/Java_Servlet).

xsbt-web-plugin supports both Scala and Java, and is best suited for projects that:

* Deploy to common cloud platforms (e.g. [Google App Engine](https://developers.google.com/appengine/), [Heroku](https://www.heroku.com/), [Elastic Beanstalk](https://console.aws.amazon.com/elasticbeanstalk/home), [Jelastic](http://jelastic.com/))
* Deploy to production J2EE environments (e.g. Tomcat, Jetty, GlassFish, WebSphere)
* Incorporate J2EE libraries (e.g. [JSP](http://en.wikipedia.org/wiki/JavaServer_Pages), [JSF](http://en.wikipedia.org/wiki/JavaServer_Faces), [EJB](http://en.wikipedia.org/wiki/Ejb))
* Utilize J2EE technologies (e.g. [`Servlet`](http://docs.oracle.com/javaee/6/api/javax/servlet/Servlet.html)s, [`Filter`](http://docs.oracle.com/javaee/6/api/javax/servlet/Filter.html)s, [JNDI](http://en.wikipedia.org/wiki/Java_Naming_and_Directory_Interface))
* Have a specific need to be packaged as a [*.war* file](https://en.wikipedia.org/wiki/WAR_%28Sun_file_format%29)

## Requirements

* sbt 0.13.5+

## Quick reference

Add xsbt-web-plugin to *project/plugins.sbt*:

```scala
addSbtPlugin("com.earldouglas" % "xsbt-web-plugin" % "1.1.0")
```

Choose either Jetty or Tomcat with default setings:

*build.sbt*:

```scala
jetty()
```

```scala
tomcat()
```

From the sbt console:

* Start (or restart) the container with `container:start`
* Stop the container with `container:stop`
{'fraction_non_alphanumeric': 0.1706653475142221, 'fraction_numerical': 0.020281968835023496, 'mean_word_length': 5.2215384615384615, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 18, 'lorem ipsum': 0, 'www.': 8, 'xml': 0}, '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': '846134', 'n_tokens_mistral': 1506, 'n_tokens_neox': 1432, 'n_words': 282}