start work for tomcat8

git-svn-id: https://svn.apache.org/repos/asf/tomcat/maven-plugin/trunk@1756441 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/pom.xml b/pom.xml
index 39a370a..7a0f6e0 100644
--- a/pom.xml
+++ b/pom.xml
@@ -74,6 +74,7 @@
     <!-- server port for it tests -->
     <its.server.port>2008</its.server.port>
     <tomcat7Version>7.0.59</tomcat7Version>
+    <tomcat8Version>8.0.9</tomcat8Version>
 
     <!-- to prevent isssues with last apache parent pom -->
     <arguments />
@@ -314,8 +315,9 @@
     <module>common-tomcat-maven-plugin</module>
     <module>tomcat-maven-plugin-it</module>
     <module>tomcat6-maven-plugin</module>
-    <module>tomcat7-maven-plugin</module>
     <module>tomcat7-war-runner</module>
+    <module>tomcat7-maven-plugin</module>
+    <module>tomcat8-maven-plugin</module>
     <module>tomcat-maven-archetype</module>
   </modules>
 
diff --git a/tomcat-maven-archetype/src/main/resources/archetype-resources/__rootArtifactId__-webapp/pom.xml b/tomcat-maven-archetype/src/main/resources/archetype-resources/__rootArtifactId__-webapp/pom.xml
index cf3490d..8d039e6 100644
--- a/tomcat-maven-archetype/src/main/resources/archetype-resources/__rootArtifactId__-webapp/pom.xml
+++ b/tomcat-maven-archetype/src/main/resources/archetype-resources/__rootArtifactId__-webapp/pom.xml
@@ -48,7 +48,14 @@
             <path>/</path>

           </configuration>

         </plugin>

-

+        <plugin>

+          <groupId>org.apache.tomcat.maven</groupId>

+          <artifactId>tomcat8-maven-plugin</artifactId>

+          <configuration>

+            <port>9090</port>

+            <path>/</path>

+          </configuration>

+        </plugin>

       </plugins>

     </pluginManagement>

   </build>

diff --git a/tomcat-maven-archetype/src/main/resources/archetype-resources/pom.xml b/tomcat-maven-archetype/src/main/resources/archetype-resources/pom.xml
index b10b038..2adbd3a 100644
--- a/tomcat-maven-archetype/src/main/resources/archetype-resources/pom.xml
+++ b/tomcat-maven-archetype/src/main/resources/archetype-resources/pom.xml
@@ -63,6 +63,11 @@
           <artifactId>tomcat7-maven-plugin</artifactId>
           <version>${tomcatPluginVersion}</version>
         </plugin>
+        <plugin>
+          <groupId>org.apache.tomcat.maven</groupId>
+          <artifactId>tomcat8-maven-plugin</artifactId>
+          <version>${tomcatPluginVersion}</version>
+        </plugin>
       </plugins>
     </pluginManagement>
     <plugins>
diff --git a/tomcat8-maven-plugin/pom.xml b/tomcat8-maven-plugin/pom.xml
new file mode 100644
index 0000000..a6c1af2
--- /dev/null
+++ b/tomcat8-maven-plugin/pom.xml
@@ -0,0 +1,373 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  ~ Licensed to the Apache Software Foundation (ASF) under one
+  ~ or more contributor license agreements.  See the NOTICE file
+  ~ distributed with this work for additional information
+  ~ regarding copyright ownership.  The ASF licenses this file
+  ~ to you under the Apache License, Version 2.0 (the
+  ~ "License"); you may not use this file except in compliance
+  ~ with the License.  You may obtain a copy of the License at
+  ~
+  ~  http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing,
+  ~ software distributed under the License is distributed on an
+  ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  ~ KIND, either express or implied.  See the License for the
+  ~ specific language governing permissions and limitations
+  ~ under the License.
+  -->
+
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+  <modelVersion>4.0.0</modelVersion>
+  <parent>
+    <artifactId>tomcat-maven-plugin</artifactId>
+    <groupId>org.apache.tomcat.maven</groupId>
+    <version>2.3-SNAPSHOT</version>
+  </parent>
+  <artifactId>tomcat8-maven-plugin</artifactId>
+  <packaging>maven-plugin</packaging>
+  <name>Apache Tomcat Maven Plugin :: Tomcat 8.x</name>
+  <description>The Tomcat Maven Plugin provides goals to manipulate WAR projects within the Tomcat 8.x servlet container.
+  </description>
+
+  <properties>
+    <managerWebAppPath>${basedir}/target/</managerWebAppPath>
+    <warTestPath>${basedir}/src/test/simple-war-project-1.0-SNAPSHOT.war</warTestPath>
+    <keystoreTestPath>${basedir}/src/test/keystore</keystoreTestPath>
+  </properties>
+
+  <dependencies>
+    <dependency>
+      <groupId>org.apache.tomcat.embed</groupId>
+      <artifactId>tomcat-embed-core</artifactId>
+      <version>${tomcat8Version}</version>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.tomcat</groupId>
+      <artifactId>tomcat-util</artifactId>
+      <version>${tomcat8Version}</version>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.tomcat</groupId>
+      <artifactId>tomcat-coyote</artifactId>
+      <version>${tomcat8Version}</version>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.tomcat</groupId>
+      <artifactId>tomcat-api</artifactId>
+      <version>${tomcat8Version}</version>
+    </dependency>
+
+    <dependency>
+      <groupId>org.apache.tomcat</groupId>
+      <artifactId>tomcat-jdbc</artifactId>
+      <version>${tomcat8Version}</version>
+    </dependency>
+
+    <dependency>
+      <groupId>org.apache.tomcat</groupId>
+      <artifactId>tomcat-dbcp</artifactId>
+      <version>${tomcat8Version}</version>
+    </dependency>
+
+    <dependency>
+      <groupId>org.apache.tomcat</groupId>
+      <artifactId>tomcat-servlet-api</artifactId>
+      <version>${tomcat8Version}</version>
+    </dependency>
+
+    <dependency>
+      <groupId>org.apache.tomcat</groupId>
+      <artifactId>tomcat-jsp-api</artifactId>
+      <version>${tomcat8Version}</version>
+    </dependency>
+
+    <dependency>
+      <groupId>org.apache.tomcat</groupId>
+      <artifactId>tomcat-jasper</artifactId>
+      <version>${tomcat8Version}</version>
+    </dependency>
+
+    <dependency>
+      <groupId>org.apache.tomcat</groupId>
+      <artifactId>tomcat-jasper-el</artifactId>
+      <version>${tomcat8Version}</version>
+    </dependency>
+
+    <dependency>
+      <groupId>org.apache.tomcat</groupId>
+      <artifactId>tomcat-el-api</artifactId>
+      <version>${tomcat8Version}</version>
+    </dependency>
+
+    <dependency>
+      <groupId>org.apache.tomcat</groupId>
+      <artifactId>tomcat-catalina</artifactId>
+      <version>${tomcat8Version}</version>
+    </dependency>
+
+    <dependency>
+      <groupId>org.apache.tomcat</groupId>
+      <artifactId>tomcat-tribes</artifactId>
+      <version>${tomcat8Version}</version>
+    </dependency>
+
+    <dependency>
+      <groupId>org.apache.tomcat</groupId>
+      <artifactId>tomcat-catalina-ha</artifactId>
+      <version>${tomcat8Version}</version>
+    </dependency>
+
+    <dependency>
+      <groupId>org.apache.tomcat</groupId>
+      <artifactId>tomcat-annotations-api</artifactId>
+      <version>${tomcat8Version}</version>
+    </dependency>
+
+    <!-- tomcat i18n too ?? -->
+
+    <!-- not sure we need that -->
+    <dependency>
+      <groupId>org.apache.tomcat</groupId>
+      <artifactId>tomcat-juli</artifactId>
+      <version>${tomcat8Version}</version>
+    </dependency>
+
+    <dependency>
+      <groupId>org.apache.tomcat.embed</groupId>
+      <artifactId>tomcat-embed-logging-juli</artifactId>
+      <version>${tomcat8Version}</version>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.tomcat.embed</groupId>
+      <artifactId>tomcat-embed-logging-log4j</artifactId>
+      <version>${tomcat8Version}</version>
+    </dependency>
+
+    <dependency>
+      <groupId>org.eclipse.jdt.core.compiler</groupId>
+      <artifactId>ecj</artifactId>
+    </dependency>
+
+    <!-- end tomcat dependencies -->
+
+
+    <dependency>
+      <groupId>org.apache.tomcat.maven</groupId>
+      <artifactId>common-tomcat-maven-plugin</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.tomcat.maven</groupId>
+      <artifactId>tomcat7-war-runner</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.maven</groupId>
+      <artifactId>maven-plugin-api</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.maven.plugin-tools</groupId>
+      <artifactId>maven-plugin-annotations</artifactId>
+      <scope>provided</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.maven</groupId>
+      <artifactId>maven-archiver</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.codehaus.plexus</groupId>
+      <artifactId>plexus-classworlds</artifactId>
+    </dependency>
+
+    <dependency>
+      <groupId>commons-io</groupId>
+      <artifactId>commons-io</artifactId>
+    </dependency>
+
+    <dependency>
+      <groupId>commons-lang</groupId>
+      <artifactId>commons-lang</artifactId>
+    </dependency>
+
+    <dependency>
+      <groupId>org.apache.commons</groupId>
+      <artifactId>commons-compress</artifactId>
+    </dependency>
+
+    <dependency>
+      <groupId>org.codehaus.plexus</groupId>
+      <artifactId>plexus-archiver</artifactId>
+    </dependency>
+
+    <dependency>
+      <groupId>org.codehaus.plexus</groupId>
+      <artifactId>plexus-utils</artifactId>
+    </dependency>
+
+    <dependency>
+      <groupId>org.apache.maven.shared</groupId>
+      <artifactId>maven-filtering</artifactId>
+      <exclusions>
+        <exclusion>
+          <groupId>nekohtml</groupId>
+          <artifactId>xercesMinimal</artifactId>
+        </exclusion>
+      </exclusions>
+    </dependency>
+
+    <dependency>
+      <groupId>org.apache.tomcat.maven</groupId>
+      <artifactId>tomcat-maven-plugin-it</artifactId>
+      <scope>test</scope>
+    </dependency>
+    <dependency>
+      <groupId>junit</groupId>
+      <artifactId>junit</artifactId>
+      <scope>test</scope>
+    </dependency>
+
+    <dependency>
+      <groupId>org.slf4j</groupId>
+      <artifactId>jcl-over-slf4j</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.logging.log4j</groupId>
+      <artifactId>log4j-core</artifactId>
+      <scope>test</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.logging.log4j</groupId>
+      <artifactId>log4j-slf4j-impl</artifactId>
+      <scope>test</scope>
+    </dependency>
+  </dependencies>
+
+  <build>
+    <testResources>
+      <testResource>
+        <directory>src/test/resources</directory>
+        <filtering>true</filtering>
+      </testResource>
+    </testResources>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-plugin-plugin</artifactId>
+      </plugin>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-surefire-plugin</artifactId>
+        <configuration>
+          <excludes>
+            <exclude>**/**IT*</exclude>
+          </excludes>
+          <systemPropertyVariables>
+            <java.io.tmpdir>${project.build.directory}</java.io.tmpdir>
+          </systemPropertyVariables>
+        </configuration>
+      </plugin>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-antrun-plugin</artifactId>
+        <executions>
+          <execution>
+            <phase>pre-integration-test</phase>
+            <goals>
+              <goal>run</goal>
+            </goals>
+            <configuration>
+              <target>
+                <unzip src="src/test/manager.war" dest="${managerWebAppPath}" />
+              </target>
+            </configuration>
+          </execution>
+        </executions>
+      </plugin>
+    </plugins>
+  </build>
+
+  <profiles>
+    <profile>
+      <id>run-its</id>
+
+      <build>
+        <plugins>
+          <plugin>
+            <!-- For integration tests the plugin needs to be installed before
+                 the integration tests are executed -->
+            <groupId>org.apache.maven.plugins</groupId>
+            <artifactId>maven-install-plugin</artifactId>
+            <executions>
+              <execution>
+                <id>install-plugin-pre-integration-test</id>
+                <phase>pre-integration-test</phase>
+                <goals>
+                  <goal>install</goal>
+                </goals>
+              </execution>
+            </executions>
+          </plugin>
+          <plugin>
+            <groupId>org.apache.maven.plugins</groupId>
+            <artifactId>maven-invoker-plugin</artifactId>
+            <configuration>
+              <projectsDirectory>src/it</projectsDirectory>
+              <cloneProjectsTo>${project.build.directory}/it</cloneProjectsTo>
+              <pomIncludes>
+                <pomInclude>*/pom.xml</pomInclude>
+              </pomIncludes>
+              <postBuildHookScript>verify</postBuildHookScript>
+              <localRepositoryPath>${project.build.directory}/local-repo</localRepositoryPath>
+              <goals>
+                <goal>clean</goal>
+                <goal>package</goal>
+              </goals>
+              <settingsFile>src/it/settings.xml</settingsFile>
+              <debug>true</debug>
+            </configuration>
+            <executions>
+              <execution>
+                <id>integration-tests-invoker</id>
+                <goals>
+                  <goal>run</goal>
+                </goals>
+              </execution>
+            </executions>
+          </plugin>
+          <plugin>
+            <groupId>org.apache.maven.plugins</groupId>
+            <artifactId>maven-failsafe-plugin</artifactId>
+            <executions>
+              <execution>
+                <id>integration-test</id>
+                <goals>
+                  <goal>integration-test</goal>
+                </goals>
+                <configuration>
+                  <systemPropertyVariables>
+                    <mojoVersion>${project.version}</mojoVersion>
+                    <verifier.maven.debug>${verifier.maven.debug}</verifier.maven.debug>
+                    <verifier.debugJvm>${verifier.debugJvm}</verifier.debugJvm>
+                    <its.http.port>${its.http.port}</its.http.port>
+                    <its.https.port>${its.https.port}</its.https.port>
+                    <its.ajp.port>${its.ajp.port}</its.ajp.port>
+                    <java.io.tmpdir>${project.build.directory}</java.io.tmpdir>
+                  </systemPropertyVariables>
+                  <redirectTestOutputToFile>false</redirectTestOutputToFile>
+                  <useFile>false</useFile>
+                </configuration>
+              </execution>
+              <execution>
+                <id>verify</id>
+                <goals>
+                  <goal>verify</goal>
+                </goals>
+              </execution>
+            </executions>
+          </plugin>
+        </plugins>
+      </build>
+    </profile>
+   </profiles>
+
+</project>
diff --git a/tomcat8-maven-plugin/src/it/settings.xml b/tomcat8-maven-plugin/src/it/settings.xml
new file mode 100644
index 0000000..b9b7e26
--- /dev/null
+++ b/tomcat8-maven-plugin/src/it/settings.xml
@@ -0,0 +1,75 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+
+<settings>
+  <profiles>
+    <profile>
+      <id>it-repo</id>
+      <activation>
+        <activeByDefault>true</activeByDefault>
+      </activation>
+      <repositories>
+        <repository>
+          <id>local.central</id>
+          <url>@localRepositoryUrl@</url>
+          <releases>
+            <enabled>true</enabled>
+          </releases>
+          <snapshots>
+            <enabled>true</enabled>
+          </snapshots>
+        </repository>
+        <repository>
+          <id>local.snapshots</id>
+          <url>@localRepositoryUrl@</url>
+          <releases>
+            <enabled>false</enabled>
+          </releases>
+          <snapshots>
+            <enabled>true</enabled>
+          </snapshots>
+        </repository>
+      </repositories>
+      <pluginRepositories>
+        <pluginRepository>
+          <id>local.central</id>
+          <url>@localRepositoryUrl@</url>
+          <releases>
+            <enabled>true</enabled>
+          </releases>
+          <snapshots>
+            <enabled>true</enabled>
+          </snapshots>
+        </pluginRepository>
+        <pluginRepository>
+          <id>local.snapshots</id>
+          <url>@localRepositoryUrl@</url>
+          <releases>
+            <enabled>false</enabled>
+          </releases>
+          <snapshots>
+            <enabled>true</enabled>
+          </snapshots>
+        </pluginRepository>
+      </pluginRepositories>
+    </profile>
+  </profiles>
+</settings>
diff --git a/tomcat8-maven-plugin/src/it/simple-war-exec-project/pom.xml b/tomcat8-maven-plugin/src/it/simple-war-exec-project/pom.xml
new file mode 100644
index 0000000..73c502e
--- /dev/null
+++ b/tomcat8-maven-plugin/src/it/simple-war-exec-project/pom.xml
@@ -0,0 +1,92 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one
+  or more contributor license agreements.  See the NOTICE file
+  distributed with this work for additional information
+  regarding copyright ownership.  The ASF licenses this file
+  to you under the Apache License, Version 2.0 (the
+  "License"); you may not use this file except in compliance
+  with the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing,
+  software distributed under the License is distributed on an
+  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  KIND, either express or implied.  See the License for the
+  specific language governing permissions and limitations
+  under the License.
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+  <modelVersion>4.0.0</modelVersion>
+  <groupId>org.apache.tomcat.maven.it</groupId>
+  <artifactId>simple-war-exec-project</artifactId>
+  <version>1.0-SNAPSHOT</version>
+  <packaging>war</packaging>
+
+
+  <build>
+    <pluginManagement>
+      <plugins>
+        <plugin>
+          <groupId>org.apache.maven.plugins</groupId>
+          <artifactId>maven-war-plugin</artifactId>
+          <version>2.1-alpha-2</version>
+        </plugin>
+        <plugin>
+          <groupId>org.apache.maven.plugins</groupId>
+          <artifactId>maven-compiler-plugin</artifactId>
+          <version>2.3.2</version>
+        </plugin>
+        <plugin>
+          <groupId>org.apache.tomcat.maven</groupId>
+          <artifactId>tomcat7-maven-plugin</artifactId>
+          <version>@pom.version@</version>
+        </plugin>
+      </plugins>
+    </pluginManagement>
+
+    <plugins>
+      <plugin>
+        <artifactId>maven-war-plugin</artifactId>
+        <configuration>
+          <webXml>src/main/webapp/web.xml</webXml>
+        </configuration>
+      </plugin>
+      <plugin>
+        <groupId>org.apache.tomcat.maven</groupId>
+        <artifactId>tomcat7-maven-plugin</artifactId>
+        <executions>
+          <execution>
+            <id>tomcat-run</id>
+            <goals>
+              <goal>exec-war-only</goal>
+            </goals>
+            <phase>package</phase>
+            <configuration>
+              <path>foo</path>
+              <serverXml>src/main/tomcatconf/server.xml</serverXml>
+            </configuration>
+          </execution>
+        </executions>
+      </plugin>
+
+    </plugins>
+  </build>
+
+  <dependencies>
+    <dependency>
+      <groupId>org.springframework</groupId>
+      <artifactId>spring-context-support</artifactId>
+      <version>2.5.6</version>
+    </dependency>
+    <dependency>
+      <groupId>junit</groupId>
+      <artifactId>junit</artifactId>
+      <version>4.9</version>
+      <scope>test</scope>
+    </dependency>
+  </dependencies>
+
+</project>
diff --git a/tomcat8-maven-plugin/src/it/simple-war-exec-project/src/main/tomcatconf/Catalina/localhost/manager.xml b/tomcat8-maven-plugin/src/it/simple-war-exec-project/src/main/tomcatconf/Catalina/localhost/manager.xml
new file mode 100644
index 0000000..4608ca7
--- /dev/null
+++ b/tomcat8-maven-plugin/src/it/simple-war-exec-project/src/main/tomcatconf/Catalina/localhost/manager.xml
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You under the Apache License, Version 2.0
+  (the "License"); you may not use this file except in compliance with
+  the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+-->
+<Context antiResourceLocking="false" privileged="true" useHttpOnly="true" />
diff --git a/tomcat8-maven-plugin/src/it/simple-war-exec-project/src/main/tomcatconf/logging.properties b/tomcat8-maven-plugin/src/it/simple-war-exec-project/src/main/tomcatconf/logging.properties
new file mode 100644
index 0000000..709a122
--- /dev/null
+++ b/tomcat8-maven-plugin/src/it/simple-war-exec-project/src/main/tomcatconf/logging.properties
@@ -0,0 +1,66 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+handlers = 1catalina.org.apache.juli.FileHandler, 2localhost.org.apache.juli.FileHandler, 3manager.org.apache.juli.FileHandler, 4host-manager.org.apache.juli.FileHandler, java.util.logging.ConsoleHandler
+
+.handlers = 1catalina.org.apache.juli.FileHandler, java.util.logging.ConsoleHandler
+
+############################################################
+# Handler specific properties.
+# Describes specific configuration info for Handlers.
+############################################################
+
+1catalina.org.apache.juli.FileHandler.level = FINE
+1catalina.org.apache.juli.FileHandler.directory = ${catalina.base}/logs
+1catalina.org.apache.juli.FileHandler.prefix = catalina.
+
+2localhost.org.apache.juli.FileHandler.level = FINE
+2localhost.org.apache.juli.FileHandler.directory = ${catalina.base}/logs
+2localhost.org.apache.juli.FileHandler.prefix = localhost.
+
+3manager.org.apache.juli.FileHandler.level = FINE
+3manager.org.apache.juli.FileHandler.directory = ${catalina.base}/logs
+3manager.org.apache.juli.FileHandler.prefix = manager.
+
+4host-manager.org.apache.juli.FileHandler.level = FINE
+4host-manager.org.apache.juli.FileHandler.directory = ${catalina.base}/logs
+4host-manager.org.apache.juli.FileHandler.prefix = host-manager.
+
+java.util.logging.ConsoleHandler.level = FINE
+java.util.logging.ConsoleHandler.formatter = java.util.logging.SimpleFormatter
+
+
+############################################################
+# Facility specific properties.
+# Provides extra control for each logger.
+############################################################
+
+org.apache.catalina.core.ContainerBase.[Catalina].[localhost].level = FINE
+org.apache.catalina.core.ContainerBase.[Catalina].[localhost].handlers = 2localhost.org.apache.juli.FileHandler
+
+org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/manager].level = FINE
+org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/manager].handlers = 3manager.org.apache.juli.FileHandler
+
+org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/host-manager].level = FINE
+org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/host-manager].handlers = 4host-manager.org.apache.juli.FileHandler
+
+# For example, set the org.apache.catalina.util.LifecycleBase logger to log
+# each component that extends LifecycleBase changing state:
+org.apache.catalina.util.LifecycleBase.level = FINE
+
+# To see debug messages in TldLocationsCache, uncomment the following line:
+org.apache.jasper.compiler.TldLocationsCache.level = FINE
+
+org.apache = FINE
diff --git a/tomcat8-maven-plugin/src/it/simple-war-exec-project/src/main/tomcatconf/server.xml b/tomcat8-maven-plugin/src/it/simple-war-exec-project/src/main/tomcatconf/server.xml
new file mode 100644
index 0000000..76ab562
--- /dev/null
+++ b/tomcat8-maven-plugin/src/it/simple-war-exec-project/src/main/tomcatconf/server.xml
@@ -0,0 +1,43 @@
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one
+  or more contributor license agreements.  See the NOTICE file
+  distributed with this work for additional information
+  regarding copyright ownership.  The ASF licenses this file
+  to you under the Apache License, Version 2.0 (the
+  "License"); you may not use this file except in compliance
+  with the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing,
+  software distributed under the License is distributed on an
+  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  KIND, either express or implied.  See the License for the
+  specific language governing permissions and limitations
+  under the License.
+-->
+
+<Server port="8010" shutdown="SHUTDOWN">
+
+  <GlobalNamingResources>
+    <!-- Used by Manager webapp -->
+    <Resource name="UserDatabase" auth="Container"
+              type="org.apache.catalina.UserDatabase"
+       description="User database that can be updated and saved"
+           factory="org.apache.catalina.users.MemoryUserDatabaseFactory"
+          pathname="conf/tomcat-users.xml" />
+  </GlobalNamingResources>
+
+  <Service name="Catalina">
+    <Connector port="8080" keepAliveTimeout="1800000" maxKeepAliveRequests="30000" maxThreads="300" />
+    <Connector port="8088" keepAliveTimeout="1800000" maxKeepAliveRequests="30000" maxThreads="300" />
+    <Engine name="Catalina" defaultHost="localhost">
+      <Valve className="org.apache.catalina.valves.AccessLogValve" 
+             resolveHosts="false" pattern="%t-ip:%a-protocol:%H-localPort:%p-path:%U-time:%D ms"/> 
+      <Realm className="org.apache.catalina.realm.UserDatabaseRealm"
+             resourceName="UserDatabase" />
+      <Host name="localhost" appBase="webapps" />
+    </Engine>
+    
+  </Service>
+</Server>
diff --git a/tomcat8-maven-plugin/src/it/simple-war-exec-project/src/main/webapp/index.jsp b/tomcat8-maven-plugin/src/it/simple-war-exec-project/src/main/webapp/index.jsp
new file mode 100644
index 0000000..2197216
--- /dev/null
+++ b/tomcat8-maven-plugin/src/it/simple-war-exec-project/src/main/webapp/index.jsp
@@ -0,0 +1,17 @@
+<%--
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You under the Apache License, Version 2.0
+  (the "License"); you may not use this file except in compliance with
+  the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+--%>
+It works !!
\ No newline at end of file
diff --git a/tomcat8-maven-plugin/src/it/simple-war-exec-project/src/main/webapp/web.xml b/tomcat8-maven-plugin/src/it/simple-war-exec-project/src/main/webapp/web.xml
new file mode 100644
index 0000000..1967938
--- /dev/null
+++ b/tomcat8-maven-plugin/src/it/simple-war-exec-project/src/main/webapp/web.xml
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one
+  or more contributor license agreements.  See the NOTICE file
+  distributed with this work for additional information
+  regarding copyright ownership.  The ASF licenses this file
+  to you under the Apache License, Version 2.0 (the
+  "License"); you may not use this file except in compliance
+  with the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing,
+  software distributed under the License is distributed on an
+  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  KIND, either express or implied.  See the License for the
+  specific language governing permissions and limitations
+  under the License.
+-->
+
+<web-app xmlns="http://java.sun.com/xml/ns/j2ee" version="2.4"
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
+         xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
+    
+    
+</web-app>
\ No newline at end of file
diff --git a/tomcat8-maven-plugin/src/it/simple-war-exec-project/verify.bsh b/tomcat8-maven-plugin/src/it/simple-war-exec-project/verify.bsh
new file mode 100644
index 0000000..651080e
--- /dev/null
+++ b/tomcat8-maven-plugin/src/it/simple-war-exec-project/verify.bsh
@@ -0,0 +1,91 @@
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import java.io.*;
+import java.util.*;
+import java.util.jar.*;
+import org.codehaus.plexus.util.*;
+
+boolean result = true;
+
+try
+{
+    File target = new File( basedir, "target" );
+    if ( !target.exists() || !target.isDirectory() )
+    {
+        System.err.println( "target file is missing or not a directory." );
+        return false;
+    }
+
+    File artifact = new File( target, "simple-war-exec-project-1.0-SNAPSHOT-war-exec.jar" );
+    if ( !artifact.exists() || artifact.isDirectory() )
+    {
+        System.err.println( "artifact file is missing or a directory." );
+        return false;
+    }
+
+    Set contents = new HashSet();
+
+    JarFile jar = new JarFile( artifact );
+    Enumeration jarEntries = jar.entries();
+    while ( jarEntries.hasMoreElements() )
+    {
+        JarEntry entry = (JarEntry) jarEntries.nextElement();
+        if ( !entry.isDirectory() )
+        {
+            // Only compare files
+            contents.add( entry.getName() );
+        }
+    }
+
+    if (!contents.contains("foo.war") )
+    {
+        System.err.println( "foo.war." );
+        return false;
+    }
+    if (!contents.contains("conf/server.xml") )
+    {
+        System.err.println( "conf/server.xml is missing." );
+        return false;
+    }
+    if (!contents.contains("conf/logging.properties") )
+    {
+        System.err.println( "conf/logging.properties is missing." );
+        return false;
+    }
+    if (!contents.contains("conf/Catalina/localhost/manager.xml") )
+    {
+        System.err.println( "conf/Catalina/localhost/manager.xml is missing." );
+        return false;
+    }
+    if (!contents.contains("tomcat.standalone.properties") )
+    {
+        System.err.println( "tomcat.standalone.properties is missing." );
+        return false;
+    }
+
+}
+catch( Throwable e )
+{
+    e.printStackTrace();
+    result = false;
+}
+
+return result;
\ No newline at end of file
diff --git a/tomcat8-maven-plugin/src/main/java/org/apache/tomcat/maven/plugin/tomcat8/AbstractCatalinaMojo.java b/tomcat8-maven-plugin/src/main/java/org/apache/tomcat/maven/plugin/tomcat8/AbstractCatalinaMojo.java
new file mode 100644
index 0000000..4c6c648
--- /dev/null
+++ b/tomcat8-maven-plugin/src/main/java/org/apache/tomcat/maven/plugin/tomcat8/AbstractCatalinaMojo.java
@@ -0,0 +1,273 @@
+package org.apache.tomcat.maven.plugin.tomcat8;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import org.apache.maven.artifact.manager.WagonManager;
+import org.apache.maven.plugin.MojoExecutionException;
+import org.apache.maven.plugins.annotations.Component;
+import org.apache.maven.plugins.annotations.Parameter;
+import org.apache.maven.wagon.authentication.AuthenticationInfo;
+import org.apache.tomcat.maven.common.deployer.TomcatManager;
+import org.apache.tomcat.maven.common.deployer.TomcatManagerException;
+import org.apache.tomcat.maven.plugin.tomcat8.AbstractTomcat7Mojo;
+import org.codehaus.plexus.util.StringUtils;
+
+import java.io.IOException;
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.util.StringTokenizer;
+
+/**
+ * Abstract goal that provides common configuration for Catalina-based goals.
+ *
+ * @author Mark Hobson <markhobson@gmail.com>
+ */
+public abstract class AbstractCatalinaMojo
+    extends AbstractTomcat7Mojo
+{
+    // ----------------------------------------------------------------------
+    // Constants
+    // ----------------------------------------------------------------------
+
+    /**
+     * The name of this Maven plugin. Used to produce the user agent when communicating with Tomcat manager.
+     */
+    private String name = "Apache Tomcat Maven Plugin";
+
+    /**
+     * The default username to use when authenticating with Tomcat manager.
+     */
+    private static final String DEFAULT_USERNAME = "admin";
+
+    /**
+     * The default password to use when authenticating with Tomcat manager.
+     */
+    private static final String DEFAULT_PASSWORD = "";
+
+    // ----------------------------------------------------------------------
+    // Mojo Parameters
+    // ----------------------------------------------------------------------
+
+    /**
+     * The Maven Wagon manager to use when obtaining server authentication details.
+     */
+    @Component
+    private WagonManager wagonManager;
+
+    /**
+     * The full URL of the Tomcat manager instance to use.
+     */
+    @Parameter( property = "maven.tomcat.url", defaultValue = "http://localhost:8080/manager/text", required = true )
+    private URL url;
+
+    /**
+     * The server id in settings.xml to use when authenticating with Tomcat manager, or <code>null</code> to use
+     * defaults of username <code>admin</code> and no password.
+     */
+    @Parameter( property = "maven.tomcat.server" )
+    private String server;
+
+    /**
+     * The URL encoding charset to use when communicating with Tomcat manager.
+     */
+    @Parameter( property = "maven.tomcat.charset", defaultValue = "ISO-8859-1", required = true )
+    private String charset;
+
+    /**
+     * The tomcat username to use for deployment
+     *
+     * @since 1.0-alpha-2
+     */
+    @Parameter( property = "tomcat.username" )
+    private String username;
+
+    /**
+     * The password to use for deployment
+     *
+     * @since 1.0-alpha-2
+     */
+    @Parameter( property = "tomcat.password" )
+    private String password;
+
+    @Parameter( defaultValue = "${plugin.version}", required = true, readonly = true )
+    private String version;
+
+    // ----------------------------------------------------------------------
+    // Fields
+    // ----------------------------------------------------------------------
+
+    /**
+     * The Tomcat manager wrapper object.
+     */
+    private TomcatManager manager;
+
+    // ----------------------------------------------------------------------
+    // Mojo Implementation
+    // ----------------------------------------------------------------------
+
+    /**
+     * {@inheritDoc}
+     */
+    public void execute()
+        throws MojoExecutionException
+    {
+        try
+        {
+            invokeManager();
+        }
+        catch ( TomcatManagerException exception )
+        {
+            throw new MojoExecutionException(
+                messagesProvider.getMessage( "AbstractCatalinaMojo.managerError", exception.getMessage() ) );
+        }
+        catch ( IOException exception )
+        {
+            throw new MojoExecutionException( messagesProvider.getMessage( "AbstractCatalinaMojo.managerIOError" ),
+                                              exception );
+        }
+    }
+
+    // ----------------------------------------------------------------------
+    // Protected Methods
+    // ----------------------------------------------------------------------
+
+    /**
+     * Invokes Tomcat manager when this Mojo is executed.
+     *
+     * @throws org.apache.maven.plugin.MojoExecutionException
+     *                             if there was a problem executing this goal
+     * @throws org.apache.tomcat.maven.common.deployer.TomcatManagerException
+     *                             if the Tomcat manager request fails
+     * @throws java.io.IOException if an i/o error occurs
+     */
+    protected abstract void invokeManager()
+        throws MojoExecutionException, TomcatManagerException, IOException;
+
+    /**
+     * Gets the Tomcat manager wrapper object configured for this goal.
+     *
+     * @return the Tomcat manager wrapper object
+     * @throws org.apache.maven.plugin.MojoExecutionException
+     *          if there was a problem obtaining the authentication details
+     */
+    protected TomcatManager getManager()
+        throws MojoExecutionException
+    {
+        // lazily instantiate when config values have been injected
+        if ( manager == null )
+        {
+            String userName;
+            String password;
+
+            if ( server == null )
+            {
+                // no server set, use defaults
+                getLog().debug( messagesProvider.getMessage( "AbstractCatalinaMojo.defaultAuth" ) );
+                userName = DEFAULT_USERNAME;
+                password = DEFAULT_PASSWORD;
+            }
+            else
+            {
+                // obtain authenication details for specified server from wagon
+                AuthenticationInfo info = wagonManager.getAuthenticationInfo( server );
+                if ( info == null )
+                {
+                    throw new MojoExecutionException(
+                        messagesProvider.getMessage( "AbstractCatalinaMojo.unknownServer", server ) );
+                }
+
+                // derive username
+                userName = info.getUserName();
+                if ( userName == null )
+                {
+                    getLog().debug( messagesProvider.getMessage( "AbstractCatalinaMojo.defaultUserName" ) );
+                    userName = DEFAULT_USERNAME;
+                }
+
+                // derive password
+                password = info.getPassword();
+                if ( password == null )
+                {
+                    getLog().debug( messagesProvider.getMessage( "AbstractCatalinaMojo.defaultPassword" ) );
+                    password = DEFAULT_PASSWORD;
+                }
+            }
+
+            // if userName/password are defined in the mojo or the cli they override
+            if ( !StringUtils.isEmpty( this.username ) )
+            {
+                userName = this.username;
+                password = this.password == null ? "" : this.password;
+            }
+
+            manager = new TomcatManager( url, userName, password, charset, settings.isInteractiveMode() );
+            manager.setUserAgent( name + "/" + version );
+        }
+
+        return manager;
+    }
+
+    /**
+     * Gets the full URL of the Tomcat manager instance.
+     *
+     * @return the full URL of the Tomcat manager instance to use
+     */
+    protected URL getURL()
+    {
+        return url;
+    }
+
+    /**
+     * Gets the webapp context path to use when communicating with Tomcat manager.
+     *
+     * @return the webapp context path to use
+     */
+    protected String getPath()
+    {
+        return path;
+    }
+
+    /**
+     * Gets the URL of the deployed webapp.
+     *
+     * @return the URL of the deployed webapp
+     * @throws java.net.MalformedURLException if the deployed webapp URL is invalid
+     */
+    protected URL getDeployedURL()
+        throws MalformedURLException
+    {
+        return new URL( getURL(), getPath() );
+    }
+
+    /**
+     * Splits the given string into lines and writes each one separately to the log at info level.
+     *
+     * @param string the string to write
+     */
+    protected void log( String string )
+    {
+        StringTokenizer tokenizer = new StringTokenizer( string, "\n\r" );
+
+        while ( tokenizer.hasMoreTokens() )
+        {
+            getLog().info( tokenizer.nextToken() );
+        }
+    }
+}
diff --git a/tomcat8-maven-plugin/src/main/java/org/apache/tomcat/maven/plugin/tomcat8/AbstractTomcat7Mojo.java b/tomcat8-maven-plugin/src/main/java/org/apache/tomcat/maven/plugin/tomcat8/AbstractTomcat7Mojo.java
new file mode 100644
index 0000000..588e273
--- /dev/null
+++ b/tomcat8-maven-plugin/src/main/java/org/apache/tomcat/maven/plugin/tomcat8/AbstractTomcat7Mojo.java
@@ -0,0 +1,82 @@
+package org.apache.tomcat.maven.plugin.tomcat8;
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import org.apache.maven.plugin.AbstractMojo;
+import org.apache.maven.plugin.MojoExecutionException;
+import org.apache.maven.plugins.annotations.Component;
+import org.apache.maven.plugins.annotations.Parameter;
+import org.apache.maven.settings.Settings;
+import org.apache.tomcat.maven.common.deployer.TomcatManagerResponse;
+import org.apache.tomcat.maven.common.messages.MessagesProvider;
+
+/**
+ * @author Olivier Lamy
+ * @since 2.0
+ */
+public abstract class AbstractTomcat7Mojo
+    extends AbstractMojo
+{
+    @Component
+    protected Settings settings;
+
+    @Component
+    protected MessagesProvider messagesProvider;
+
+    // ----------------------------------------------------------------------
+    // Mojo Parameters
+    // ----------------------------------------------------------------------
+
+    /**
+     * The webapp context path to use for the web application being run. This must always start with a forward-slash
+     * ('/').
+     */
+    @Parameter(defaultValue = "/${project.artifactId}", property = "maven.tomcat.path", required = true)
+    protected String path;
+
+
+    protected String getPath()
+    {
+        return path;
+    }
+
+    /**
+     * Check response of Tomcat to know if ok or not.
+     *
+     * @param tomcatResponse response of tomcat return by TomcatManager class
+     * @throws org.apache.maven.plugin.MojoExecutionException
+     *          if HTTP status code greater than 400 (included)
+     */
+    protected void checkTomcatResponse( TomcatManagerResponse tomcatResponse )
+        throws MojoExecutionException
+    {
+        int statusCode = tomcatResponse.getStatusCode();
+
+        if ( statusCode >= 400 )
+        {
+            getLog().error( messagesProvider.getMessage( "tomcatHttpStatusError", statusCode,
+                                                         tomcatResponse.getReasonPhrase() ) );
+
+            throw new MojoExecutionException(
+                messagesProvider.getMessage( "tomcatHttpStatusError", statusCode,
+                                             tomcatResponse.getReasonPhrase() ) + ": "
+                    + tomcatResponse.getHttpResponseBody() );
+        }
+    }
+}
diff --git a/tomcat8-maven-plugin/src/main/java/org/apache/tomcat/maven/plugin/tomcat8/AbstractWarCatalinaMojo.java b/tomcat8-maven-plugin/src/main/java/org/apache/tomcat/maven/plugin/tomcat8/AbstractWarCatalinaMojo.java
new file mode 100644
index 0000000..a0390cf
--- /dev/null
+++ b/tomcat8-maven-plugin/src/main/java/org/apache/tomcat/maven/plugin/tomcat8/AbstractWarCatalinaMojo.java
@@ -0,0 +1,84 @@
+package org.apache.tomcat.maven.plugin.tomcat8;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import org.apache.maven.plugin.MojoExecutionException;
+import org.apache.maven.plugins.annotations.Parameter;
+
+/**
+ * Abstract goal that provides common configuration for Catalina-based goals.
+ *
+ * @author Mark Hobson <markhobson@gmail.com>
+ */
+public abstract class AbstractWarCatalinaMojo
+    extends AbstractCatalinaMojo
+{
+    // ----------------------------------------------------------------------
+    // Mojo Parameters
+    // ----------------------------------------------------------------------
+
+    /**
+     * The packaging of the Maven project that this goal operates upon.
+     */
+    @Parameter( defaultValue = "${project.packaging}", required = true, readonly = true )
+    private String packaging;
+
+    /**
+     * If set to true ignore if packaging of project is not 'war'.
+     *
+     * @since 1.1
+     */
+    @Parameter( property = "tomcat.ignorePackaging", defaultValue = "false" )
+    private boolean ignorePackaging;
+
+    // ----------------------------------------------------------------------
+    // Mojo Implementation
+    // ----------------------------------------------------------------------
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public void execute()
+        throws MojoExecutionException
+    {
+        if ( !isWar() )
+        {
+            getLog().info( messagesProvider.getMessage( "AbstractWarCatalinaMojo.nonWar" ) );
+            return;
+        }
+
+        super.execute();
+    }
+
+    // ----------------------------------------------------------------------
+    // Protected Methods
+    // ----------------------------------------------------------------------
+
+    /**
+     * Gets whether this project uses WAR packaging.
+     *
+     * @return whether this project uses WAR packaging
+     */
+    protected boolean isWar()
+    {
+        return "war".equals( packaging ) || ignorePackaging;
+    }
+}
diff --git a/tomcat8-maven-plugin/src/main/java/org/apache/tomcat/maven/plugin/tomcat8/deploy/AbstractDeployMojo.java b/tomcat8-maven-plugin/src/main/java/org/apache/tomcat/maven/plugin/tomcat8/deploy/AbstractDeployMojo.java
new file mode 100644
index 0000000..1c0bc65
--- /dev/null
+++ b/tomcat8-maven-plugin/src/main/java/org/apache/tomcat/maven/plugin/tomcat8/deploy/AbstractDeployMojo.java
@@ -0,0 +1,226 @@
+package org.apache.tomcat.maven.plugin.tomcat8.deploy;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import org.apache.maven.plugin.MojoExecutionException;
+import org.apache.maven.plugins.annotations.Parameter;
+import org.apache.tomcat.maven.common.deployer.TomcatManagerException;
+import org.apache.tomcat.maven.common.deployer.TomcatManagerResponse;
+import org.apache.tomcat.maven.plugin.tomcat8.AbstractWarCatalinaMojo;
+
+import java.io.File;
+import java.io.IOException;
+import java.net.URL;
+
+/**
+ * Deploy a WAR to Tomcat.
+ *
+ * @author Mark Hobson <markhobson@gmail.com>
+ */
+public abstract class AbstractDeployMojo
+    extends AbstractWarCatalinaMojo
+{
+    // ----------------------------------------------------------------------
+    // Mojo Parameters
+    // ----------------------------------------------------------------------
+
+    /**
+     * The deployment mode to use. This must be either <code>war</code> to deploy the war, <code>context</code> to
+     * deploy the context XML file, or <code>both</code> to deploy the war with the context XML file.
+     */
+    @Parameter( property = "maven.tomcat.mode", defaultValue = "war", required = true )
+    private String mode;
+
+    /**
+     * The path of the Tomcat context XML file. This is not used for war deployment mode.
+     */
+    @Parameter( defaultValue = "${project.build.directory}/${project.build.finalName}/META-INF/context.xml" )
+    private File contextFile;
+
+    /**
+     * Whether Tomcat should automatically undeploy webapps that already exist when deploying.
+     */
+    @Parameter( property = "maven.tomcat.update", defaultValue = "false", required = true )
+    private boolean update;
+
+    /**
+     * The Tomcat webapp tag name to use.
+     */
+    @Parameter( property = "maven.tomcat.tag" )
+    private String tag;
+
+    // ----------------------------------------------------------------------
+    // Protected Methods
+    // ----------------------------------------------------------------------
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public void invokeManager()
+        throws MojoExecutionException, TomcatManagerException, IOException
+    {
+        if ( "war".equals( mode ) )
+        {
+            deployWar();
+        }
+        else if ( "context".equals( mode ) )
+        {
+            deployContext();
+        }
+        else if ( "both".equals( mode ) )
+        {
+            deployWarAndContext();
+        }
+        else
+        {
+            throw new MojoExecutionException( messagesProvider.getMessage( "AbstractDeployMojo.unknownMode", mode ) );
+        }
+    }
+
+    /**
+     * Gets the Tomcat WAR file. This may be a file or a directory depending on the deployment mode.
+     *
+     * @return the Tomcat WAR file.
+     */
+    protected abstract File getWarFile();
+
+    /**
+     * Ensures that the Tomcat WAR file exists and is the correct type for the deployment mode.
+     *
+     * @throws org.apache.maven.plugin.MojoExecutionException
+     *          if the WAR file does not exist or is not the correct type for the deployment mode
+     */
+    protected abstract void validateWarFile()
+        throws MojoExecutionException;
+
+    /**
+     * Gets the Tomcat context XML file.
+     *
+     * @return the Tomcat context XML file.
+     */
+    protected File getContextFile()
+    {
+        return contextFile;
+    }
+
+    /**
+     * Ensures that the Tomcat context XML file exists and is indeed a file.
+     *
+     * @throws org.apache.maven.plugin.MojoExecutionException
+     *          if the context file does not exist or is not a file
+     */
+    protected void validateContextFile()
+        throws MojoExecutionException
+    {
+        if ( !contextFile.exists() || !contextFile.isFile() )
+        {
+            throw new MojoExecutionException(
+                messagesProvider.getMessage( "AbstractDeployMojo.missingContext", contextFile.getPath() ) );
+        }
+    }
+
+    /**
+     * Gets whether Tomcat should automatically undeploy webapps that already exist when deploying.
+     *
+     * @return whether Tomcat should automatically undeploy webapps that already exist when deploying
+     */
+    protected boolean isUpdate()
+    {
+        return update;
+    }
+
+    /**
+     * Gets the Tomcat webapp tag name to use.
+     *
+     * @return the Tomcat webapp tag name to use
+     */
+    protected String getTag()
+    {
+        return tag;
+    }
+
+    /**
+     * Deploys the WAR to Tomcat.
+     *
+     * @throws org.apache.maven.plugin.MojoExecutionException
+     *                             if there was a problem locating the WAR
+     * @throws org.apache.tomcat.maven.common.deployer.TomcatManagerException
+     *                             if the Tomcat manager request fails
+     * @throws java.io.IOException if an i/o error occurs
+     */
+    protected void deployWar()
+        throws MojoExecutionException, TomcatManagerException, IOException
+    {
+        validateWarFile();
+
+        getLog().info( messagesProvider.getMessage( "AbstractDeployMojo.deployingWar", getDeployedURL() ) );
+
+        URL warURL = getWarFile().toURL();
+        log( getManager().deploy( getPath(), warURL, isUpdate(), getTag() ).getHttpResponseBody() );
+    }
+
+    /**
+     * Deploys the context XML file to Tomcat.
+     *
+     * @throws org.apache.maven.plugin.MojoExecutionException
+     *                             if there was a problem locating the context XML file
+     * @throws org.apache.tomcat.maven.common.deployer.TomcatManagerException
+     *                             if the Tomcat manager request fails
+     * @throws java.io.IOException if an i/o error occurs
+     */
+    protected void deployContext()
+        throws MojoExecutionException, TomcatManagerException, IOException
+    {
+        validateContextFile();
+
+        getLog().info( messagesProvider.getMessage( "AbstractDeployMojo.deployingContext", getDeployedURL() ) );
+
+        URL contextURL = getContextFile().toURL();
+        log( getManager().deployContext( getPath(), contextURL, isUpdate(), getTag() ).getHttpResponseBody() );
+    }
+
+    /**
+     * Deploys the WAR and context XML file to Tomcat.
+     *
+     * @throws org.apache.maven.plugin.MojoExecutionException
+     *                             if there was a problem locating either the WAR or the context XML file
+     * @throws org.apache.tomcat.maven.common.deployer.TomcatManagerException
+     *                             if the Tomcat manager request fails
+     * @throws java.io.IOException if an i/o error occurs
+     */
+    protected void deployWarAndContext()
+        throws MojoExecutionException, TomcatManagerException, IOException
+    {
+        validateWarFile();
+        validateContextFile();
+
+        getLog().info( messagesProvider.getMessage( "AbstractDeployMojo.deployingWarContext", getDeployedURL() ) );
+
+        URL warURL = getWarFile().toURL();
+        URL contextURL = getContextFile().toURL();
+
+        TomcatManagerResponse tomcatResponse = getManager().deployContext( getPath(), contextURL, warURL, isUpdate(), getTag() );
+
+        checkTomcatResponse( tomcatResponse );
+
+        log( tomcatResponse.getHttpResponseBody() );
+    }
+}
diff --git a/tomcat8-maven-plugin/src/main/java/org/apache/tomcat/maven/plugin/tomcat8/deploy/AbstractDeployWarMojo.java b/tomcat8-maven-plugin/src/main/java/org/apache/tomcat/maven/plugin/tomcat8/deploy/AbstractDeployWarMojo.java
new file mode 100644
index 0000000..b31d6df
--- /dev/null
+++ b/tomcat8-maven-plugin/src/main/java/org/apache/tomcat/maven/plugin/tomcat8/deploy/AbstractDeployWarMojo.java
@@ -0,0 +1,95 @@
+package org.apache.tomcat.maven.plugin.tomcat8.deploy;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import org.apache.maven.plugin.MojoExecutionException;
+import org.apache.maven.plugins.annotations.Parameter;
+import org.apache.tomcat.maven.common.deployer.TomcatManagerException;
+import org.apache.tomcat.maven.common.deployer.TomcatManagerResponse;
+
+import java.io.File;
+import java.io.IOException;
+
+/**
+ * @author olamy
+ * @since 1.0-alpha-2
+ */
+public class AbstractDeployWarMojo
+    extends AbstractDeployMojo
+{
+    // ----------------------------------------------------------------------
+    // Mojo Parameters
+    // ----------------------------------------------------------------------
+
+    /**
+     * The path of the WAR file to deploy.
+     */
+    @Parameter( defaultValue = "${project.build.directory}/${project.build.finalName}.war", required = true )
+    private File warFile;
+
+    // ----------------------------------------------------------------------
+    // Protected Methods
+    // ----------------------------------------------------------------------
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    protected File getWarFile()
+    {
+        return warFile;
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    protected void validateWarFile()
+        throws MojoExecutionException
+    {
+        if ( !warFile.exists() || !warFile.isFile() )
+        {
+            throw new MojoExecutionException(
+                messagesProvider.getMessage( "DeployMojo.missingWar", warFile.getPath() ) );
+        }
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    protected void deployWar()
+        throws MojoExecutionException, TomcatManagerException, IOException
+    {
+        validateWarFile();
+
+        getLog().info( messagesProvider.getMessage( "AbstractDeployMojo.deployingWar", getDeployedURL() ) );
+
+        TomcatManagerResponse tomcatManagerResponse =
+            getManager().deploy( getPath(), warFile, isUpdate(), getTag(), warFile.length() );
+
+        checkTomcatResponse( tomcatManagerResponse );
+
+        getLog().info( "tomcatManager status code:" + tomcatManagerResponse.getStatusCode() + ", ReasonPhrase:"
+                           + tomcatManagerResponse.getReasonPhrase() );
+
+        log( tomcatManagerResponse.getHttpResponseBody() );
+    }
+}
diff --git a/tomcat8-maven-plugin/src/main/java/org/apache/tomcat/maven/plugin/tomcat8/deploy/DeployMojo.java b/tomcat8-maven-plugin/src/main/java/org/apache/tomcat/maven/plugin/tomcat8/deploy/DeployMojo.java
new file mode 100644
index 0000000..140ecd4
--- /dev/null
+++ b/tomcat8-maven-plugin/src/main/java/org/apache/tomcat/maven/plugin/tomcat8/deploy/DeployMojo.java
@@ -0,0 +1,37 @@
+package org.apache.tomcat.maven.plugin.tomcat8.deploy;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import org.apache.maven.plugins.annotations.Execute;
+import org.apache.maven.plugins.annotations.LifecyclePhase;
+import org.apache.maven.plugins.annotations.Mojo;
+
+/**
+ * Deploy a WAR to Tomcat.
+ *
+ * @author Mark Hobson <markhobson@gmail.com>
+ */
+@Mojo(name = "deploy", threadSafe = true)
+@Execute(phase = LifecyclePhase.PACKAGE)
+public class DeployMojo
+    extends AbstractDeployWarMojo
+{
+    // no-op : only mojo metadata overriding
+}
diff --git a/tomcat8-maven-plugin/src/main/java/org/apache/tomcat/maven/plugin/tomcat8/deploy/DeployOnlyMojo.java b/tomcat8-maven-plugin/src/main/java/org/apache/tomcat/maven/plugin/tomcat8/deploy/DeployOnlyMojo.java
new file mode 100644
index 0000000..9397950
--- /dev/null
+++ b/tomcat8-maven-plugin/src/main/java/org/apache/tomcat/maven/plugin/tomcat8/deploy/DeployOnlyMojo.java
@@ -0,0 +1,35 @@
+package org.apache.tomcat.maven.plugin.tomcat8.deploy;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import org.apache.maven.plugins.annotations.Mojo;
+
+/**
+ * Deploy a WAR to Tomcat without forking the package lifecycle.
+ *
+ * @author olamy
+ * @since 1.0-alpha-2
+ */
+@Mojo(name = "deploy-only", threadSafe = true)
+public class DeployOnlyMojo
+    extends AbstractDeployWarMojo
+{
+    // no-op : only mojo metadata overriding
+}
diff --git a/tomcat8-maven-plugin/src/main/java/org/apache/tomcat/maven/plugin/tomcat8/deploy/RedeployMojo.java b/tomcat8-maven-plugin/src/main/java/org/apache/tomcat/maven/plugin/tomcat8/deploy/RedeployMojo.java
new file mode 100644
index 0000000..fa72df9
--- /dev/null
+++ b/tomcat8-maven-plugin/src/main/java/org/apache/tomcat/maven/plugin/tomcat8/deploy/RedeployMojo.java
@@ -0,0 +1,43 @@
+package org.apache.tomcat.maven.plugin.tomcat8.deploy;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import org.apache.maven.plugins.annotations.Execute;
+import org.apache.maven.plugins.annotations.LifecyclePhase;
+import org.apache.maven.plugins.annotations.Mojo;
+
+/**
+ * Redeploy a WAR in Tomcat.  (Alias for the deploy goal with its update parameter set to true.)
+ *
+ * @author Olivier Lamy
+ * @since 2.1
+ */
+@Mojo(name = "redeploy", threadSafe = true)
+@Execute(phase = LifecyclePhase.PACKAGE)
+public class RedeployMojo
+    extends DeployMojo
+{
+    @Override
+    protected boolean isUpdate()
+    {
+        return true;
+    }
+
+}
diff --git a/tomcat8-maven-plugin/src/main/java/org/apache/tomcat/maven/plugin/tomcat8/deploy/RedeployOnlyMojo.java b/tomcat8-maven-plugin/src/main/java/org/apache/tomcat/maven/plugin/tomcat8/deploy/RedeployOnlyMojo.java
new file mode 100644
index 0000000..ea62a84
--- /dev/null
+++ b/tomcat8-maven-plugin/src/main/java/org/apache/tomcat/maven/plugin/tomcat8/deploy/RedeployOnlyMojo.java
@@ -0,0 +1,40 @@
+package org.apache.tomcat.maven.plugin.tomcat8.deploy;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import org.apache.maven.plugins.annotations.Mojo;
+
+/**
+ * Redeploy a WAR in Tomcat without forking the package lifecycle. 
+ * (Alias for the deploy-only goal with its update parameter set to true.)
+ *
+ * @since 2.1
+ */
+@Mojo( name = "redeploy-only", threadSafe = true )
+public class RedeployOnlyMojo
+    extends DeployOnlyMojo
+{
+    @Override
+    protected boolean isUpdate()
+    {
+        return true;
+    }
+
+}
diff --git a/tomcat8-maven-plugin/src/main/java/org/apache/tomcat/maven/plugin/tomcat8/deploy/UndeployMojo.java b/tomcat8-maven-plugin/src/main/java/org/apache/tomcat/maven/plugin/tomcat8/deploy/UndeployMojo.java
new file mode 100644
index 0000000..c266a6b
--- /dev/null
+++ b/tomcat8-maven-plugin/src/main/java/org/apache/tomcat/maven/plugin/tomcat8/deploy/UndeployMojo.java
@@ -0,0 +1,84 @@
+package org.apache.tomcat.maven.plugin.tomcat8.deploy;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import org.apache.maven.plugin.MojoExecutionException;
+import org.apache.maven.plugins.annotations.Mojo;
+import org.apache.maven.plugins.annotations.Parameter;
+import org.apache.tomcat.maven.common.deployer.TomcatManagerException;
+import org.apache.tomcat.maven.common.deployer.TomcatManagerResponse;
+import org.apache.tomcat.maven.plugin.tomcat8.AbstractWarCatalinaMojo;
+
+import java.io.IOException;
+
+/**
+ * Undeploy a WAR from Tomcat.
+ *
+ * @since 2.1
+ */
+@Mojo( name = "undeploy", threadSafe = true )
+public class UndeployMojo
+    extends AbstractWarCatalinaMojo
+{
+    // ----------------------------------------------------------------------
+    // Mojo Parameters
+    // ----------------------------------------------------------------------
+
+    /**
+     * Whether to fail the build if the web application cannot be undeployed.
+     */
+    @Parameter( property = "maven.tomcat.failOnError", defaultValue = "true" )
+    private boolean failOnError;
+
+    // ----------------------------------------------------------------------
+    // Protected Methods
+    // ----------------------------------------------------------------------
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    protected void invokeManager()
+        throws MojoExecutionException, TomcatManagerException, IOException
+    {
+        getLog().info( messagesProvider.getMessage( "UndeployMojo.undeployingApp", getDeployedURL() ) );
+
+        try
+        {
+
+            TomcatManagerResponse tomcatResponse = getManager().undeploy( getPath() );
+
+            checkTomcatResponse( tomcatResponse );
+
+            log( tomcatResponse.getHttpResponseBody() );
+
+        }
+        catch ( TomcatManagerException e )
+        {
+            if ( failOnError )
+            {
+                throw e;
+            }
+
+            getLog().warn( messagesProvider.getMessage( "UndeployMojo.undeployError", e.getMessage() ) );
+        }
+    }
+
+}
diff --git a/tomcat8-maven-plugin/src/main/java/org/apache/tomcat/maven/plugin/tomcat8/run/AbstractExecWarMojo.java b/tomcat8-maven-plugin/src/main/java/org/apache/tomcat/maven/plugin/tomcat8/run/AbstractExecWarMojo.java
new file mode 100644
index 0000000..9059257
--- /dev/null
+++ b/tomcat8-maven-plugin/src/main/java/org/apache/tomcat/maven/plugin/tomcat8/run/AbstractExecWarMojo.java
@@ -0,0 +1,677 @@
+package org.apache.tomcat.maven.plugin.tomcat8.run;
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import org.apache.commons.compress.archivers.ArchiveException;
+import org.apache.commons.compress.archivers.ArchiveOutputStream;
+import org.apache.commons.compress.archivers.ArchiveStreamFactory;
+import org.apache.commons.compress.archivers.jar.JarArchiveEntry;
+import org.apache.commons.io.FileUtils;
+import org.apache.commons.io.IOUtils;
+import org.apache.commons.lang.StringUtils;
+import org.apache.maven.artifact.Artifact;
+import org.apache.maven.artifact.factory.ArtifactFactory;
+import org.apache.maven.artifact.repository.ArtifactRepository;
+import org.apache.maven.artifact.resolver.ArtifactNotFoundException;
+import org.apache.maven.artifact.resolver.ArtifactResolutionException;
+import org.apache.maven.artifact.resolver.ArtifactResolver;
+import org.apache.maven.model.Dependency;
+import org.apache.maven.plugin.MojoExecutionException;
+import org.apache.maven.plugin.MojoFailureException;
+import org.apache.maven.plugins.annotations.Component;
+import org.apache.maven.plugins.annotations.Parameter;
+import org.apache.maven.project.MavenProject;
+import org.apache.maven.project.MavenProjectHelper;
+import org.apache.tomcat.maven.plugin.tomcat8.AbstractTomcat7Mojo;
+import org.apache.tomcat.maven.runner.Tomcat7Runner;
+import org.apache.tomcat.maven.runner.Tomcat7RunnerCli;
+import org.codehaus.plexus.archiver.jar.Manifest;
+import org.codehaus.plexus.archiver.jar.ManifestException;
+import org.codehaus.plexus.util.DirectoryScanner;
+import org.codehaus.plexus.util.SelectorUtils;
+
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.io.OutputStream;
+import java.io.PrintWriter;
+import java.util.ArrayList;
+import java.util.Enumeration;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Properties;
+import java.util.jar.JarEntry;
+import java.util.jar.JarFile;
+
+/**
+ * @author Olivier Lamy
+ * @since 2.0
+ */
+public abstract class AbstractExecWarMojo
+    extends AbstractTomcat7Mojo
+{
+
+    @Parameter( defaultValue = "${project.artifact}", required = true, readonly = true )
+    protected Artifact projectArtifact;
+
+    /**
+     * The maven project.
+     */
+    @Parameter( defaultValue = "${project}", required = true, readonly = true )
+    protected MavenProject project;
+
+    @Parameter( defaultValue = "${plugin.artifacts}", required = true )
+    protected List<Artifact> pluginArtifacts;
+
+    @Parameter( defaultValue = "${project.build.directory}" )
+    protected File buildDirectory;
+
+    /**
+     * Path under {@link #buildDirectory} where this mojo may do temporary work.
+     */
+    @Parameter( defaultValue = "${project.build.directory}/tomcat7-maven-plugin-exec" )
+    private File pluginWorkDirectory;
+
+    @Parameter( property = "maven.tomcat.exec.war.tomcatConf", defaultValue = "src/main/tomcatconf" )
+    protected File tomcatConfigurationFilesDirectory;
+
+    @Parameter( defaultValue = "src/main/tomcatconf/server.xml", property = "maven.tomcat.exec.war.serverXml" )
+    protected File serverXml;
+
+    /**
+     * Name of the generated exec JAR.
+     */
+    @Parameter( property = "tomcat.jar.finalName",
+                defaultValue = "${project.artifactId}-${project.version}-war-exec.jar", required = true )
+    protected String finalName;
+
+    /**
+     * Skip the execution
+     *
+     * @since 2.2
+     */
+    @Parameter( property = "maven.tomcat.skip", defaultValue = "false" )
+    private boolean skip;
+
+    /**
+     * The webapp context path to use for the web application being run.
+     * The name to store webapp in exec jar. Do not use /
+     */
+    @Parameter( property = "maven.tomcat.path", defaultValue = "${project.artifactId}", required = true )
+    protected String path;
+
+    @Parameter
+    protected List<WarRunDependency> warRunDependencies;
+
+    @Component
+    protected ArtifactResolver artifactResolver;
+
+    /**
+     * Maven Artifact Factory component.
+     */
+    @Component
+    protected ArtifactFactory artifactFactory;
+
+    /**
+     * Location of the local repository.
+     */
+    @Parameter( defaultValue = "${localRepository}", required = true, readonly = true )
+    protected ArtifactRepository local;
+
+    /**
+     * List of Remote Repositories used by the resolver
+     */
+    @Parameter( defaultValue = "${project.remoteArtifactRepositories}", required = true, readonly = true )
+    protected List<ArtifactRepository> remoteRepos;
+
+    @Component
+    protected MavenProjectHelper projectHelper;
+
+    /**
+     * Attach or not the generated artifact to the build (use true if you want to install or deploy it)
+     */
+    @Parameter( property = "maven.tomcat.exec.war.attachArtifact", defaultValue = "true", required = true )
+    protected boolean attachArtifact;
+
+
+    /**
+     * the classifier to use for the attached/generated artifact
+     */
+    @Parameter( property = "maven.tomcat.exec.war.attachArtifactClassifier", defaultValue = "exec-war",
+                required = true )
+    protected String attachArtifactClassifier;
+
+
+    /**
+     * the type to use for the attached/generated artifact
+     */
+    @Parameter( property = "maven.tomcat.exec.war.attachArtifactType", defaultValue = "jar", required = true )
+    protected String attachArtifactClassifierType;
+
+    /**
+     * to enable naming when starting tomcat
+     */
+    @Parameter( property = "maven.tomcat.exec.war.enableNaming", defaultValue = "false", required = true )
+    protected boolean enableNaming;
+
+    /**
+     * see http://tomcat.apache.org/tomcat-7.0-doc/config/valve.html
+     */
+    @Parameter( property = "maven.tomcat.exec.war.accessLogValveFormat", defaultValue = "%h %l %u %t %r %s %b %I %D",
+                required = true )
+    protected String accessLogValveFormat;
+
+    /**
+     * list of extra dependencies to add in the standalone tomcat jar: your jdbc driver, mail.jar etc..
+     * <b>Those dependencies will be in root classloader.</b>
+     */
+    @Parameter
+    protected List<ExtraDependency> extraDependencies;
+
+    /**
+     * list of extra resources to add in the standalone tomcat jar: your logger configuration etc
+     */
+    @Parameter
+    protected List<ExtraResource> extraResources;
+
+    /**
+     * Main class to use for starting the standalone jar.
+     */
+    @Parameter( property = "maven.tomcat.exec.war.mainClass",
+                defaultValue = "org.apache.tomcat.maven.runner.Tomcat7RunnerCli", required = true )
+    protected String mainClass;
+
+    /**
+     * which connector protocol to use HTTP/1.1 or org.apache.coyote.http11.Http11NioProtocol
+     */
+    @Parameter( property = "maven.tomcat.exec.war.connectorHttpProtocol", defaultValue = "HTTP/1.1", required = true )
+    protected String connectorHttpProtocol;
+
+    /**
+     * configure a default http port for the standalone jar
+     *
+     * @since 2.2
+     */
+    @Parameter( property = "maven.tomcat.exec.war.httpPort" )
+    protected String httpPort;
+
+    /**
+     * File patterns to exclude from extraDependencies
+     *
+     * @since 2.2
+     */
+    @Parameter
+    protected String[] excludes;
+
+    public void execute()
+        throws MojoExecutionException, MojoFailureException
+    {
+        if ( this.skip )
+        {
+            getLog().info( "skip execution" );
+            return;
+        }
+        //project.addAttachedArtifact(  );
+        File warExecFile = new File( buildDirectory, finalName );
+        if ( warExecFile.exists() )
+        {
+            warExecFile.delete();
+        }
+
+        File execWarJar = new File( buildDirectory, finalName );
+
+        FileOutputStream execWarJarOutputStream = null;
+        ArchiveOutputStream os = null;
+        File tmpPropertiesFile = null;
+        File tmpManifestFile = null;
+        FileOutputStream tmpPropertiesFileOutputStream = null;
+        PrintWriter tmpManifestWriter = null;
+
+        try
+        {
+
+            tmpPropertiesFile = new File( buildDirectory, "war-exec.properties" );
+            if ( tmpPropertiesFile.exists() )
+            {
+                tmpPropertiesFile.delete();
+            }
+            tmpPropertiesFile.getParentFile().mkdirs();
+
+            tmpManifestFile = new File( buildDirectory, "war-exec.manifest" );
+            if ( tmpManifestFile.exists() )
+            {
+                tmpManifestFile.delete();
+            }
+            tmpPropertiesFileOutputStream = new FileOutputStream( tmpPropertiesFile );
+            execWarJar.getParentFile().mkdirs();
+            execWarJar.createNewFile();
+            execWarJarOutputStream = new FileOutputStream( execWarJar );
+
+            tmpManifestWriter = new PrintWriter( tmpManifestFile );
+
+            // store :
+            //* wars in the root: foo.war
+            //* tomcat jars
+            //* file tomcat.standalone.properties with possible values :
+            //   * useServerXml=true/false to use directly the one provided
+            //   * enableNaming=true/false
+            //   * wars=foo.war|contextpath;bar.war  ( |contextpath is optionnal if empty use the war name )
+            //   * accessLogValveFormat=
+            //   * connectorhttpProtocol: HTTP/1.1 or org.apache.coyote.http11.Http11NioProtocol
+            //* optionnal: conf/ with usual tomcat configuration files
+            //* MANIFEST with Main-Class
+
+            Properties properties = new Properties();
+
+            properties.put( Tomcat7Runner.ARCHIVE_GENERATION_TIMESTAMP_KEY,
+                            Long.toString( System.currentTimeMillis() ) );
+            properties.put( Tomcat7Runner.ENABLE_NAMING_KEY, Boolean.toString( enableNaming ) );
+            properties.put( Tomcat7Runner.ACCESS_LOG_VALVE_FORMAT_KEY, accessLogValveFormat );
+            properties.put( Tomcat7Runner.HTTP_PROTOCOL_KEY, connectorHttpProtocol );
+
+            if ( httpPort != null )
+            {
+                properties.put( Tomcat7Runner.HTTP_PORT_KEY, httpPort );
+            }
+
+            os = new ArchiveStreamFactory().createArchiveOutputStream( ArchiveStreamFactory.JAR,
+                                                                       execWarJarOutputStream );
+
+            if ( "war".equals( project.getPackaging() ) )
+            {
+
+                os.putArchiveEntry( new JarArchiveEntry( StringUtils.removeStart( path, "/" ) + ".war" ) );
+                IOUtils.copy( new FileInputStream( projectArtifact.getFile() ), os );
+                os.closeArchiveEntry();
+
+                properties.put( Tomcat7Runner.WARS_KEY, StringUtils.removeStart( path, "/" ) + ".war|" + path );
+            }
+            else if ( warRunDependencies != null && !warRunDependencies.isEmpty() )
+            {
+                for ( WarRunDependency warRunDependency : warRunDependencies )
+                {
+                    if ( warRunDependency.dependency != null )
+                    {
+                        Dependency dependency = warRunDependency.dependency;
+                        String version = dependency.getVersion();
+                        if ( StringUtils.isEmpty( version ) )
+                        {
+                            version = findArtifactVersion( dependency );
+                        }
+
+                        if ( StringUtils.isEmpty( version ) )
+                        {
+                            throw new MojoExecutionException(
+                                "Dependency '" + dependency.getGroupId() + "':'" + dependency.getArtifactId()
+                                    + "' does not have version specified" );
+                        }
+                        Artifact artifact = artifactFactory.createArtifactWithClassifier( dependency.getGroupId(),
+                                                                                          dependency.getArtifactId(),
+                                                                                          version,
+                                                                                          dependency.getType(),
+                                                                                          dependency.getClassifier() );
+
+                        artifactResolver.resolve( artifact, this.remoteRepos, this.local );
+
+                        File warFileToBundle = new File( resolvePluginWorkDir(), artifact.getFile().getName() );
+                        FileUtils.copyFile( artifact.getFile(), warFileToBundle );
+
+                        if ( warRunDependency.contextXml != null )
+                        {
+                            warFileToBundle = addContextXmlToWar( warRunDependency.contextXml, warFileToBundle );
+                        }
+                        final String warFileName = artifact.getFile().getName();
+                        os.putArchiveEntry( new JarArchiveEntry( warFileName ) );
+                        IOUtils.copy( new FileInputStream( warFileToBundle ), os );
+                        os.closeArchiveEntry();
+                        String propertyWarValue = properties.getProperty( Tomcat7Runner.WARS_KEY );
+                        String contextPath =
+                            StringUtils.isEmpty( warRunDependency.contextPath ) ? "/" : warRunDependency.contextPath;
+                        if ( propertyWarValue != null )
+                        {
+                            properties.put( Tomcat7Runner.WARS_KEY,
+                                            propertyWarValue + ";" + warFileName + "|" + contextPath );
+                        }
+                        else
+                        {
+                            properties.put( Tomcat7Runner.WARS_KEY, warFileName + "|" + contextPath );
+                        }
+                    }
+                }
+            }
+
+            if ( serverXml != null && serverXml.exists() )
+            {
+                os.putArchiveEntry( new JarArchiveEntry( "conf/server.xml" ) );
+                IOUtils.copy( new FileInputStream( serverXml ), os );
+                os.closeArchiveEntry();
+                properties.put( Tomcat7Runner.USE_SERVER_XML_KEY, Boolean.TRUE.toString() );
+            }
+            else
+            {
+                properties.put( Tomcat7Runner.USE_SERVER_XML_KEY, Boolean.FALSE.toString() );
+            }
+
+            os.putArchiveEntry( new JarArchiveEntry( "conf/web.xml" ) );
+            IOUtils.copy( getClass().getResourceAsStream( "/conf/web.xml" ), os );
+            os.closeArchiveEntry();
+
+            properties.store( tmpPropertiesFileOutputStream, "created by Apache Tomcat Maven plugin" );
+
+            tmpPropertiesFileOutputStream.flush();
+            tmpPropertiesFileOutputStream.close();
+
+            os.putArchiveEntry( new JarArchiveEntry( Tomcat7RunnerCli.STAND_ALONE_PROPERTIES_FILENAME ) );
+            IOUtils.copy( new FileInputStream( tmpPropertiesFile ), os );
+            os.closeArchiveEntry();
+
+            // add tomcat classes
+            for ( Artifact pluginArtifact : pluginArtifacts )
+            {
+                if ( StringUtils.equals( "org.apache.tomcat", pluginArtifact.getGroupId() ) || StringUtils.equals(
+                    "org.apache.tomcat.embed", pluginArtifact.getGroupId() ) || StringUtils.equals(
+                    "org.eclipse.jdt.core.compiler", pluginArtifact.getGroupId() ) || StringUtils.equals( "commons-cli",
+                                                                                                          pluginArtifact.getArtifactId() )
+                    || StringUtils.equals( "tomcat7-war-runner", pluginArtifact.getArtifactId() ) )
+                {
+                    JarFile jarFile = new JarFile( pluginArtifact.getFile() );
+                    extractJarToArchive( jarFile, os, null );
+                }
+            }
+
+            // add extra dependencies
+            if ( extraDependencies != null && !extraDependencies.isEmpty() )
+            {
+                for ( Dependency dependency : extraDependencies )
+                {
+                    String version = dependency.getVersion();
+                    if ( StringUtils.isEmpty( version ) )
+                    {
+                        version = findArtifactVersion( dependency );
+                    }
+
+                    if ( StringUtils.isEmpty( version ) )
+                    {
+                        throw new MojoExecutionException(
+                            "Dependency '" + dependency.getGroupId() + "':'" + dependency.getArtifactId()
+                                + "' does not have version specified" );
+                    }
+
+                    // String groupId, String artifactId, String version, String scope, String type
+                    Artifact artifact =
+                        artifactFactory.createArtifact( dependency.getGroupId(), dependency.getArtifactId(), version,
+                                                        dependency.getScope(), dependency.getType() );
+
+                    artifactResolver.resolve( artifact, this.remoteRepos, this.local );
+                    JarFile jarFile = new JarFile( artifact.getFile() );
+                    extractJarToArchive( jarFile, os, this.excludes );
+                }
+            }
+
+            Manifest manifest = new Manifest();
+
+            Manifest.Attribute mainClassAtt = new Manifest.Attribute();
+            mainClassAtt.setName( "Main-Class" );
+            mainClassAtt.setValue( mainClass );
+            manifest.addConfiguredAttribute( mainClassAtt );
+
+            manifest.write( tmpManifestWriter );
+            tmpManifestWriter.flush();
+            tmpManifestWriter.close();
+
+            os.putArchiveEntry( new JarArchiveEntry( "META-INF/MANIFEST.MF" ) );
+            IOUtils.copy( new FileInputStream( tmpManifestFile ), os );
+            os.closeArchiveEntry();
+
+            if ( attachArtifact )
+            {
+                //MavenProject project, String artifactType, String artifactClassifier, File artifactFile
+                projectHelper.attachArtifact( project, attachArtifactClassifierType, attachArtifactClassifier,
+                                              execWarJar );
+            }
+
+            if ( extraResources != null )
+            {
+                for ( ExtraResource extraResource : extraResources )
+                {
+
+                    DirectoryScanner directoryScanner = new DirectoryScanner();
+                    directoryScanner.setBasedir( extraResource.getDirectory() );
+                    directoryScanner.addDefaultExcludes();
+                    directoryScanner.setExcludes( toStringArray( extraResource.getExcludes() ) );
+                    directoryScanner.setIncludes( toStringArray( extraResource.getIncludes() ) );
+                    directoryScanner.scan();
+                    for ( String includeFile : directoryScanner.getIncludedFiles() )
+                    {
+                        getLog().debug( "include file:" + includeFile );
+                        os.putArchiveEntry( new JarArchiveEntry( includeFile ) );
+                        IOUtils.copy( new FileInputStream( new File( extraResource.getDirectory(), includeFile ) ),
+                                      os );
+                        os.closeArchiveEntry();
+                    }
+                }
+            }
+
+            if ( tomcatConfigurationFilesDirectory != null && tomcatConfigurationFilesDirectory.exists() )
+            {
+                // Because its the tomcat default dir for configs
+                String aConfigOutputDir = "conf/";
+                copyDirectoryContentIntoArchive( tomcatConfigurationFilesDirectory, aConfigOutputDir, os );
+            }
+
+        }
+        catch ( ManifestException e )
+        {
+            throw new MojoExecutionException( e.getMessage(), e );
+        }
+        catch ( IOException e )
+        {
+            throw new MojoExecutionException( e.getMessage(), e );
+        }
+        catch ( ArchiveException e )
+        {
+            throw new MojoExecutionException( e.getMessage(), e );
+        }
+        catch ( ArtifactNotFoundException e )
+        {
+            throw new MojoExecutionException( e.getMessage(), e );
+        }
+        catch ( ArtifactResolutionException e )
+        {
+            throw new MojoExecutionException( e.getMessage(), e );
+        }
+        finally
+        {
+            IOUtils.closeQuietly( os );
+            IOUtils.closeQuietly( tmpManifestWriter );
+            IOUtils.closeQuietly( execWarJarOutputStream );
+            IOUtils.closeQuietly( tmpPropertiesFileOutputStream );
+        }
+    }
+
+    protected String findArtifactVersion( Dependency dependency )
+    {
+        // search in project.dependencies
+        for ( Dependency projectDependency : (List<Dependency>) this.project.getDependencies() )
+        {
+            if ( sameDependencyWithoutVersion( dependency, projectDependency ) )
+            {
+                return projectDependency.getVersion();
+            }
+        }
+
+        // search in project.dependencies
+        for ( Dependency projectDependency : (List<Dependency>) this.project.getDependencyManagement().getDependencies() )
+        {
+            if ( sameDependencyWithoutVersion( dependency, projectDependency ) )
+            {
+                return projectDependency.getVersion();
+            }
+        }
+
+        return null;
+    }
+
+    protected boolean sameDependencyWithoutVersion( Dependency that, Dependency dependency )
+    {
+        return StringUtils.equals( that.getGroupId(), dependency.getGroupId() ) && StringUtils.equals(
+            that.getArtifactId(), dependency.getArtifactId() );
+    }
+
+    protected void copyDirectoryContentIntoArchive( File sourceFolder, String destinationPath,
+                                                    ArchiveOutputStream archiveOutputStream )
+        throws IOException
+    {
+
+        // Scan the directory
+        DirectoryScanner directoryScanner = new DirectoryScanner();
+        directoryScanner.setBasedir( sourceFolder );
+        directoryScanner.addDefaultExcludes();
+        directoryScanner.scan();
+
+        // Each File
+        for ( String includeFileName : directoryScanner.getIncludedFiles() )
+        {
+            getLog().debug( "include configuration file : " + destinationPath + includeFileName );
+            File inputFile = new File( sourceFolder, includeFileName );
+
+            FileInputStream sourceFileInputStream = null;
+            try
+            {
+                sourceFileInputStream = new FileInputStream( inputFile );
+
+                archiveOutputStream.putArchiveEntry( new JarArchiveEntry( destinationPath + includeFileName ) );
+                IOUtils.copy( sourceFileInputStream, archiveOutputStream );
+                archiveOutputStream.closeArchiveEntry();
+            }
+            finally
+            {
+                IOUtils.closeQuietly( sourceFileInputStream );
+            }
+        }
+
+    }
+
+    /**
+     * Resolves the plugin work dir as a sub directory of {@link #buildDirectory}, creating it if it does not exist.
+     *
+     * @return File representing the resolved plugin work dir
+     * @throws MojoExecutionException if the plugin work dir cannot be created
+     */
+    protected File resolvePluginWorkDir()
+        throws MojoExecutionException
+    {
+        if ( !pluginWorkDirectory.exists() && !pluginWorkDirectory.mkdirs() )
+        {
+            throw new MojoExecutionException(
+                "Could not create plugin work directory at " + pluginWorkDirectory.getAbsolutePath() );
+        }
+
+        return pluginWorkDirectory;
+
+    }
+
+    protected String[] toStringArray( List list )
+    {
+        if ( list == null || list.isEmpty() )
+        {
+            return new String[0];
+        }
+        List<String> res = new ArrayList<String>( list.size() );
+
+        for ( Iterator ite = list.iterator(); ite.hasNext(); )
+        {
+            res.add( (String) ite.next() );
+        }
+        return res.toArray( new String[res.size()] );
+    }
+
+
+    /**
+     * return file can be deleted
+     */
+    protected File addContextXmlToWar( File contextXmlFile, File warFile )
+        throws IOException, ArchiveException
+    {
+        ArchiveOutputStream os = null;
+        OutputStream warOutputStream = null;
+        File tmpWar = File.createTempFile( "tomcat", "war-exec" );
+        tmpWar.deleteOnExit();
+
+        try
+        {
+            warOutputStream = new FileOutputStream( tmpWar );
+            os = new ArchiveStreamFactory().createArchiveOutputStream( ArchiveStreamFactory.JAR, warOutputStream );
+            os.putArchiveEntry( new JarArchiveEntry( "META-INF/context.xml" ) );
+            IOUtils.copy( new FileInputStream( contextXmlFile ), os );
+            os.closeArchiveEntry();
+
+            JarFile jarFile = new JarFile( warFile );
+            extractJarToArchive( jarFile, os, null );
+            os.flush();
+        }
+        finally
+        {
+            IOUtils.closeQuietly( os );
+            IOUtils.closeQuietly( warOutputStream );
+        }
+        return tmpWar;
+    }
+
+    /**
+     * Copy the contents of a jar file to another archive
+     *
+     * @param file The input jar file
+     * @param os   The output archive
+     * @throws IOException
+     */
+    protected void extractJarToArchive( JarFile file, ArchiveOutputStream os, String[] excludes )
+        throws IOException
+    {
+        Enumeration<? extends JarEntry> entries = file.entries();
+        while ( entries.hasMoreElements() )
+        {
+            JarEntry j = entries.nextElement();
+
+            if ( excludes != null && excludes.length > 0 )
+            {
+                for ( String exclude : excludes )
+                {
+                    if ( SelectorUtils.match( exclude, j.getName() ) )
+                    {
+                        continue;
+                    }
+                }
+            }
+
+            if ( StringUtils.equalsIgnoreCase( j.getName(), "META-INF/MANIFEST.MF" ) )
+            {
+                continue;
+            }
+            os.putArchiveEntry( new JarArchiveEntry( j.getName() ) );
+            IOUtils.copy( file.getInputStream( j ), os );
+            os.closeArchiveEntry();
+        }
+        if ( file != null )
+        {
+            file.close();
+        }
+    }
+}
diff --git a/tomcat8-maven-plugin/src/main/java/org/apache/tomcat/maven/plugin/tomcat8/run/AbstractRunMojo.java b/tomcat8-maven-plugin/src/main/java/org/apache/tomcat/maven/plugin/tomcat8/run/AbstractRunMojo.java
new file mode 100644
index 0000000..9d7a858
--- /dev/null
+++ b/tomcat8-maven-plugin/src/main/java/org/apache/tomcat/maven/plugin/tomcat8/run/AbstractRunMojo.java
@@ -0,0 +1,1614 @@
+package org.apache.tomcat.maven.plugin.tomcat8.run;
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import org.apache.catalina.Context;
+import org.apache.catalina.Host;
+import org.apache.catalina.LifecycleException;
+import org.apache.catalina.WebResource;
+import org.apache.catalina.WebResourceSet;
+import org.apache.catalina.Wrapper;
+import org.apache.catalina.connector.Connector;
+import org.apache.catalina.core.StandardContext;
+import org.apache.catalina.loader.WebappLoader;
+import org.apache.catalina.realm.MemoryRealm;
+import org.apache.catalina.servlets.DefaultServlet;
+import org.apache.catalina.startup.Catalina;
+import org.apache.catalina.startup.CatalinaProperties;
+import org.apache.catalina.startup.Tomcat;
+import org.apache.catalina.valves.AccessLogValve;
+import org.apache.catalina.webresources.FileResource;
+import org.apache.catalina.webresources.StandardRoot;
+import org.apache.commons.io.IOUtils;
+import org.apache.commons.lang.StringUtils;
+import org.apache.maven.artifact.Artifact;
+import org.apache.maven.artifact.factory.ArtifactFactory;
+import org.apache.maven.artifact.repository.ArtifactRepository;
+import org.apache.maven.artifact.resolver.ArtifactNotFoundException;
+import org.apache.maven.artifact.resolver.ArtifactResolutionException;
+import org.apache.maven.artifact.resolver.ArtifactResolver;
+import org.apache.maven.artifact.resolver.filter.ScopeArtifactFilter;
+import org.apache.maven.artifact.versioning.InvalidVersionSpecificationException;
+import org.apache.maven.artifact.versioning.VersionRange;
+import org.apache.maven.execution.MavenSession;
+import org.apache.maven.plugin.MojoExecutionException;
+import org.apache.maven.plugin.MojoFailureException;
+import org.apache.maven.plugins.annotations.Component;
+import org.apache.maven.plugins.annotations.Parameter;
+import org.apache.maven.project.MavenProject;
+import org.apache.maven.shared.filtering.MavenFileFilter;
+import org.apache.maven.shared.filtering.MavenFileFilterRequest;
+import org.apache.maven.shared.filtering.MavenFilteringException;
+import org.apache.tomcat.JarScanner;
+import org.apache.tomcat.maven.common.config.AbstractWebapp;
+import org.apache.tomcat.maven.common.run.EmbeddedRegistry;
+import org.apache.tomcat.maven.common.run.ExternalRepositoriesReloadableWebappLoader;
+import org.apache.tomcat.maven.plugin.tomcat8.AbstractTomcat7Mojo;
+import org.apache.tomcat.util.scan.StandardJarScanner;
+import org.codehaus.plexus.archiver.ArchiverException;
+import org.codehaus.plexus.archiver.UnArchiver;
+import org.codehaus.plexus.archiver.manager.ArchiverManager;
+import org.codehaus.plexus.archiver.manager.NoSuchArchiverException;
+import org.codehaus.plexus.classworlds.ClassWorld;
+import org.codehaus.plexus.classworlds.realm.ClassRealm;
+import org.codehaus.plexus.classworlds.realm.DuplicateRealmException;
+import org.codehaus.plexus.util.DirectoryScanner;
+import org.codehaus.plexus.util.FileUtils;
+import org.w3c.dom.Document;
+import org.w3c.dom.NamedNodeMap;
+import org.w3c.dom.Node;
+import org.xml.sax.SAXException;
+
+import javax.servlet.ServletException;
+import javax.xml.parsers.DocumentBuilder;
+import javax.xml.parsers.DocumentBuilderFactory;
+import javax.xml.parsers.ParserConfigurationException;
+import javax.xml.stream.XMLInputFactory;
+import javax.xml.stream.XMLStreamConstants;
+import javax.xml.stream.XMLStreamException;
+import javax.xml.stream.XMLStreamReader;
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileNotFoundException;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+import java.util.Properties;
+import java.util.Set;
+
+/**
+ * @author Olivier Lamy
+ * @since 2.0
+ */
+public abstract class AbstractRunMojo
+    extends AbstractTomcat7Mojo
+{
+    // ---------------------------------------------------------------------
+    // Mojo Components
+    // ---------------------------------------------------------------------
+
+    /**
+     * Used to look up Artifacts in the remote repository.
+     */
+    @Component
+    protected ArtifactFactory factory;
+
+    /**
+     * Location of the local repository.
+     */
+    @Parameter( defaultValue = "${localRepository}", required = true, readonly = true )
+    private ArtifactRepository local;
+
+    /**
+     * Used to look up Artifacts in the remote repository.
+     */
+    @Component
+    protected ArtifactResolver resolver;
+
+    // ----------------------------------------------------------------------
+    // Mojo Parameters
+    // ----------------------------------------------------------------------
+
+    /**
+     * The packaging of the Maven project that this goal operates upon.
+     */
+    @Parameter( defaultValue = "${project.packaging}", required = true, readonly = true )
+    private String packaging;
+
+    /**
+     * The directory to create the Tomcat server configuration under.
+     */
+    @Parameter( defaultValue = "${project.build.directory}/tomcat" )
+    private File configurationDir;
+
+    /**
+     * The port to run the Tomcat server on.
+     * Will be exposed as System props and session.executionProperties with key tomcat.maven.http.port
+     */
+    @Parameter( property = "maven.tomcat.port", defaultValue = "8080" )
+    private int port;
+
+    /**
+     * this IP address will be used on all ports
+     *
+     * @since 2.2
+     */
+    @Parameter( property = "maven.tomcat.address" )
+    private String address;
+
+    /**
+     * The AJP port to run the Tomcat server on.
+     * By default it's 0 this means won't be started.
+     * The ajp connector will be started only for value > 0.
+     * Will be exposed as System props and session.executionProperties with key tomcat.maven.ajp.port
+     *
+     * @since 2.0
+     */
+    @Parameter( property = "maven.tomcat.ajp.port", defaultValue = "0" )
+    private int ajpPort;
+
+    /**
+     * The AJP protocol to run the Tomcat server on.
+     * By default it's ajp.
+     * NOTE The ajp connector will be started only if {@link #ajpPort} > 0.
+     * possible values are:
+     * <ul>
+     * <li>org.apache.coyote.ajp.AjpProtocol - new blocking Java connector that supports an executor</li>
+     * <li>org.apache.coyote.ajp.AjpAprProtocol - the APR/native connector.</li>
+     * </ul>
+     *
+     * @since 2.0
+     */
+    @Parameter( property = "maven.tomcat.ajp.protocol", defaultValue = "org.apache.coyote.ajp.AjpProtocol" )
+    private String ajpProtocol;
+
+    /**
+     * The https port to run the Tomcat server on.
+     * By default it's 0 this means won't be started.
+     * The https connector will be started only for value > 0.
+     * Will be exposed as System props and session.executionProperties with key tomcat.maven.https.port
+     *
+     * @since 1.0
+     */
+    @Parameter( property = "maven.tomcat.httpsPort", defaultValue = "0" )
+    private int httpsPort;
+
+    /**
+     * The max post size to run the Tomcat server on.
+     * By default it's 2097152 bytes. That's the default Tomcat configuration.
+     * Set this value to 0 or less to disable the post size limit.
+     *
+     * @since 2.3
+     */
+    @Parameter( property = "maven.tomcat.maxPostSize", defaultValue = "2097152" )
+    private int maxPostSize;
+
+    /**
+     * The character encoding to use for decoding URIs.
+     *
+     * @since 1.0
+     */
+    @Parameter( property = "maven.tomcat.uriEncoding", defaultValue = "ISO-8859-1" )
+    private String uriEncoding;
+
+    /**
+     * List of System properties to pass to the Tomcat Server.
+     *
+     * @since 1.0-alpha-2
+     */
+    @Parameter
+    private Map<String, String> systemProperties;
+
+    /**
+     * The directory contains additional configuration Files that copied in the Tomcat conf Directory.
+     *
+     * @since 1.0-alpha-2
+     */
+    @Parameter( property = "maven.tomcat.additionalConfigFilesDir", defaultValue = "${basedir}/src/main/tomcatconf" )
+    private File additionalConfigFilesDir;
+
+    /**
+     * server.xml to use <b>Note if you use this you must configure in this file your webapp paths</b>.
+     *
+     * @since 1.0-alpha-2
+     */
+    @Parameter( property = "maven.tomcat.serverXml" )
+    private File serverXml;
+
+    /**
+     * overriding the providing web.xml to run tomcat
+     * <b>This override the global Tomcat web.xml located in $CATALINA_HOME/conf/</b>
+     *
+     * @since 1.0-alpha-2
+     */
+    @Parameter( property = "maven.tomcat.webXml" )
+    private File tomcatWebXml;
+
+    /**
+     * Set this to true to allow Maven to continue to execute after invoking
+     * the run goal.
+     *
+     * @since 1.0
+     */
+    @Parameter( property = "maven.tomcat.fork", defaultValue = "false" )
+    private boolean fork;
+
+    /**
+     * Will create a tomcat context for each dependencies of war type with 'scope' set to 'tomcat'.
+     * In other words, dependencies with:
+     * <pre>
+     *    &lt;type&gt;war&lt;/type&gt;
+     *    &lt;scope&gt;tomcat&lt;/scope&gt;
+     * </pre>
+     * To preserve backward compatibility it's false by default.
+     *
+     * @since 1.0
+     * @deprecated use webapps instead
+     */
+    @Parameter( property = "maven.tomcat.addContextWarDependencies", defaultValue = "false" )
+    private boolean addContextWarDependencies;
+
+    /**
+     * The maven project.
+     *
+     * @since 1.0
+     */
+    @Component
+    protected MavenProject project;
+
+    /**
+     * The archive manager.
+     *
+     * @since 1.0
+     */
+    @Component
+    private ArchiverManager archiverManager;
+
+    /**
+     * if <code>true</code> a new classLoader separated from maven core will be created to start tomcat.
+     *
+     * @since 1.0
+     */
+    @Parameter( property = "tomcat.useSeparateTomcatClassLoader", defaultValue = "false" )
+    protected boolean useSeparateTomcatClassLoader;
+
+    /**
+     * @since 1.0
+     */
+    @Parameter( defaultValue = "${plugin.artifacts}", required = true )
+    private List<Artifact> pluginArtifacts;
+
+    /**
+     * If set to true ignore if packaging of project is not 'war'.
+     *
+     * @since 1.0
+     */
+    @Parameter( property = "tomcat.ignorePackaging", defaultValue = "false" )
+    private boolean ignorePackaging;
+
+    /**
+     * Override the default keystoreFile for the HTTPS connector (if enabled)
+     *
+     * @since 1.1
+     */
+    @Parameter
+    private String keystoreFile;
+
+    /**
+     * Override the default keystorePass for the HTTPS connector (if enabled)
+     *
+     * @since 1.1
+     */
+    @Parameter
+    private String keystorePass;
+
+    /**
+     * Override the type of keystore file to be used for the server certificate. If not specified, the default value is "JKS".
+     *
+     * @since 2.0
+     */
+    @Parameter( defaultValue = "JKS" )
+    private String keystoreType;
+
+    /**
+     * <p>
+     * Enables or disables naming support for the embedded Tomcat server.
+     * </p>
+     * <p>
+     * <strong>Note:</strong> This setting is ignored if you provide a <code>server.xml</code> for your
+     * Tomcat. Instead please configure naming in the <code>server.xml</code>.
+     * </p>
+     *
+     * @see <a href="http://tomcat.apache.org/tomcat-6.0-doc/api/org/apache/catalina/startup/Embedded.html">org.apache.catalina.startup.Embedded</a>
+     * @see <a href="http://tomcat.apache.org/tomcat-7.0-doc/api/org/apache/catalina/startup/Tomcat.html">org.apache.catalina.startup.Tomcat</a>
+     * @since 2.0
+     */
+    @Parameter( property = "maven.tomcat.useNaming", defaultValue = "true" )
+    private boolean useNaming;
+
+    /**
+     * Force context scanning if you don't use a context file with reloadable = "true".
+     * The other way to use contextReloadable is to add attribute reloadable = "true"
+     * in your context file.
+     *
+     * @since 2.0
+     */
+    @Parameter( property = "maven.tomcat.contextReloadable", defaultValue = "false" )
+    protected boolean contextReloadable;
+
+    /**
+     * represents the delay in seconds between each classPathScanning change invocation
+     *
+     * @see <a href="http://tomcat.apache.org/tomcat-7.0-doc/config/context.html">http://tomcat.apache.org/tomcat-7.0-doc/config/context.html</a>
+     */
+    @Parameter( property = "maven.tomcat.backgroundProcessorDelay", defaultValue = "-1" )
+    protected int backgroundProcessorDelay = -1;
+
+
+    /**
+     * <p>The path of the Tomcat context XML file.</p>
+     * <p>Since release 2.0, the file is filtered as a maven resource so you can use
+     * interpolation tokens ${ }</p>
+     */
+    @Parameter( property = "maven.tomcat.contextFile" )
+    protected File contextFile;
+
+    /**
+     * The default context file to check for if contextFile not configured.
+     * If no contextFile configured and the below default not present, no
+     * contextFile will be sent to Tomcat, resulting in the latter's default
+     * context configuration being used instead.
+     */
+    @Parameter( defaultValue = "${project.build.directory}/${project.build.finalName}/META-INF/context.xml",
+                readonly = true )
+    private File defaultContextFile;
+
+    /**
+     * The protocol to run the Tomcat server on.
+     * By default it's HTTP/1.1.
+     * See possible values <a href="http://tomcat.apache.org/tomcat-7.0-doc/config/http.html">HTTP Connector</a>
+     * protocol attribute
+     *
+     * @since 2.0
+     */
+    @Parameter( property = "maven.tomcat.protocol", defaultValue = "HTTP/1.1" )
+    private String protocol;
+
+    /**
+     * The path of the Tomcat users XML file.
+     *
+     * @since 2.0
+     */
+    @Parameter( property = "maven.tomcat.tomcatUsers.file" )
+    private File tomcatUsers;
+
+    /**
+     * The path of the Tomcat logging configuration.
+     *
+     * @since 2.0
+     */
+    @Parameter( property = "maven.tomcat.tomcatLogging.file" )
+    private File tomcatLoggingFile;
+
+    /**
+     * Skip execution
+     *
+     * @since 2.0
+     */
+    @Parameter( property = "maven.tomcat.skip", defaultValue = "false" )
+    protected boolean skip;
+
+    /**
+     * Collection of webapp artifacts to be deployed. Elements are &lt;webapp&gt; and contain
+     * usual GAVC plus contextPath and/or contextFile elements.<p>
+     *
+     * @see {@link Webapp}
+     * @since 2.0
+     */
+    @Parameter
+    private List<Webapp> webapps;
+
+    /**
+     * The static context
+     *
+     * @since 2.0
+     */
+    @Parameter( property = "maven.tomcat.staticContextPath", defaultValue = "/" )
+    private String staticContextPath;
+
+    /**
+     * The static context docroot base fully qualified path
+     * if <code>null</code> static context won't be added
+     *
+     * @since 2.0
+     */
+    @Parameter( property = "maven.tomcat.staticContextDocbase" )
+    private String staticContextDocbase;
+
+    /**
+     * Class loader class to set.
+     *
+     * @since 2.0
+     */
+    @Parameter
+    protected String classLoaderClass;
+
+    @Parameter( defaultValue = "${session}", readonly = true, required = true )
+    protected MavenSession session;
+
+    /**
+     * Will dump port in a properties file (see ports for property names).
+     * If empty no file generated
+     */
+    @Parameter( property = "maven.tomcat.propertiesPortFilePath" )
+    protected String propertiesPortFilePath;
+
+    /**
+     * configure host name
+     *
+     * @since 2.0
+     */
+    @Parameter( property = "maven.tomcat.hostName", defaultValue = "localhost" )
+    protected String hostName;
+
+    /**
+     * configure aliases
+     * see <a href="http://tomcat.apache.org/tomcat-7.0-doc/config/host.html#Host_Name_Aliases">Host Name aliases</a>
+     *
+     * @since 2.0
+     */
+    @Parameter
+    protected String[] aliases;
+
+    /**
+     * enable client authentication for https (if configured)
+     * see <a href="http://tomcat.apache.org/tomcat-7.0-doc/config/http.html#SSL_Support_-_BIO_and_NIO">http://tomcat.apache.org/tomcat-7.0-doc/config/http.html#SSL_Support_-_BIO_and_NIO</a>
+     *
+     * @since 2.1
+     */
+    @Parameter( property = "maven.tomcat.https.clientAuth", defaultValue = "false" )
+    protected String clientAuth = "false";
+
+    @Component( role = MavenFileFilter.class, hint = "default" )
+    protected MavenFileFilter mavenFileFilter;
+
+
+    /**
+     * In case a module in your reactors has some web-fragments they will be read.
+     * If you don't need that for performance reasons, you can deactivate it.
+     *
+     * @since 2.2
+     */
+    @Parameter( property = "maven.tomcat.jarScan.allDirectories", defaultValue = "true" )
+    protected boolean jarScanAllDirectories = true;
+
+    /**
+     * @since 2.2
+     */
+    @Parameter( property = "maven.tomcat.useBodyEncodingForURI", defaultValue = "false" )
+    protected boolean useBodyEncodingForURI;
+
+    /**
+     * @since 2.2
+     */
+    @Parameter
+    protected String trustManagerClassName;
+
+    /**
+     * @since 2.2
+     */
+    @Parameter
+    protected String trustMaxCertLength;
+
+    /**
+     * @since 2.2
+     */
+    @Parameter
+    protected String truststoreAlgorithm;
+
+    /**
+     * @since 2.2
+     */
+    @Parameter
+    protected String truststoreFile;
+
+    /**
+     * @since 2.2
+     */
+    @Parameter
+    protected String truststorePass;
+
+    /**
+     * @since 2.2
+     */
+    @Parameter
+    protected String truststoreProvider;
+
+    /**
+     * @since 2.2
+     */
+    @Parameter
+    protected String truststoreType;
+
+    // ----------------------------------------------------------------------
+    // Fields
+    // ----------------------------------------------------------------------
+
+    /**
+     * @since 1.0
+     */
+    private ClassRealm tomcatRealm;
+
+    // ----------------------------------------------------------------------
+    // Mojo Implementation
+    // ----------------------------------------------------------------------
+
+    /**
+     * {@inheritDoc}
+     */
+    public void execute()
+        throws MojoExecutionException, MojoFailureException
+    {
+        if ( skip )
+        {
+            getLog().info( "skip execution" );
+            return;
+        }
+        // ensure project is a web application
+        if ( !isWar() && !addContextWarDependencies && getAdditionalWebapps().isEmpty() )
+        {
+            getLog().info( messagesProvider.getMessage( "AbstractRunMojo.nonWar" ) );
+            return;
+        }
+        ClassLoader originalClassLoader = null;
+        if ( useSeparateTomcatClassLoader )
+        {
+            originalClassLoader = Thread.currentThread().getContextClassLoader();
+        }
+        try
+        {
+            getLog().info( messagesProvider.getMessage( "AbstractRunMojo.runningWar", getWebappUrl() ) );
+
+            initConfiguration();
+            startContainer();
+            if ( !fork )
+            {
+                waitIndefinitely();
+            }
+        }
+        catch ( LifecycleException exception )
+        {
+            throw new MojoExecutionException( messagesProvider.getMessage( "AbstractRunMojo.cannotStart" ), exception );
+        }
+        catch ( IOException exception )
+        {
+            throw new MojoExecutionException(
+                messagesProvider.getMessage( "AbstractRunMojo.cannotCreateConfiguration" ), exception );
+        }
+        catch ( ServletException e )
+        {
+            throw new MojoExecutionException( e.getMessage(), e );
+        }
+        catch ( MavenFilteringException e )
+        {
+            throw new MojoExecutionException( "filtering issue: " + e.getMessage(), e );
+        }
+        finally
+        {
+            if ( useSeparateTomcatClassLoader )
+            {
+                Thread.currentThread().setContextClassLoader( originalClassLoader );
+            }
+        }
+    }
+
+    // ----------------------------------------------------------------------
+    // Protected Methods
+    // ----------------------------------------------------------------------
+
+    /**
+     * Gets the webapp context path to use for the web application being run.
+     *
+     * @return the webapp context path
+     */
+    protected String getPath()
+    {
+        return path;
+    }
+
+    protected void enhanceContext( final Context context )
+        throws MojoExecutionException
+    {
+        // no op
+    }
+
+
+    /**
+     * Gets the context to run this web application under for the specified embedded Tomcat.
+     *
+     * @param container the embedded Tomcat container being used
+     * @return the context to run this web application under
+     * @throws IOException            if the context could not be created
+     * @throws MojoExecutionException in case of an error creating the context
+     */
+    protected Context createContext( Tomcat container )
+        throws IOException, MojoExecutionException, ServletException
+    {
+        String contextPath = getPath();
+
+        String baseDir = getDocBase().getAbsolutePath();
+
+        File overriddenContextFile = getContextFile();
+
+        StandardContext standardContext = null;
+
+        if ( overriddenContextFile != null && overriddenContextFile.exists() )
+        {
+            standardContext = parseContextFile( overriddenContextFile );
+        }
+        else if ( defaultContextFile.exists() )
+        {
+            standardContext = parseContextFile( defaultContextFile );
+        }
+
+        if ( standardContext != null )
+        {
+            if ( standardContext.getPath() != null )
+            {
+                contextPath = standardContext.getPath();
+            }
+            if ( standardContext.getDocBase() != null )
+            {
+                baseDir = standardContext.getDocBase();
+            }
+        }
+
+        contextPath = "/".equals( contextPath ) ? "" : contextPath;
+
+        getLog().info( "create webapp with contextPath: " + contextPath );
+
+        Context context = container.addWebapp( contextPath, baseDir );
+
+        context.setResources(
+            new MyDirContext( new File( project.getBuild().getOutputDirectory() ).getAbsolutePath(), getPath() ) );
+
+        if ( useSeparateTomcatClassLoader )
+        {
+            context.setParentClassLoader( getTomcatClassLoader() );
+        }
+
+        enhanceContext( context );
+
+        final WebappLoader loader = createWebappLoader();
+
+        context.setLoader( loader );
+
+        if ( overriddenContextFile != null )
+        {
+            // here, send file to Tomcat for it to complain if missing
+            context.setConfigFile( overriddenContextFile.toURI().toURL() );
+        }
+        else if ( defaultContextFile.exists() )
+        {
+            // here, only sending default file if it indeed exists
+            // otherwise Tomcat will create a default context
+            context.setConfigFile( defaultContextFile.toURI().toURL() );
+        }
+
+        if ( classLoaderClass != null )
+        {
+            loader.setLoaderClass( classLoaderClass );
+        }
+
+        // https://issues.apache.org/jira/browse/MTOMCAT-239
+        // get the jar scanner to configure scanning directories as we can run a jar or a reactor project with a jar so
+        // the entries is a directory (target/classes)
+        JarScanner jarScanner = context.getJarScanner();
+
+        // normally this one only but just in case ...
+        if ( jarScanner instanceof StandardJarScanner )
+        {
+            ( (StandardJarScanner) jarScanner ).setScanAllDirectories( jarScanAllDirectories );
+        }
+
+        return context;
+
+    }
+
+    protected StandardContext parseContextFile( File file )
+        throws MojoExecutionException
+    {
+        try
+        {
+            StandardContext standardContext = new StandardContext();
+            XMLStreamReader reader = XMLInputFactory.newFactory().createXMLStreamReader( new FileInputStream( file ) );
+
+            int tag = reader.next();
+
+            while ( true )
+            {
+                if ( tag == XMLStreamConstants.START_ELEMENT && StringUtils.equals( "Context", reader.getLocalName() ) )
+                {
+                    String path = reader.getAttributeValue( null, "path" );
+                    if ( StringUtils.isNotBlank( path ) )
+                    {
+                        standardContext.setPath( path );
+                    }
+
+                    String docBase = reader.getAttributeValue( null, "docBase" );
+                    if ( StringUtils.isNotBlank( docBase ) )
+                    {
+                        standardContext.setDocBase( docBase );
+                    }
+                }
+                if ( !reader.hasNext() )
+                {
+                    break;
+                }
+                tag = reader.next();
+            }
+
+            return standardContext;
+        }
+        catch ( XMLStreamException e )
+        {
+            throw new MojoExecutionException( e.getMessage(), e );
+        }
+        catch ( FileNotFoundException e )
+        {
+            throw new MojoExecutionException( e.getMessage(), e );
+        }
+    }
+
+
+    private static class MyDirContext
+        extends StandardRoot
+    {
+        String buildOutputDirectory;
+
+        String webAppPath;
+
+        WebResourceSet webResourceSet;
+
+        MyDirContext( String buildOutputDirectory, String webAppPath )
+        {
+            this.buildOutputDirectory = buildOutputDirectory;
+            this.webAppPath = webAppPath;
+        }
+
+        @Override
+        public String[] list( String path )
+        {
+            return super.list( path );
+        }
+
+        @Override
+        public WebResource getResource( String path )
+        {
+            File file = new File( path );
+            if ( file.exists() )
+            {
+                return new FileResource( this, this.webAppPath, file, true );
+            }
+            WebResource webResource = super.getResource( path );
+            return webResource;
+        }
+
+        @Override
+        public WebResource getClassLoaderResource( String path )
+        {
+            if ( this.webResourceSet != null )
+            {
+                WebResource webResource = this.webResourceSet.getResource( path );
+                return webResource;
+            }
+
+            return super.getClassLoaderResource( path );
+        }
+
+        @Override
+        public void addJarResources( WebResourceSet webResourceSet )
+        {
+            this.webResourceSet = webResourceSet;
+        }
+    }
+
+    /**
+     * Gets the webapp loader to run this web application under.
+     *
+     * @return the webapp loader to use
+     * @throws IOException            if the webapp loader could not be created
+     * @throws MojoExecutionException in case of an error creating the webapp loader
+     */
+    protected WebappLoader createWebappLoader()
+        throws IOException, MojoExecutionException
+    {
+        WebappLoader webappLoader = null;
+        if ( useSeparateTomcatClassLoader )
+        {
+            if ( isContextReloadable() )
+            {
+                webappLoader = new ExternalRepositoriesReloadableWebappLoader( getTomcatClassLoader(), getLog() );
+            }
+            else
+            {
+                webappLoader = new WebappLoader( getTomcatClassLoader() );
+                webappLoader.setLoaderClass( MavenWebappClassLoader.class.getName() );
+            }
+        }
+        else
+        {
+            if ( isContextReloadable() )
+            {
+                webappLoader =
+                    new ExternalRepositoriesReloadableWebappLoader( Thread.currentThread().getContextClassLoader(),
+                                                                    getLog() );
+            }
+            else
+            {
+                webappLoader = new WebappLoader( Thread.currentThread().getContextClassLoader() );
+                webappLoader.setLoaderClass( MavenWebappClassLoader.class.getName() );
+            }
+        }
+        return webappLoader;
+    }
+
+    /**
+     * Determine whether the passed context.xml file declares the context as reloadable or not.
+     *
+     * @return false by default, true if  reloadable="true" in context.xml.
+     */
+    protected boolean isContextReloadable()
+        throws MojoExecutionException
+    {
+        if ( contextReloadable || backgroundProcessorDelay > 0 )
+        {
+            return true;
+        }
+        // determine whether to use a reloadable Loader or not (default is false).
+        boolean reloadable = false;
+        try
+        {
+            if ( contextFile != null && contextFile.exists() )
+            {
+                DocumentBuilderFactory builderFactory = DocumentBuilderFactory.newInstance();
+                DocumentBuilder builder = builderFactory.newDocumentBuilder();
+                Document contextDoc = builder.parse( contextFile );
+                contextDoc.getDocumentElement().normalize();
+
+                NamedNodeMap nodeMap = contextDoc.getDocumentElement().getAttributes();
+                Node reloadableAttribute = nodeMap.getNamedItem( "reloadable" );
+
+                reloadable =
+                    ( reloadableAttribute != null ) ? Boolean.valueOf( reloadableAttribute.getNodeValue() ) : false;
+            }
+            getLog().debug( "context reloadable: " + reloadable );
+        }
+        catch ( IOException ioe )
+        {
+            getLog().error( "Could not parse file: [" + contextFile.getAbsolutePath() + "]", ioe );
+        }
+        catch ( ParserConfigurationException pce )
+        {
+            getLog().error( "Could not configure XML parser", pce );
+        }
+        catch ( SAXException se )
+        {
+            getLog().error( "Could not parse file: [" + contextFile.getAbsolutePath() + "]", se );
+        }
+
+        return reloadable;
+    }
+
+
+    /**
+     * Gets the webapp directory to run.
+     *
+     * @return the webapp directory
+     */
+    protected abstract File getDocBase()
+        throws IOException;
+
+    /**
+     * Gets the Tomcat context XML file to use.
+     *
+     * @return the context XML file
+     */
+    protected abstract File getContextFile()
+        throws MojoExecutionException;
+
+    // ----------------------------------------------------------------------
+    // Private Methods
+    // ----------------------------------------------------------------------
+
+    /**
+     * Gets whether this project uses WAR packaging.
+     *
+     * @return whether this project uses WAR packaging
+     */
+    protected boolean isWar()
+    {
+        return "war".equals( packaging ) || ignorePackaging;
+    }
+
+    /**
+     * Gets the URL of the running webapp.
+     *
+     * @return the URL of the running webapp
+     * @throws java.net.MalformedURLException if the running webapp URL is invalid
+     */
+    private URL getWebappUrl()
+        throws MalformedURLException
+    {
+        return new URL( "http", "localhost", port, getPath() );
+    }
+
+    /**
+     * FIXME not sure we need all of those files with tomcat7
+     * Creates the Tomcat configuration directory with the necessary resources.
+     *
+     * @throws IOException            if the Tomcat configuration could not be created
+     * @throws MojoExecutionException if the Tomcat configuration could not be created
+     */
+    private void initConfiguration()
+        throws IOException, MojoExecutionException, MavenFilteringException
+    {
+        if ( configurationDir.exists() )
+        {
+            getLog().info( messagesProvider.getMessage( "AbstractRunMojo.usingConfiguration", configurationDir ) );
+        }
+        else
+        {
+            getLog().info( messagesProvider.getMessage( "AbstractRunMojo.creatingConfiguration", configurationDir ) );
+
+            configurationDir.mkdirs();
+
+            File confDir = new File( configurationDir, "conf" );
+            confDir.mkdir();
+
+            if ( tomcatLoggingFile != null )
+            {
+                FileUtils.copyFile( tomcatLoggingFile, new File( confDir, "logging.properties" ) );
+            }
+            else
+            {
+                copyFile( "/conf/logging.properties", new File( confDir, "logging.properties" ) );
+            }
+
+            copyFile( "/conf/tomcat-users.xml", new File( confDir, "tomcat-users.xml" ) );
+            if ( tomcatWebXml != null )
+            {
+                if ( !tomcatWebXml.exists() )
+                {
+                    throw new MojoExecutionException( " tomcatWebXml " + tomcatWebXml.getPath() + " not exists" );
+                }
+                //MTOMCAT-42  here it's a real file resources not a one coming with the mojo
+                //MTOMCAT-128 apply filtering
+                MavenFileFilterRequest mavenFileFilterRequest = new MavenFileFilterRequest();
+                mavenFileFilterRequest.setFrom( tomcatWebXml );
+                mavenFileFilterRequest.setTo( new File( confDir, "web.xml" ) );
+                mavenFileFilterRequest.setMavenProject( project );
+                mavenFileFilterRequest.setMavenSession( session );
+                mavenFileFilterRequest.setFiltering( true );
+
+                mavenFileFilter.copyFile( mavenFileFilterRequest );
+
+            }
+            else
+            {
+                copyFile( "/conf/web.xml", new File( confDir, "web.xml" ) );
+            }
+
+            File logDir = new File( configurationDir, "logs" );
+            logDir.mkdir();
+
+            File webappsDir = new File( configurationDir, "webapps" );
+            webappsDir.mkdir();
+
+            if ( additionalConfigFilesDir != null && additionalConfigFilesDir.exists() )
+            {
+                DirectoryScanner scanner = new DirectoryScanner();
+                scanner.addDefaultExcludes();
+                scanner.setBasedir( additionalConfigFilesDir.getPath() );
+                scanner.scan();
+
+                String[] files = scanner.getIncludedFiles();
+
+                if ( files != null && files.length > 0 )
+                {
+                    getLog().info( "Coping additional tomcat config files" );
+
+                    for ( int i = 0; i < files.length; i++ )
+                    {
+                        File file = new File( additionalConfigFilesDir, files[i] );
+
+                        getLog().info( " copy " + file.getName() );
+
+                        FileUtils.copyFileToDirectory( file, confDir );
+                    }
+                }
+            }
+        }
+    }
+
+    /**
+     * Copies the specified class resource to the specified file.
+     *
+     * @param fromPath the path of the class resource to copy
+     * @param toFile   the file to copy to
+     * @throws IOException if the file could not be copied
+     */
+    private void copyFile( String fromPath, File toFile )
+        throws IOException
+    {
+        URL fromURL = getClass().getResource( fromPath );
+
+        if ( fromURL == null )
+        {
+            throw new FileNotFoundException( fromPath );
+        }
+
+        FileUtils.copyURLToFile( fromURL, toFile );
+    }
+
+    /**
+     * Starts the embedded Tomcat server.
+     *
+     * @throws IOException            if the server could not be configured
+     * @throws LifecycleException     if the server could not be started
+     * @throws MojoExecutionException if the server could not be configured
+     */
+    private void startContainer()
+        throws IOException, LifecycleException, MojoExecutionException, ServletException
+    {
+        String previousCatalinaBase = System.getProperty( "catalina.base" );
+
+        try
+        {
+
+            // Set the system properties
+            setupSystemProperties();
+
+            System.setProperty( "catalina.base", configurationDir.getAbsolutePath() );
+
+            if ( serverXml != null )
+            {
+                if ( !serverXml.exists() )
+                {
+                    throw new MojoExecutionException( serverXml.getPath() + " not exists" );
+                }
+
+                Catalina container = new Catalina();
+
+                if ( useSeparateTomcatClassLoader )
+                {
+                    Thread.currentThread().setContextClassLoader( getTomcatClassLoader() );
+                    container.setParentClassLoader( getTomcatClassLoader() );
+                }
+
+                container.setUseNaming( this.useNaming );
+                container.setConfigFile( serverXml.getAbsolutePath() );
+                container.start();
+                EmbeddedRegistry.getInstance().register( container );
+            }
+            else
+            {
+
+                System.setProperty( "java.util.logging.manager", "org.apache.juli.ClassLoaderLogManager" );
+                System.setProperty( "java.util.logging.config.file",
+                                    new File( configurationDir, "conf/logging.properties" ).toString() );
+
+                // Trigger loading of catalina.properties
+                CatalinaProperties.getProperty( "foo" );
+
+                Tomcat embeddedTomcat = new ExtendedTomcat( configurationDir );
+
+                embeddedTomcat.setBaseDir( configurationDir.getAbsolutePath() );
+                MemoryRealm memoryRealm = new MemoryRealm();
+
+                if ( tomcatUsers != null )
+                {
+                    if ( !tomcatUsers.exists() )
+                    {
+                        throw new MojoExecutionException( " tomcatUsers " + tomcatUsers.getPath() + " not exists" );
+                    }
+                    getLog().info( "use tomcat-users.xml from " + tomcatUsers.getAbsolutePath() );
+                    memoryRealm.setPathname( tomcatUsers.getAbsolutePath() );
+                }
+
+                embeddedTomcat.getEngine().setRealm( memoryRealm );
+
+                Context ctx = createContext( embeddedTomcat );
+
+                if ( useNaming )
+                {
+                    embeddedTomcat.enableNaming();
+                }
+
+                embeddedTomcat.getHost().setAppBase( new File( configurationDir, "webapps" ).getAbsolutePath() );
+
+                if ( hostName != null )
+                {
+                    embeddedTomcat.getHost().setName( hostName );
+                }
+                if ( aliases != null )
+                {
+                    for ( String alias : aliases )
+                    {
+                        embeddedTomcat.getHost().addAlias( alias );
+                    }
+
+                }
+                createStaticContext( embeddedTomcat, ctx, embeddedTomcat.getHost() );
+
+                Connector connector = new Connector( protocol );
+                connector.setPort( port );
+                connector.setMaxPostSize( maxPostSize );
+
+                if ( httpsPort > 0 )
+                {
+                    connector.setRedirectPort( httpsPort );
+                }
+
+                if ( address != null )
+                {
+                    connector.setAttribute( "address", address );
+                }
+
+                connector.setURIEncoding( uriEncoding );
+
+                connector.setUseBodyEncodingForURI( this.useBodyEncodingForURI );
+
+                embeddedTomcat.getService().addConnector( connector );
+
+                embeddedTomcat.setConnector( connector );
+
+                AccessLogValve alv = new AccessLogValve();
+                alv.setDirectory( new File( configurationDir, "logs" ).getAbsolutePath() );
+                alv.setPattern( "%h %l %u %t \"%r\" %s %b %I %D" );
+                embeddedTomcat.getHost().getPipeline().addValve( alv );
+
+                // create https connector
+                Connector httpsConnector = null;
+                if ( httpsPort > 0 )
+                {
+                    httpsConnector = new Connector( protocol );
+                    httpsConnector.setPort( httpsPort );
+                    httpsConnector.setMaxPostSize( maxPostSize );
+                    httpsConnector.setSecure( true );
+                    httpsConnector.setProperty( "SSLEnabled", "true" );
+                    // should be default but configure it anyway
+                    httpsConnector.setProperty( "sslProtocol", "TLS" );
+                    if ( keystoreFile != null )
+                    {
+                        httpsConnector.setAttribute( "keystoreFile", keystoreFile );
+                    }
+                    if ( keystorePass != null )
+                    {
+                        httpsConnector.setAttribute( "keystorePass", keystorePass );
+                    }
+                    if ( keystoreType != null )
+                    {
+                        httpsConnector.setAttribute( "keystoreType", keystoreType );
+                    }
+
+                    if ( trustManagerClassName != null )
+                    {
+                        httpsConnector.setAttribute( "trustManagerClassName", trustManagerClassName );
+                    }
+
+                    if ( trustMaxCertLength != null )
+                    {
+                        httpsConnector.setAttribute( "trustMaxCertLength", trustMaxCertLength );
+                    }
+
+                    if ( truststoreAlgorithm != null )
+                    {
+                        httpsConnector.setAttribute( "truststoreAlgorithm", truststoreAlgorithm );
+                    }
+
+                    if ( truststoreFile != null )
+                    {
+                        httpsConnector.setAttribute( "truststoreFile", truststoreFile );
+                    }
+
+                    if ( truststorePass != null )
+                    {
+                        httpsConnector.setAttribute( "truststorePass", truststorePass );
+                    }
+
+                    if ( truststoreProvider != null )
+                    {
+                        httpsConnector.setAttribute( "truststoreProvider", truststoreProvider );
+                    }
+
+                    if ( truststoreType != null )
+                    {
+                        httpsConnector.setAttribute( "truststoreType", truststoreType );
+                    }
+
+                    httpsConnector.setAttribute( "clientAuth", clientAuth );
+
+                    httpsConnector.setUseBodyEncodingForURI( this.useBodyEncodingForURI );
+
+                    if ( address != null )
+                    {
+                        httpsConnector.setAttribute( "address", address );
+                    }
+
+                    embeddedTomcat.getEngine().getService().addConnector( httpsConnector );
+
+                }
+
+                // create ajp connector
+                Connector ajpConnector = null;
+                if ( ajpPort > 0 )
+                {
+                    ajpConnector = new Connector( ajpProtocol );
+                    ajpConnector.setPort( ajpPort );
+                    ajpConnector.setURIEncoding( uriEncoding );
+                    ajpConnector.setUseBodyEncodingForURI( this.useBodyEncodingForURI );
+                    if ( address != null )
+                    {
+                        ajpConnector.setAttribute( "address", address );
+                    }
+                    embeddedTomcat.getEngine().getService().addConnector( ajpConnector );
+                }
+
+                if ( addContextWarDependencies || !getAdditionalWebapps().isEmpty() )
+                {
+                    createDependencyContexts( embeddedTomcat );
+                }
+
+                if ( useSeparateTomcatClassLoader )
+                {
+                    Thread.currentThread().setContextClassLoader( getTomcatClassLoader() );
+                    embeddedTomcat.getEngine().setParentClassLoader( getTomcatClassLoader() );
+                }
+
+                embeddedTomcat.start();
+
+                Properties portProperties = new Properties();
+
+                portProperties.put( "tomcat.maven.http.port", Integer.toString( connector.getLocalPort() ) );
+
+                session.getExecutionProperties().put( "tomcat.maven.http.port",
+                                                      Integer.toString( connector.getLocalPort() ) );
+                System.setProperty( "tomcat.maven.http.port", Integer.toString( connector.getLocalPort() ) );
+
+                if ( httpsConnector != null )
+                {
+                    session.getExecutionProperties().put( "tomcat.maven.https.port",
+                                                          Integer.toString( httpsConnector.getLocalPort() ) );
+                    portProperties.put( "tomcat.maven.https.port", Integer.toString( httpsConnector.getLocalPort() ) );
+                    System.setProperty( "tomcat.maven.https.port", Integer.toString( httpsConnector.getLocalPort() ) );
+                }
+
+                if ( ajpConnector != null )
+                {
+                    session.getExecutionProperties().put( "tomcat.maven.ajp.port",
+                                                          Integer.toString( ajpConnector.getLocalPort() ) );
+                    portProperties.put( "tomcat.maven.ajp.port", Integer.toString( ajpConnector.getLocalPort() ) );
+                    System.setProperty( "tomcat.maven.ajp.port", Integer.toString( ajpConnector.getLocalPort() ) );
+                }
+                if ( propertiesPortFilePath != null )
+                {
+                    File propertiesPortsFile = new File( propertiesPortFilePath );
+                    if ( propertiesPortsFile.exists() )
+                    {
+                        propertiesPortsFile.delete();
+                    }
+                    FileOutputStream fileOutputStream = new FileOutputStream( propertiesPortsFile );
+                    try
+                    {
+                        portProperties.store( fileOutputStream, "Apache Tomcat Maven plugin port used" );
+                    }
+                    finally
+                    {
+                        IOUtils.closeQuietly( fileOutputStream );
+                    }
+                }
+
+                EmbeddedRegistry.getInstance().register( embeddedTomcat );
+
+            }
+
+
+        }
+        finally
+        {
+            if ( previousCatalinaBase != null )
+            {
+                System.setProperty( "catalina.base", previousCatalinaBase );
+            }
+        }
+    }
+
+    private List<Webapp> getAdditionalWebapps()
+    {
+        if ( webapps == null )
+        {
+            return Collections.emptyList();
+        }
+        return webapps;
+    }
+
+    protected ClassRealm getTomcatClassLoader()
+        throws MojoExecutionException
+    {
+        if ( this.tomcatRealm != null )
+        {
+            return tomcatRealm;
+        }
+        try
+        {
+            ClassWorld world = new ClassWorld();
+            ClassRealm root = world.newRealm( "tomcat", Thread.currentThread().getContextClassLoader() );
+
+            for ( @SuppressWarnings( "rawtypes" ) Iterator i = pluginArtifacts.iterator(); i.hasNext(); )
+            {
+                Artifact pluginArtifact = (Artifact) i.next();
+                // add all plugin artifacts see https://issues.apache.org/jira/browse/MTOMCAT-122
+                if ( pluginArtifact.getFile() != null )
+                {
+                    root.addURL( pluginArtifact.getFile().toURI().toURL() );
+                }
+
+            }
+            tomcatRealm = root;
+            return root;
+        }
+        catch ( DuplicateRealmException e )
+        {
+            throw new MojoExecutionException( e.getMessage(), e );
+        }
+        catch ( MalformedURLException e )
+        {
+            throw new MojoExecutionException( e.getMessage(), e );
+        }
+    }
+
+    @SuppressWarnings( "unchecked" )
+    public Set<Artifact> getProjectArtifacts()
+    {
+        return project.getArtifacts();
+    }
+
+    /**
+     * Causes the current thread to wait indefinitely. This method does not return.
+     */
+    private void waitIndefinitely()
+    {
+        Object lock = new Object();
+
+        synchronized ( lock )
+        {
+            try
+            {
+                lock.wait();
+            }
+            catch ( InterruptedException exception )
+            {
+                getLog().warn( messagesProvider.getMessage( "AbstractRunMojo.interrupted" ), exception );
+            }
+        }
+    }
+
+
+    /**
+     * Set the SystemProperties from the configuration.
+     */
+    private void setupSystemProperties()
+    {
+        if ( systemProperties != null && !systemProperties.isEmpty() )
+        {
+            getLog().info( "setting SystemProperties:" );
+
+            for ( String key : systemProperties.keySet() )
+            {
+                String value = systemProperties.get( key );
+
+                if ( value != null )
+                {
+                    getLog().info( " " + key + "=" + value );
+                    System.setProperty( key, value );
+                }
+                else
+                {
+                    getLog().info( "skip sysProps " + key + " with empty value" );
+                }
+            }
+        }
+    }
+
+
+    /**
+     * Allows the startup of additional webapps in the tomcat container by declaration with scope
+     * "tomcat".
+     *
+     * @param container tomcat
+     * @return dependency tomcat contexts of warfiles in scope "tomcat"
+     */
+    private Collection<Context> createDependencyContexts( Tomcat container )
+        throws MojoExecutionException, MalformedURLException, ServletException, IOException
+    {
+        getLog().info( "Deploying dependency wars" );
+        // Let's add other modules
+        List<Context> contexts = new ArrayList<Context>();
+
+        ScopeArtifactFilter filter = new ScopeArtifactFilter( "tomcat" );
+        @SuppressWarnings( "unchecked" ) Set<Artifact> artifacts = project.getArtifacts();
+        for ( Artifact artifact : artifacts )
+        {
+
+            // Artifact is not yet registered and it has neither test, nor a
+            // provided scope, not is it optional
+            if ( "war".equals( artifact.getType() ) && !artifact.isOptional() && filter.include( artifact ) )
+            {
+                addContextFromArtifact( container, contexts, artifact, "/" + artifact.getArtifactId(), null, false );
+            }
+        }
+
+        for ( AbstractWebapp additionalWebapp : getAdditionalWebapps() )
+        {
+            String contextPath = additionalWebapp.getContextPath();
+            if ( !contextPath.startsWith( "/" ) )
+            {
+                contextPath = "/" + contextPath;
+            }
+            addContextFromArtifact( container, contexts, getArtifact( additionalWebapp ), contextPath,
+                                    additionalWebapp.getContextFile(), additionalWebapp.isAsWebapp() );
+        }
+        return contexts;
+    }
+
+
+    private void addContextFromArtifact( Tomcat container, List<Context> contexts, Artifact artifact,
+                                         String contextPath, File contextXml, boolean asWebApp )
+        throws MojoExecutionException, ServletException, IOException
+    {
+        getLog().info( "Deploy warfile: " + String.valueOf( artifact.getFile() ) + " to contextPath: " + contextPath );
+        File webapps = new File( configurationDir, "webapps" );
+        File artifactWarDir = new File( webapps, artifact.getArtifactId() );
+        if ( !artifactWarDir.exists() )
+        {
+            //dont extract if exists
+            artifactWarDir.mkdir();
+            try
+            {
+                UnArchiver unArchiver = archiverManager.getUnArchiver( "zip" );
+                unArchiver.setSourceFile( artifact.getFile() );
+                unArchiver.setDestDirectory( artifactWarDir );
+
+                // Extract the module
+                unArchiver.extract();
+            }
+            catch ( NoSuchArchiverException e )
+            {
+                getLog().error( e );
+                return;
+            }
+            catch ( ArchiverException e )
+            {
+                getLog().error( e );
+                return;
+            }
+        }
+        // TODO make that configurable ?
+        //WebappLoader webappLoader = new WebappLoader( Thread.currentThread().getContextClassLoader() );
+        WebappLoader webappLoader = createWebappLoader();
+        Context context = null;
+        if ( asWebApp )
+        {
+            context = container.addWebapp( contextPath, artifactWarDir.getAbsolutePath() );
+        }
+        else
+        {
+            context = container.addContext( contextPath, artifactWarDir.getAbsolutePath() );
+        }
+        context.setLoader( webappLoader );
+
+        File contextFile = contextXml != null ? contextXml : getContextFile();
+        if ( contextFile != null )
+        {
+            context.setConfigFile( contextFile.toURI().toURL() );
+        }
+
+        contexts.add( context );
+//        container.getHost().addChild(context);
+    }
+
+    private void createStaticContext( final Tomcat container, Context context, Host host )
+    {
+        if ( staticContextDocbase != null )
+        {
+            Context staticContext = container.addContext( staticContextPath, staticContextDocbase );
+            staticContext.setPrivileged( true );
+            Wrapper servlet = context.createWrapper();
+            servlet.setServletClass( DefaultServlet.class.getName() );
+            servlet.setName( "staticContent" );
+            staticContext.addChild( servlet );
+            staticContext.addServletMapping( "/", "staticContent" );
+            // see https://issues.apache.org/jira/browse/MTOMCAT-238
+            //host.addChild( staticContext );
+        }
+    }
+
+
+    /**
+     * Resolves the Artifact from the remote repository if necessary. If no version is specified, it will be retrieved
+     * from the dependency list or from the DependencyManagement section of the pom.
+     *
+     * @param additionalWebapp containing information about artifact from plugin configuration.
+     * @return Artifact object representing the specified file.
+     * @throws MojoExecutionException with a message if the version can't be found in DependencyManagement.
+     */
+    protected Artifact getArtifact( AbstractWebapp additionalWebapp )
+        throws MojoExecutionException
+    {
+
+        Artifact artifact;
+        VersionRange vr;
+        try
+        {
+            vr = VersionRange.createFromVersionSpec( additionalWebapp.getVersion() );
+        }
+        catch ( InvalidVersionSpecificationException e )
+        {
+            getLog().warn( "fail to create versionRange from version: " + additionalWebapp.getVersion(), e );
+            vr = VersionRange.createFromVersion( additionalWebapp.getVersion() );
+        }
+
+        if ( StringUtils.isEmpty( additionalWebapp.getClassifier() ) )
+        {
+            artifact =
+                factory.createDependencyArtifact( additionalWebapp.getGroupId(), additionalWebapp.getArtifactId(), vr,
+                                                  additionalWebapp.getType(), null, Artifact.SCOPE_COMPILE );
+        }
+        else
+        {
+            artifact =
+                factory.createDependencyArtifact( additionalWebapp.getGroupId(), additionalWebapp.getArtifactId(), vr,
+                                                  additionalWebapp.getType(), additionalWebapp.getClassifier(),
+                                                  Artifact.SCOPE_COMPILE );
+        }
+
+        try
+        {
+            resolver.resolve( artifact, project.getRemoteArtifactRepositories(), this.local );
+        }
+        catch ( ArtifactResolutionException e )
+        {
+            throw new MojoExecutionException( "Unable to resolve artifact.", e );
+        }
+        catch ( ArtifactNotFoundException e )
+        {
+            throw new MojoExecutionException( "Unable to find artifact.", e );
+        }
+
+        return artifact;
+    }
+}
diff --git a/tomcat8-maven-plugin/src/main/java/org/apache/tomcat/maven/plugin/tomcat8/run/AbstractRunWarMojo.java b/tomcat8-maven-plugin/src/main/java/org/apache/tomcat/maven/plugin/tomcat8/run/AbstractRunWarMojo.java
new file mode 100644
index 0000000..1d5018e
--- /dev/null
+++ b/tomcat8-maven-plugin/src/main/java/org/apache/tomcat/maven/plugin/tomcat8/run/AbstractRunWarMojo.java
@@ -0,0 +1,66 @@
+package org.apache.tomcat.maven.plugin.tomcat8.run;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import org.apache.maven.plugins.annotations.Parameter;
+
+import java.io.File;
+
+/**
+ * Runs the current project as a packaged web application using an embedded Tomcat server.
+ *
+ * @author Mark Hobson <markhobson@gmail.com>
+ * @todo depend on war:exploded when MNG-1649 resolved
+ */
+public abstract class AbstractRunWarMojo
+    extends AbstractRunMojo
+{
+    // ----------------------------------------------------------------------
+    // Mojo Parameters
+    // ----------------------------------------------------------------------
+
+    /**
+     * The path of the exploded WAR directory to run.
+     */
+    @Parameter( property = "maven.tomcat.warDirectory", defaultValue = "${project.build.directory}/${project.build.finalName}", required = true )
+    private File warDirectory;
+
+    // ----------------------------------------------------------------------
+    // AbstractRunMojo Implementation
+    // ----------------------------------------------------------------------
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    protected File getDocBase()
+    {
+        return warDirectory;
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    protected File getContextFile()
+    {
+        return contextFile;
+    }
+}
diff --git a/tomcat8-maven-plugin/src/main/java/org/apache/tomcat/maven/plugin/tomcat8/run/AbstractStandaloneWarMojo.java b/tomcat8-maven-plugin/src/main/java/org/apache/tomcat/maven/plugin/tomcat8/run/AbstractStandaloneWarMojo.java
new file mode 100644
index 0000000..25ca6d9
--- /dev/null
+++ b/tomcat8-maven-plugin/src/main/java/org/apache/tomcat/maven/plugin/tomcat8/run/AbstractStandaloneWarMojo.java
@@ -0,0 +1,297 @@
+package org.apache.tomcat.maven.plugin.tomcat8.run;
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import org.apache.commons.compress.archivers.ArchiveException;
+import org.apache.commons.compress.archivers.ArchiveOutputStream;
+import org.apache.commons.compress.archivers.ArchiveStreamFactory;
+import org.apache.commons.compress.archivers.jar.JarArchiveEntry;
+import org.apache.commons.io.IOUtils;
+import org.apache.commons.lang.StringUtils;
+import org.apache.maven.artifact.Artifact;
+import org.apache.maven.artifact.resolver.ArtifactNotFoundException;
+import org.apache.maven.artifact.resolver.ArtifactResolutionException;
+import org.apache.maven.model.Dependency;
+import org.apache.maven.plugin.MojoExecutionException;
+import org.apache.maven.plugin.MojoFailureException;
+import org.apache.maven.plugins.annotations.Parameter;
+import org.apache.tomcat.maven.runner.Tomcat7Runner;
+import org.apache.tomcat.maven.runner.Tomcat7RunnerCli;
+import org.codehaus.plexus.archiver.jar.Manifest;
+import org.codehaus.plexus.archiver.jar.ManifestException;
+import org.codehaus.plexus.util.DirectoryScanner;
+
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.io.PrintWriter;
+import java.util.Properties;
+import java.util.jar.JarFile;
+
+/**
+ * Abstract Mojo for building deployable and executable war files
+ *
+ * @since 2.1
+ */
+public abstract class AbstractStandaloneWarMojo
+    extends AbstractExecWarMojo
+{
+
+    /**
+     * Name of the generated WAR.
+     */
+    @Parameter(property = "tomcat.jar.finalName",
+               defaultValue = "${project.artifactId}-${project.version}-standalone.war", required = true)
+    protected String finalName;
+
+    /**
+     * the classifier to use for the attached/generated artifact
+     */
+    @Parameter(property = "maven.tomcat.exec.war.attachArtifactClassifier", defaultValue = "standalone",
+               required = true)
+    protected String attachArtifactClassifier;
+
+    /**
+     * the type to use for the attached/generated artifact
+     *
+     * @since 2.2
+     */
+    @Parameter(property = "maven.tomcat.exec.war.attachArtifactType", defaultValue = "war", required = true)
+    protected String attachArtifactClassifierType;
+
+    public void execute()
+        throws MojoExecutionException, MojoFailureException
+    {
+        if ( !"war".equals( project.getPackaging() ) )
+        {
+            throw new MojoFailureException( "Pacakaging must be of type war for standalone-war goal." );
+        }
+
+        File warExecFile = new File( buildDirectory, finalName );
+        if ( warExecFile.exists() )
+        {
+            warExecFile.delete();
+        }
+
+        File execWarJar = new File( buildDirectory, finalName );
+
+        FileOutputStream execWarJarOutputStream = null;
+        ArchiveOutputStream os = null;
+        File tmpPropertiesFile = null;
+        File tmpManifestFile = null;
+        FileOutputStream tmpPropertiesFileOutputStream = null;
+        PrintWriter tmpManifestWriter = null;
+
+        try
+        {
+            tmpPropertiesFile = new File( buildDirectory, "war-exec.properties" );
+            if ( tmpPropertiesFile.exists() )
+            {
+                tmpPropertiesFile.delete();
+            }
+            tmpPropertiesFile.getParentFile().mkdirs();
+
+            tmpManifestFile = new File( buildDirectory, "war-exec.manifest" );
+            if ( tmpManifestFile.exists() )
+            {
+                tmpManifestFile.delete();
+            }
+            tmpPropertiesFileOutputStream = new FileOutputStream( tmpPropertiesFile );
+            execWarJar.getParentFile().mkdirs();
+            execWarJar.createNewFile();
+            execWarJarOutputStream = new FileOutputStream( execWarJar );
+
+            tmpManifestWriter = new PrintWriter( tmpManifestFile );
+
+            // store :
+            //* wars in the root: foo.war
+            //* tomcat jars
+            //* file tomcat.standalone.properties with possible values :
+            //   * useServerXml=true/false to use directly the one provided
+            //   * enableNaming=true/false
+            //   * wars=foo.war|contextpath;bar.war  ( |contextpath is optionnal if empty use the war name )
+            //   * accessLogValveFormat=
+            //   * connectorhttpProtocol: HTTP/1.1 or org.apache.coyote.http11.Http11NioProtocol
+            //   * codeSourceContextPath=path parameter, default is project.artifactId
+            //* optionnal: conf/ with usual tomcat configuration files
+            //* MANIFEST with Main-Class
+
+            Properties properties = new Properties();
+
+            properties.put( Tomcat7Runner.ARCHIVE_GENERATION_TIMESTAMP_KEY,
+                            Long.toString( System.currentTimeMillis() ) );
+            properties.put( Tomcat7Runner.ENABLE_NAMING_KEY, Boolean.toString( enableNaming ) );
+            properties.put( Tomcat7Runner.ACCESS_LOG_VALVE_FORMAT_KEY, accessLogValveFormat );
+            properties.put( Tomcat7Runner.HTTP_PROTOCOL_KEY, connectorHttpProtocol );
+            properties.put( Tomcat7Runner.CODE_SOURCE_CONTEXT_PATH, path );
+
+            os = new ArchiveStreamFactory().createArchiveOutputStream( ArchiveStreamFactory.JAR,
+                                                                       execWarJarOutputStream );
+
+            extractJarToArchive( new JarFile( projectArtifact.getFile() ), os, null );
+
+            if ( serverXml != null && serverXml.exists() )
+            {
+                os.putArchiveEntry( new JarArchiveEntry( "conf/server.xml" ) );
+                IOUtils.copy( new FileInputStream( serverXml ), os );
+                os.closeArchiveEntry();
+                properties.put( Tomcat7Runner.USE_SERVER_XML_KEY, Boolean.TRUE.toString() );
+            }
+            else
+            {
+                properties.put( Tomcat7Runner.USE_SERVER_XML_KEY, Boolean.FALSE.toString() );
+            }
+
+            os.putArchiveEntry( new JarArchiveEntry( "conf/web.xml" ) );
+            IOUtils.copy( getClass().getResourceAsStream( "/conf/web.xml" ), os );
+            os.closeArchiveEntry();
+
+            properties.store( tmpPropertiesFileOutputStream, "created by Apache Tomcat Maven plugin" );
+
+            tmpPropertiesFileOutputStream.flush();
+            tmpPropertiesFileOutputStream.close();
+
+            os.putArchiveEntry( new JarArchiveEntry( Tomcat7RunnerCli.STAND_ALONE_PROPERTIES_FILENAME ) );
+            IOUtils.copy( new FileInputStream( tmpPropertiesFile ), os );
+            os.closeArchiveEntry();
+
+            // add tomcat classes
+            for ( Artifact pluginArtifact : pluginArtifacts )
+            {
+                if ( StringUtils.equals( "org.apache.tomcat", pluginArtifact.getGroupId() ) || StringUtils.equals(
+                    "org.apache.tomcat.embed", pluginArtifact.getGroupId() ) || StringUtils.equals(
+                    "org.eclipse.jdt.core.compiler", pluginArtifact.getGroupId() ) || StringUtils.equals( "commons-cli",
+                                                                                                          pluginArtifact.getArtifactId() )
+                    || StringUtils.equals( "tomcat7-war-runner", pluginArtifact.getArtifactId() ) )
+                {
+                    JarFile jarFile = new JarFile( pluginArtifact.getFile() );
+                    extractJarToArchive( jarFile, os, null );
+                }
+            }
+
+            // add extra dependencies
+            if ( extraDependencies != null && !extraDependencies.isEmpty() )
+            {
+                for ( Dependency dependency : extraDependencies )
+                {
+                    String version = dependency.getVersion();
+                    if ( StringUtils.isEmpty( version ) )
+                    {
+                        version = findArtifactVersion( dependency );
+                    }
+
+                    if ( StringUtils.isEmpty( version ) )
+                    {
+                        throw new MojoExecutionException(
+                            "Dependency '" + dependency.getGroupId() + "':'" + dependency.getArtifactId()
+                                + "' does not have version specified" );
+                    }
+                    // String groupId, String artifactId, String version, String scope, String type
+                    Artifact artifact =
+                        artifactFactory.createArtifact( dependency.getGroupId(), dependency.getArtifactId(), version,
+                                                        dependency.getScope(), dependency.getType() );
+
+                    artifactResolver.resolve( artifact, this.remoteRepos, this.local );
+                    JarFile jarFile = new JarFile( artifact.getFile() );
+                    extractJarToArchive( jarFile, os, excludes );
+                }
+            }
+
+            Manifest manifest = new Manifest();
+
+            Manifest.Attribute mainClassAtt = new Manifest.Attribute();
+            mainClassAtt.setName( "Main-Class" );
+            mainClassAtt.setValue( mainClass );
+            manifest.addConfiguredAttribute( mainClassAtt );
+
+            manifest.write( tmpManifestWriter );
+            tmpManifestWriter.flush();
+            tmpManifestWriter.close();
+
+            os.putArchiveEntry( new JarArchiveEntry( "META-INF/MANIFEST.MF" ) );
+            IOUtils.copy( new FileInputStream( tmpManifestFile ), os );
+            os.closeArchiveEntry();
+
+            if ( attachArtifact )
+            {
+                //MavenProject project, String artifactType, String artifactClassifier, File artifactFile
+                projectHelper.attachArtifact( project, attachArtifactClassifierType, attachArtifactClassifier,
+                                              execWarJar );
+            }
+
+            if ( extraResources != null )
+            {
+                for ( ExtraResource extraResource : extraResources )
+                {
+
+                    DirectoryScanner directoryScanner = new DirectoryScanner();
+                    directoryScanner.setBasedir( extraResource.getDirectory() );
+                    directoryScanner.addDefaultExcludes();
+                    directoryScanner.setExcludes( toStringArray( extraResource.getExcludes() ) );
+                    directoryScanner.setIncludes( toStringArray( extraResource.getIncludes() ) );
+                    directoryScanner.scan();
+                    for ( String includeFile : directoryScanner.getIncludedFiles() )
+                    {
+                        getLog().debug( "include file:" + includeFile );
+                        os.putArchiveEntry( new JarArchiveEntry( includeFile ) );
+                        IOUtils.copy( new FileInputStream( new File( extraResource.getDirectory(), includeFile ) ),
+                                      os );
+                        os.closeArchiveEntry();
+                    }
+                }
+            }
+
+            if ( tomcatConfigurationFilesDirectory != null && tomcatConfigurationFilesDirectory.exists() )
+            {
+                // Because its the tomcat default dir for configs
+                String aConfigOutputDir = "conf/";
+                copyDirectoryContentIntoArchive( tomcatConfigurationFilesDirectory, aConfigOutputDir, os );
+            }
+        }
+        catch ( ManifestException e )
+        {
+            throw new MojoExecutionException( e.getMessage(), e );
+        }
+        catch ( IOException e )
+        {
+            throw new MojoExecutionException( e.getMessage(), e );
+        }
+        catch ( ArchiveException e )
+        {
+            throw new MojoExecutionException( e.getMessage(), e );
+        }
+        catch ( ArtifactNotFoundException e )
+        {
+            throw new MojoExecutionException( e.getMessage(), e );
+        }
+        catch ( ArtifactResolutionException e )
+        {
+            throw new MojoExecutionException( e.getMessage(), e );
+        }
+        finally
+        {
+            IOUtils.closeQuietly( os );
+            IOUtils.closeQuietly( tmpManifestWriter );
+            IOUtils.closeQuietly( execWarJarOutputStream );
+            IOUtils.closeQuietly( tmpPropertiesFileOutputStream );
+        }
+
+    }
+}
diff --git a/tomcat8-maven-plugin/src/main/java/org/apache/tomcat/maven/plugin/tomcat8/run/ExecWarMojo.java b/tomcat8-maven-plugin/src/main/java/org/apache/tomcat/maven/plugin/tomcat8/run/ExecWarMojo.java
new file mode 100644
index 0000000..62fb9df
--- /dev/null
+++ b/tomcat8-maven-plugin/src/main/java/org/apache/tomcat/maven/plugin/tomcat8/run/ExecWarMojo.java
@@ -0,0 +1,40 @@
+package org.apache.tomcat.maven.plugin.tomcat8.run;
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import org.apache.maven.plugins.annotations.Execute;
+import org.apache.maven.plugins.annotations.LifecyclePhase;
+import org.apache.maven.plugins.annotations.Mojo;
+
+/**
+ * Create a self executable jar file containing all necessary Apache Tomcat classes. 
+ * This allows for using just <code>java -jar mywebapp.jar</code> to run your webapp without 
+ * needing to install a Tomcat instance.
+ * More details <a href="http://tomcat.apache.org/maven-plugin-2.0/executable-war-jar.html">here</a>.
+ *
+ * @author Olivier Lamy
+ * @since 2.0
+ */
+@Mojo( name = "exec-war", threadSafe = true )
+@Execute( phase = LifecyclePhase.PACKAGE )
+public class ExecWarMojo
+    extends AbstractExecWarMojo
+{
+    // no op only mojo metadatas
+}
diff --git a/tomcat8-maven-plugin/src/main/java/org/apache/tomcat/maven/plugin/tomcat8/run/ExecWarOnlyMojo.java b/tomcat8-maven-plugin/src/main/java/org/apache/tomcat/maven/plugin/tomcat8/run/ExecWarOnlyMojo.java
new file mode 100644
index 0000000..4f51ee9
--- /dev/null
+++ b/tomcat8-maven-plugin/src/main/java/org/apache/tomcat/maven/plugin/tomcat8/run/ExecWarOnlyMojo.java
@@ -0,0 +1,34 @@
+package org.apache.tomcat.maven.plugin.tomcat8.run;
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import org.apache.maven.plugins.annotations.Mojo;
+
+/**
+ * Same as exec-war goal without forking the package lifecycle.
+ *
+ * @author Olivier Lamy
+ * @since 2.0
+ */
+@Mojo( name = "exec-war-only", threadSafe = true )
+public class ExecWarOnlyMojo
+    extends AbstractExecWarMojo
+{
+    // no op only mojo metadatas to not fork a lifecycle
+}
diff --git a/tomcat8-maven-plugin/src/main/java/org/apache/tomcat/maven/plugin/tomcat8/run/ExtendedTomcat.java b/tomcat8-maven-plugin/src/main/java/org/apache/tomcat/maven/plugin/tomcat8/run/ExtendedTomcat.java
new file mode 100644
index 0000000..377043c
--- /dev/null
+++ b/tomcat8-maven-plugin/src/main/java/org/apache/tomcat/maven/plugin/tomcat8/run/ExtendedTomcat.java
@@ -0,0 +1,69 @@
+package org.apache.tomcat.maven.plugin.tomcat8.run;
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import org.apache.catalina.Context;
+import org.apache.catalina.Host;
+import org.apache.catalina.core.StandardContext;
+import org.apache.catalina.startup.ContextConfig;
+import org.apache.catalina.startup.Tomcat;
+
+import java.io.File;
+
+/**
+ * @author Olivier Lamy
+ * @since 2.0
+ */
+public class ExtendedTomcat
+    extends Tomcat
+{
+
+    private File configurationDir;
+
+    public ExtendedTomcat( File configurationDir )
+    {
+        super();
+        this.configurationDir = configurationDir;
+    }
+
+    public Context addWebapp( Host host, String url, String name, String path )
+    {
+
+        Context ctx = new StandardContext();
+        ctx.setName( name );
+        ctx.setPath( url );
+        ctx.setDocBase( path );
+
+        ContextConfig ctxCfg = new ContextConfig();
+        ctx.addLifecycleListener( ctxCfg );
+
+        ctxCfg.setDefaultWebXml( new File( configurationDir, "conf/web.xml" ).getAbsolutePath() );
+
+        if ( host == null )
+        {
+            getHost().addChild( ctx );
+        }
+        else
+        {
+            host.addChild( ctx );
+        }
+
+        return ctx;
+    }
+}
diff --git a/tomcat8-maven-plugin/src/main/java/org/apache/tomcat/maven/plugin/tomcat8/run/ExtraDependency.java b/tomcat8-maven-plugin/src/main/java/org/apache/tomcat/maven/plugin/tomcat8/run/ExtraDependency.java
new file mode 100644
index 0000000..3415669
--- /dev/null
+++ b/tomcat8-maven-plugin/src/main/java/org/apache/tomcat/maven/plugin/tomcat8/run/ExtraDependency.java
@@ -0,0 +1,31 @@
+package org.apache.tomcat.maven.plugin.tomcat8.run;
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import org.apache.maven.model.Dependency;
+
+/**
+ * @author Olivier Lamy
+ * @since 2.0
+ */
+public class ExtraDependency
+    extends Dependency
+{
+    // no op just here to support for maven 2.x
+}
diff --git a/tomcat8-maven-plugin/src/main/java/org/apache/tomcat/maven/plugin/tomcat8/run/ExtraResource.java b/tomcat8-maven-plugin/src/main/java/org/apache/tomcat/maven/plugin/tomcat8/run/ExtraResource.java
new file mode 100644
index 0000000..697eb92
--- /dev/null
+++ b/tomcat8-maven-plugin/src/main/java/org/apache/tomcat/maven/plugin/tomcat8/run/ExtraResource.java
@@ -0,0 +1,31 @@
+package org.apache.tomcat.maven.plugin.tomcat8.run;
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import org.apache.maven.model.Resource;
+
+/**
+ * @author Olivier Lamy
+ */
+public class ExtraResource
+    extends Resource
+{
+    // no op just here to support for maven 2.x
+}
+
diff --git a/tomcat8-maven-plugin/src/main/java/org/apache/tomcat/maven/plugin/tomcat8/run/MavenWebappClassLoader.java b/tomcat8-maven-plugin/src/main/java/org/apache/tomcat/maven/plugin/tomcat8/run/MavenWebappClassLoader.java
new file mode 100644
index 0000000..58df0d7
--- /dev/null
+++ b/tomcat8-maven-plugin/src/main/java/org/apache/tomcat/maven/plugin/tomcat8/run/MavenWebappClassLoader.java
@@ -0,0 +1,119 @@
+package org.apache.tomcat.maven.plugin.tomcat8.run;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import org.apache.catalina.loader.ResourceEntry;
+import org.apache.catalina.loader.WebappClassLoader;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.net.URL;
+import java.util.Enumeration;
+
+/**
+ * @author Olivier Lamy
+ */
+public class MavenWebappClassLoader
+    extends WebappClassLoader
+{
+
+    private ClassLoader classLoader;
+
+    public MavenWebappClassLoader( ClassLoader parent )
+    {
+        super( parent );
+        this.classLoader = parent;
+    }
+
+    @Override
+    public Class<?> findClass( String name )
+        throws ClassNotFoundException
+    {
+        return super.findClass( name );
+    }
+
+    @Override
+    public URL findResource( String name )
+    {
+        return super.findResource( name );
+    }
+
+    @Override
+    public Enumeration<URL> findResources( String name )
+        throws IOException
+    {
+        return super.findResources( name );
+    }
+
+    @Override
+    public URL getResource( String name )
+    {
+        return super.getResource( name );
+    }
+
+    @Override
+    public InputStream getResourceAsStream( String name )
+    {
+        return super.getResourceAsStream( name );
+    }
+
+    @Override
+    public Class<?> loadClass( String name )
+        throws ClassNotFoundException
+    {
+        try
+        {
+            return classLoader.loadClass( name );
+        }
+        catch ( ClassNotFoundException e )
+        {
+            // go to top
+        }
+        return super.loadClass( name );
+    }
+
+    @Override
+    public synchronized Class<?> loadClass( String name, boolean resolve )
+        throws ClassNotFoundException
+    {
+        try
+        {
+            return classLoader.loadClass( name );
+        }
+        catch ( ClassNotFoundException e )
+        {
+            // go to top
+        }
+        return super.loadClass( name, resolve );
+    }
+
+    @Override
+    protected ResourceEntry findResourceInternal( String name, String path )
+    {
+        return super.findResourceInternal( name, path );
+    }
+
+    @Override
+    protected Class<?> findClassInternal( String name )
+        throws ClassNotFoundException
+    {
+        return super.findClassInternal( name );
+    }
+}
diff --git a/tomcat8-maven-plugin/src/main/java/org/apache/tomcat/maven/plugin/tomcat8/run/RunMojo.java b/tomcat8-maven-plugin/src/main/java/org/apache/tomcat/maven/plugin/tomcat8/run/RunMojo.java
new file mode 100644
index 0000000..bc7cf9a
--- /dev/null
+++ b/tomcat8-maven-plugin/src/main/java/org/apache/tomcat/maven/plugin/tomcat8/run/RunMojo.java
@@ -0,0 +1,508 @@
+package org.apache.tomcat.maven.plugin.tomcat8.run;
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import org.apache.catalina.Context;
+import org.apache.catalina.WebResource;
+import org.apache.catalina.WebResourceSet;
+import org.apache.catalina.loader.WebappLoader;
+import org.apache.catalina.webresources.EmptyResource;
+import org.apache.catalina.webresources.FileResource;
+import org.apache.catalina.webresources.FileResourceSet;
+import org.apache.commons.io.FileUtils;
+import org.apache.commons.lang.StringUtils;
+import org.apache.maven.artifact.Artifact;
+import org.apache.maven.plugin.MojoExecutionException;
+import org.apache.maven.plugins.annotations.Component;
+import org.apache.maven.plugins.annotations.Execute;
+import org.apache.maven.plugins.annotations.LifecyclePhase;
+import org.apache.maven.plugins.annotations.Mojo;
+import org.apache.maven.plugins.annotations.Parameter;
+import org.apache.maven.plugins.annotations.ResolutionScope;
+import org.apache.maven.shared.filtering.MavenFileFilterRequest;
+import org.apache.maven.shared.filtering.MavenFilteringException;
+import org.apache.tomcat.maven.common.run.ClassLoaderEntriesCalculator;
+import org.apache.tomcat.maven.common.run.ClassLoaderEntriesCalculatorRequest;
+import org.apache.tomcat.maven.common.run.ClassLoaderEntriesCalculatorResult;
+import org.apache.tomcat.maven.common.run.TomcatRunException;
+import org.codehaus.plexus.util.IOUtil;
+import org.codehaus.plexus.util.xml.Xpp3Dom;
+import org.codehaus.plexus.util.xml.Xpp3DomBuilder;
+import org.codehaus.plexus.util.xml.Xpp3DomWriter;
+import org.codehaus.plexus.util.xml.pull.XmlPullParserException;
+
+import java.io.File;
+import java.io.FileReader;
+import java.io.FileWriter;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.StringWriter;
+import java.net.URI;
+import java.net.URISyntaxException;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Set;
+import java.util.jar.JarFile;
+
+/**
+ * Runs the current project as a dynamic web application using an embedded Tomcat server.
+ *
+ * @author Olivier Lamy
+ * @since 2.0
+ */
+@Mojo(name = "run", requiresDependencyResolution = ResolutionScope.TEST, threadSafe = true)
+@Execute(phase = LifecyclePhase.PROCESS_CLASSES)
+public class RunMojo
+    extends AbstractRunMojo
+{
+    // ----------------------------------------------------------------------
+    // Mojo Parameters
+    // ----------------------------------------------------------------------
+
+
+    /**
+     * The set of dependencies for the web application being run.
+     */
+    @Parameter(defaultValue = "${project.artifacts}", required = true, readonly = true)
+    private Set<Artifact> dependencies;
+
+    /**
+     * The web resources directory for the web application being run.
+     */
+    @Parameter(defaultValue = "${basedir}/src/main/webapp", property = "tomcat.warSourceDirectory")
+    private File warSourceDirectory;
+
+
+    /**
+     * Set the "follow standard delegation model" flag used to configure our ClassLoader.
+     *
+     * @see http://tomcat.apache.org/tomcat-7.0-doc/api/org/apache/catalina/loader/WebappLoader.html#setDelegate(boolean)
+     * @since 1.0
+     */
+    @Parameter(property = "tomcat.delegate", defaultValue = "true")
+    private boolean delegate = true;
+
+    /**
+     * @since 2.0
+     */
+    @Component
+    private ClassLoaderEntriesCalculator classLoaderEntriesCalculator;
+
+    /**
+     * will add /WEB-INF/lib/*.jar and /WEB-INF/classes from war dependencies in the webappclassloader
+     *
+     * @since 2.0
+     */
+    @Parameter(property = "maven.tomcat.addWarDependenciesInClassloader", defaultValue = "true")
+    private boolean addWarDependenciesInClassloader;
+
+    /**
+     * will use the test classpath rather than the compile one and will add test dependencies too
+     *
+     * @since 2.0
+     */
+    @Parameter(property = "maven.tomcat.useTestClasspath", defaultValue = "false")
+    private boolean useTestClasspath;
+
+    /**
+     * Additional optional directories to add to the embedded tomcat classpath.
+     *
+     * @since 2.0
+     */
+    @Parameter(alias = "additionalClassesDirs")
+    private List<String> additionalClasspathDirs;
+
+
+    public final File getWarSourceDirectory()
+    {
+        return warSourceDirectory;
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    protected File getDocBase()
+        throws IOException
+    {
+        // https://issues.apache.org/jira/browse/MTOMCAT-239
+        // when running a jar docBase doesn't exists so create a fake one
+        if ( !warSourceDirectory.exists() )
+        {
+            // we create a temporary file in build.directory
+            final File tempDocBase = createTempDirectory( new File( project.getBuild().getDirectory() ) );
+            Runtime.getRuntime().addShutdownHook( new Thread()
+            {
+                @Override
+                public void run()
+                {
+                    try
+                    {
+                        FileUtils.deleteDirectory( tempDocBase );
+                    }
+                    catch ( Exception e )
+                    {
+                        // we can consider as safe to ignore as it's located in build directory
+                    }
+                }
+            } );
+            return tempDocBase;
+        }
+        return warSourceDirectory;
+    }
+
+    private static File createTempDirectory( File baseTmpDirectory )
+        throws IOException
+    {
+        final File temp = File.createTempFile( "temp", Long.toString( System.nanoTime() ), baseTmpDirectory );
+
+        if ( !( temp.delete() ) )
+        {
+            throw new IOException( "Could not delete temp file: " + temp.getAbsolutePath() );
+        }
+
+        if ( !( temp.mkdir() ) )
+        {
+            throw new IOException( "Could not create temp directory: " + temp.getAbsolutePath() );
+        }
+
+        return temp;
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    protected File getContextFile()
+        throws MojoExecutionException
+    {
+        File temporaryContextFile = null;
+
+        //----------------------------------------------------------------------------
+        // context attributes backgroundProcessorDelay reloadable cannot be modified at runtime.
+        // It looks only values from the file are used
+        // so here we create a temporary file with values modified
+        //----------------------------------------------------------------------------
+        FileReader fr = null;
+        FileWriter fw = null;
+        StringWriter sw = new StringWriter();
+        try
+        {
+            temporaryContextFile = File.createTempFile( "tomcat-maven-plugin", "temp-ctx-file" );
+            temporaryContextFile.deleteOnExit();
+
+            // format to modify/create <Context backgroundProcessorDelay="5" reloadable="false">
+            if ( contextFile != null && contextFile.exists() )
+            {
+                MavenFileFilterRequest mavenFileFilterRequest = new MavenFileFilterRequest();
+                mavenFileFilterRequest.setFrom( contextFile );
+                mavenFileFilterRequest.setTo( temporaryContextFile );
+                mavenFileFilterRequest.setMavenProject( project );
+                mavenFileFilterRequest.setMavenSession( session );
+                mavenFileFilterRequest.setFiltering( true );
+
+                mavenFileFilter.copyFile( mavenFileFilterRequest );
+
+                fr = new FileReader( temporaryContextFile );
+                Xpp3Dom xpp3Dom = Xpp3DomBuilder.build( fr );
+                xpp3Dom.setAttribute( "backgroundProcessorDelay", Integer.toString( backgroundProcessorDelay ) );
+                xpp3Dom.setAttribute( "reloadable", Boolean.toString( isContextReloadable() ) );
+                fw = new FileWriter( temporaryContextFile );
+                Xpp3DomWriter.write( fw, xpp3Dom );
+                Xpp3DomWriter.write( sw, xpp3Dom );
+                getLog().debug( " generated context file " + sw.toString() );
+            }
+            else
+            {
+                if ( contextReloadable )
+                {
+                    // don't care about using a complicated xml api to create one xml line :-)
+                    StringBuilder sb = new StringBuilder( "<Context " ).append( "backgroundProcessorDelay=\"" ).append(
+                        Integer.toString( backgroundProcessorDelay ) ).append( "\"" ).append(
+                        " reloadable=\"" + Boolean.toString( isContextReloadable() ) + "\"/>" );
+
+                    getLog().debug( " generated context file " + sb.toString() );
+                    fw = new FileWriter( temporaryContextFile );
+                    fw.write( sb.toString() );
+                }
+                else
+                {
+                    // no user context file and contextReloadable false so no need about creating a hack one
+                    return null;
+                }
+            }
+        }
+        catch ( IOException e )
+        {
+            getLog().error( "error creating fake context.xml : " + e.getMessage(), e );
+            throw new MojoExecutionException( "error creating fake context.xml : " + e.getMessage(), e );
+        }
+        catch ( XmlPullParserException e )
+        {
+            getLog().error( "error creating fake context.xml : " + e.getMessage(), e );
+            throw new MojoExecutionException( "error creating fake context.xml : " + e.getMessage(), e );
+        }
+        catch ( MavenFilteringException e )
+        {
+            getLog().error( "error filtering context.xml : " + e.getMessage(), e );
+            throw new MojoExecutionException( "error filtering context.xml : " + e.getMessage(), e );
+        }
+        finally
+        {
+            IOUtil.close( fw );
+            IOUtil.close( fr );
+            IOUtil.close( sw );
+        }
+
+        return temporaryContextFile;
+    }
+
+    /**
+     * {@inheritDoc}
+     *
+     * @throws MojoExecutionException
+     */
+    @Override
+    protected WebappLoader createWebappLoader()
+        throws IOException, MojoExecutionException
+    {
+        WebappLoader loader = super.createWebappLoader();
+
+        if ( useSeparateTomcatClassLoader )
+        {
+            loader.setDelegate( delegate );
+        }
+
+        return loader;
+    }
+
+    @Override
+    protected void enhanceContext( final Context context )
+        throws MojoExecutionException
+    {
+        super.enhanceContext( context );
+
+        try
+        {
+            ClassLoaderEntriesCalculatorRequest request = new ClassLoaderEntriesCalculatorRequest() //
+                .setDependencies( dependencies ) //
+                .setLog( getLog() ) //
+                .setMavenProject( project ) //
+                .setAddWarDependenciesInClassloader( addWarDependenciesInClassloader ) //
+                .setUseTestClassPath( useTestClasspath );
+            ClassLoaderEntriesCalculatorResult classLoaderEntriesCalculatorResult =
+                classLoaderEntriesCalculator.calculateClassPathEntries( request );
+            final List<String> classLoaderEntries = classLoaderEntriesCalculatorResult.getClassPathEntries();
+            final List<File> tmpDirectories = classLoaderEntriesCalculatorResult.getTmpDirectories();
+
+            final List<String> jarPaths = extractJars( classLoaderEntries );
+
+            Runtime.getRuntime().addShutdownHook( new Thread()
+            {
+                @Override
+                public void run()
+                {
+                    for ( File tmpDir : tmpDirectories )
+                    {
+                        try
+                        {
+                            FileUtils.deleteDirectory( tmpDir );
+                        }
+                        catch ( IOException e )
+                        {
+                            // ignore
+                        }
+                    }
+                }
+            } );
+
+            if ( classLoaderEntries != null )
+            {
+                WebResourceSet webResourceSet = new FileResourceSet()
+                {
+                    @Override
+                    public WebResource getResource( String path )
+                    {
+
+                        if ( StringUtils.startsWithIgnoreCase( path, "/WEB-INF/LIB" ) )
+                        {
+                            File file = new File( StringUtils.removeStartIgnoreCase( path, "/WEB-INF/LIB" ) );
+                            return new FileResource( context.getResources(), getPath(), file, true );
+                        }
+                        if ( StringUtils.equalsIgnoreCase( path, "/WEB-INF/classes" ) )
+                        {
+                            return new FileResource( context.getResources(), getPath(),
+                                                     new File( project.getBuild().getOutputDirectory() ), true );
+                        }
+
+                        File file = new File( project.getBuild().getOutputDirectory(), path );
+                        if ( file.exists() )
+                        {
+                            return new FileResource( context.getResources(), getPath(), file, true );
+                        }
+
+                        if ( StringUtils.endsWith( path, ".class" ) )
+                        {
+                            // so we search the class file in the jars
+                            for ( String jarPath : jarPaths )
+                            {
+                                File jar = new File( jarPath );
+                                if ( !jar.exists() )
+                                {
+                                    continue;
+                                }
+
+                                try
+                                {
+                                    JarFile jarFile = new JarFile( jar );
+
+                                    if ( jarFile.getEntry( StringUtils.removeStart( path, "/" ) ) != null )
+                                    {
+                                        return new FileResource( context.getResources(), getPath(), jar, true );
+                                    }
+                                }
+                                catch ( IOException e )
+                                {
+                                    getLog().debug( "skip error building jar file: " + e.getMessage(), e );
+                                }
+
+                            }
+                        }
+
+                        return new EmptyResource( null, path );
+                    }
+
+                    @Override
+                    public String[] list( String path )
+                    {
+                        if ( StringUtils.startsWithIgnoreCase( path, "/WEB-INF/LIB" ) )
+                        {
+                            return jarPaths.toArray( new String[jarPaths.size()] );
+                        }
+                        if ( StringUtils.equalsIgnoreCase( path, "/WEB-INF/classes" ) )
+                        {
+                            return new String[]{ new File( project.getBuild().getOutputDirectory() ).getPath() };
+                        }
+                        return super.list( path );
+                    }
+
+                    @Override
+                    public Set<String> listWebAppPaths( String path )
+                    {
+
+                        if ( StringUtils.equalsIgnoreCase( "/WEB-INF/lib/", path ) )
+                        {
+                            // adding outputDirectory as well?
+                            return new HashSet<String>( jarPaths );
+                        }
+
+                        File filePath = new File( getWarSourceDirectory(), path );
+
+                        if ( filePath.isDirectory() )
+                        {
+                            Set<String> paths = new HashSet<String>();
+
+                            String[] files = filePath.list();
+                            if ( files == null )
+                            {
+                                return paths;
+                            }
+
+                            for ( String file : files )
+                            {
+                                paths.add( file );
+                            }
+
+                            return paths;
+
+                        }
+                        else
+                        {
+                            return Collections.emptySet();
+                        }
+                    }
+
+                    @Override
+                    public boolean mkdir( String path )
+                    {
+                        return super.mkdir( path );
+                    }
+
+                    @Override
+                    public boolean write( String path, InputStream is, boolean overwrite )
+                    {
+                        return super.write( path, is, overwrite );
+                    }
+
+                    @Override
+                    protected void checkType( File file )
+                    {
+                        //super.checkType( file );
+                    }
+
+
+                };
+
+                context.getResources().addJarResources( webResourceSet );
+            }
+
+        }
+        catch ( TomcatRunException e )
+        {
+            throw new MojoExecutionException( e.getMessage(), e );
+        }
+
+    }
+
+
+    /**
+     * extract List of path which are files (removing directories from the initial list)
+     *
+     * @param classLoaderEntries
+     * @return
+     */
+    private List<String> extractJars( List<String> classLoaderEntries )
+        throws MojoExecutionException
+    {
+
+        List<String> jarPaths = new ArrayList<String>();
+
+        try
+        {
+            for ( String classLoaderEntry : classLoaderEntries )
+            {
+                URI uri = new URI( classLoaderEntry );
+                File file = new File( uri );
+                if ( !file.isDirectory() )
+                {
+                    jarPaths.add( file.getAbsolutePath() );
+                }
+            }
+        }
+        catch ( URISyntaxException e )
+        {
+            throw new MojoExecutionException( e.getMessage(), e );
+        }
+
+        return jarPaths;
+
+    }
+}
diff --git a/tomcat8-maven-plugin/src/main/java/org/apache/tomcat/maven/plugin/tomcat8/run/RunWarMojo.java b/tomcat8-maven-plugin/src/main/java/org/apache/tomcat/maven/plugin/tomcat8/run/RunWarMojo.java
new file mode 100644
index 0000000..17c3910
--- /dev/null
+++ b/tomcat8-maven-plugin/src/main/java/org/apache/tomcat/maven/plugin/tomcat8/run/RunWarMojo.java
@@ -0,0 +1,40 @@
+package org.apache.tomcat.maven.plugin.tomcat8.run;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+
+import org.apache.maven.plugins.annotations.Execute;
+import org.apache.maven.plugins.annotations.LifecyclePhase;
+import org.apache.maven.plugins.annotations.Mojo;
+import org.apache.maven.plugins.annotations.ResolutionScope;
+
+/**
+ * Runs the current project as a packaged web application using an embedded Tomcat server.
+ *
+ * @author Mark Hobson <markhobson@gmail.com>
+ * @todo depend on war:exploded when MNG-1649 resolved
+ */
+@Mojo( name = "run-war", requiresDependencyResolution = ResolutionScope.RUNTIME, threadSafe = true )
+@Execute( phase = LifecyclePhase.PACKAGE )
+public class RunWarMojo
+    extends AbstractRunWarMojo
+{
+    // no-op : only mojo metadata overriding
+}
diff --git a/tomcat8-maven-plugin/src/main/java/org/apache/tomcat/maven/plugin/tomcat8/run/RunWarOnlyMojo.java b/tomcat8-maven-plugin/src/main/java/org/apache/tomcat/maven/plugin/tomcat8/run/RunWarOnlyMojo.java
new file mode 100644
index 0000000..4abf8da
--- /dev/null
+++ b/tomcat8-maven-plugin/src/main/java/org/apache/tomcat/maven/plugin/tomcat8/run/RunWarOnlyMojo.java
@@ -0,0 +1,36 @@
+package org.apache.tomcat.maven.plugin.tomcat8.run;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+
+import org.apache.maven.plugins.annotations.Mojo;
+import org.apache.maven.plugins.annotations.ResolutionScope;
+
+/**
+ * Same as run-war goal without forking the package cycle.
+ *
+ * @author vlatombe
+ */
+@Mojo( name = "run-war-only", requiresDependencyResolution = ResolutionScope.RUNTIME, threadSafe = true )
+public class RunWarOnlyMojo
+    extends AbstractRunWarMojo
+{
+    // no-op : only mojo metadata overriding
+}
diff --git a/tomcat8-maven-plugin/src/main/java/org/apache/tomcat/maven/plugin/tomcat8/run/ShutdownMojo.java b/tomcat8-maven-plugin/src/main/java/org/apache/tomcat/maven/plugin/tomcat8/run/ShutdownMojo.java
new file mode 100644
index 0000000..c90a49c
--- /dev/null
+++ b/tomcat8-maven-plugin/src/main/java/org/apache/tomcat/maven/plugin/tomcat8/run/ShutdownMojo.java
@@ -0,0 +1,90 @@
+package org.apache.tomcat.maven.plugin.tomcat8.run;
+
+/*
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements.  See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership.  The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License"); you may not use this file except in compliance
+* with the License.  You may obtain a copy of the License at
+*
+*   http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing,
+* software distributed under the License is distributed on an
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+* KIND, either express or implied.  See the License for the
+* specific language governing permissions and limitations
+* under the License.
+*/
+
+import org.apache.maven.plugin.MojoExecutionException;
+import org.apache.maven.plugins.annotations.Mojo;
+import org.apache.maven.plugins.annotations.Parameter;
+import org.apache.maven.plugins.annotations.ResolutionScope;
+import org.apache.tomcat.maven.common.run.EmbeddedRegistry;
+import org.apache.tomcat.maven.plugin.tomcat8.AbstractTomcat7Mojo;
+
+
+/**
+ * <p>
+ * Shuts down all possibly started embedded Tomcat servers. This will be automatically done
+ * through a shutdown hook or you may call this Mojo to shut them down explictly.
+ * </p>
+ * <p>
+ * By default the <code>shutdown</code> goal is not bound to any phase. For integration tests
+ * you might want to bind it to <code>post-integration-test</code>.
+ * </p>
+ *
+ * @author Mark Michaelis
+ * @since 2.0
+ */
+@Mojo( name = "shutdown", requiresDependencyResolution = ResolutionScope.RUNTIME, threadSafe = true )
+public class ShutdownMojo
+    extends AbstractTomcat7Mojo
+{
+
+    /**
+     * Ignore error when shutdown
+     *
+     * @since 2.0
+     */
+    @Parameter( property = "maven.tomcat.skipErrorOnShutdown", defaultValue = "false" )
+    protected boolean skipErrorOnShutdown;
+
+    /**
+     * Skip execution
+     *
+     * @since 2.0
+     */
+    @Parameter( property = "maven.tomcat.skipShutdown", defaultValue = "false" )
+    protected boolean skip;
+
+    /**
+     * Shuts down all embedded tomcats which got started up to now.
+     *
+     * @throws org.apache.maven.plugin.MojoExecutionException
+     *          if shutting down one or all servers failed
+     */
+    public void execute()
+        throws MojoExecutionException
+    {
+        if ( skip )
+        {
+            getLog().info( "skip execution" );
+            return;
+        }
+        try
+        {
+            EmbeddedRegistry.getInstance().shutdownAll( getLog() );
+        }
+        catch ( Exception e )
+        {
+            if ( !skipErrorOnShutdown )
+            {
+                throw new MojoExecutionException( messagesProvider.getMessage( "ShutdownMojo.shutdownError" ), e );
+            }
+        }
+    }
+}
diff --git a/tomcat8-maven-plugin/src/main/java/org/apache/tomcat/maven/plugin/tomcat8/run/StandaloneWarMojo.java b/tomcat8-maven-plugin/src/main/java/org/apache/tomcat/maven/plugin/tomcat8/run/StandaloneWarMojo.java
new file mode 100644
index 0000000..7479e4b
--- /dev/null
+++ b/tomcat8-maven-plugin/src/main/java/org/apache/tomcat/maven/plugin/tomcat8/run/StandaloneWarMojo.java
@@ -0,0 +1,36 @@
+package org.apache.tomcat.maven.plugin.tomcat8.run;
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import org.apache.maven.plugins.annotations.Execute;
+import org.apache.maven.plugins.annotations.LifecyclePhase;
+import org.apache.maven.plugins.annotations.Mojo;
+
+/**
+ * This Mojo will create an executable war file with embedded Tomcat that is also capable of being deployed elsewhere.
+ *
+ * @since 2.1
+ */
+@Mojo(name = "standalone-war", threadSafe = true)
+@Execute(phase = LifecyclePhase.PACKAGE)
+public class StandaloneWarMojo
+    extends AbstractStandaloneWarMojo
+{
+    // no op
+}
diff --git a/tomcat8-maven-plugin/src/main/java/org/apache/tomcat/maven/plugin/tomcat8/run/StandaloneWarOnlyMojo.java b/tomcat8-maven-plugin/src/main/java/org/apache/tomcat/maven/plugin/tomcat8/run/StandaloneWarOnlyMojo.java
new file mode 100644
index 0000000..8587820
--- /dev/null
+++ b/tomcat8-maven-plugin/src/main/java/org/apache/tomcat/maven/plugin/tomcat8/run/StandaloneWarOnlyMojo.java
@@ -0,0 +1,33 @@
+package org.apache.tomcat.maven.plugin.tomcat8.run;
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import org.apache.maven.plugins.annotations.Mojo;
+
+/**
+ * This Mojo will create an executable war file with embedded Tomcat that is also capable of being deployed elsewhere.
+ *
+ * @since 2.1
+ */
+@Mojo(name = "standalone-war-only", threadSafe = true)
+public class StandaloneWarOnlyMojo
+    extends AbstractStandaloneWarMojo
+{
+    // no op
+}
diff --git a/tomcat8-maven-plugin/src/main/java/org/apache/tomcat/maven/plugin/tomcat8/run/WarRunDependency.java b/tomcat8-maven-plugin/src/main/java/org/apache/tomcat/maven/plugin/tomcat8/run/WarRunDependency.java
new file mode 100644
index 0000000..f28d180
--- /dev/null
+++ b/tomcat8-maven-plugin/src/main/java/org/apache/tomcat/maven/plugin/tomcat8/run/WarRunDependency.java
@@ -0,0 +1,43 @@
+package org.apache.tomcat.maven.plugin.tomcat8.run;
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import org.apache.maven.model.Dependency;
+
+import java.io.File;
+
+/**
+ * @author Olivier Lamy
+ * @since 2.0
+ */
+public class WarRunDependency
+{
+
+    public Dependency dependency;
+
+    public String contextPath;
+
+    public File contextXml;
+
+    public WarRunDependency()
+    {
+        // no op
+    }
+
+}
diff --git a/tomcat8-maven-plugin/src/main/java/org/apache/tomcat/maven/plugin/tomcat8/run/Webapp.java b/tomcat8-maven-plugin/src/main/java/org/apache/tomcat/maven/plugin/tomcat8/run/Webapp.java
new file mode 100644
index 0000000..afb3f5b
--- /dev/null
+++ b/tomcat8-maven-plugin/src/main/java/org/apache/tomcat/maven/plugin/tomcat8/run/Webapp.java
@@ -0,0 +1,44 @@
+package org.apache.tomcat.maven.plugin.tomcat8.run;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import org.apache.maven.artifact.Artifact;
+import org.apache.tomcat.maven.common.config.AbstractWebapp;
+
+/**
+ * Webapp represents information specified in the plugin configuration section
+ * for each webapp.
+ *
+ * @since 2.0
+ */
+public class Webapp
+    extends AbstractWebapp
+{
+
+    public Webapp()
+    {
+        // default constructor
+    }
+
+    public Webapp( Artifact artifact )
+    {
+        super( artifact );
+    }
+}
diff --git a/tomcat8-maven-plugin/src/main/resources/conf/logging.properties b/tomcat8-maven-plugin/src/main/resources/conf/logging.properties
new file mode 100644
index 0000000..76c9512
--- /dev/null
+++ b/tomcat8-maven-plugin/src/main/resources/conf/logging.properties
@@ -0,0 +1,64 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+handlers = 1catalina.org.apache.juli.FileHandler, 2localhost.org.apache.juli.FileHandler, 3manager.org.apache.juli.FileHandler, 4host-manager.org.apache.juli.FileHandler, java.util.logging.ConsoleHandler
+
+.handlers = 1catalina.org.apache.juli.FileHandler, java.util.logging.ConsoleHandler
+
+############################################################
+# Handler specific properties.
+# Describes specific configuration info for Handlers.
+############################################################
+
+1catalina.org.apache.juli.FileHandler.level = FINE
+1catalina.org.apache.juli.FileHandler.directory = ${catalina.base}/logs
+1catalina.org.apache.juli.FileHandler.prefix = catalina.
+
+2localhost.org.apache.juli.FileHandler.level = FINE
+2localhost.org.apache.juli.FileHandler.directory = ${catalina.base}/logs
+2localhost.org.apache.juli.FileHandler.prefix = localhost.
+
+3manager.org.apache.juli.FileHandler.level = FINE
+3manager.org.apache.juli.FileHandler.directory = ${catalina.base}/logs
+3manager.org.apache.juli.FileHandler.prefix = manager.
+
+4host-manager.org.apache.juli.FileHandler.level = FINE
+4host-manager.org.apache.juli.FileHandler.directory = ${catalina.base}/logs
+4host-manager.org.apache.juli.FileHandler.prefix = host-manager.
+
+java.util.logging.ConsoleHandler.level = FINE
+java.util.logging.ConsoleHandler.formatter = java.util.logging.SimpleFormatter
+
+
+############################################################
+# Facility specific properties.
+# Provides extra control for each logger.
+############################################################
+
+org.apache.catalina.core.ContainerBase.[Catalina].[localhost].level = INFO
+org.apache.catalina.core.ContainerBase.[Catalina].[localhost].handlers = 2localhost.org.apache.juli.FileHandler
+
+org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/manager].level = INFO
+org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/manager].handlers = 3manager.org.apache.juli.FileHandler
+
+org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/host-manager].level = INFO
+org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/host-manager].handlers = 4host-manager.org.apache.juli.FileHandler
+
+# For example, set the org.apache.catalina.util.LifecycleBase logger to log
+# each component that extends LifecycleBase changing state:
+#org.apache.catalina.util.LifecycleBase.level = FINE
+
+# To see debug messages in TldLocationsCache, uncomment the following line:
+#org.apache.jasper.compiler.TldLocationsCache.level = FINE
diff --git a/tomcat8-maven-plugin/src/main/resources/conf/tomcat-users.xml b/tomcat8-maven-plugin/src/main/resources/conf/tomcat-users.xml
new file mode 100644
index 0000000..7114f5d
--- /dev/null
+++ b/tomcat8-maven-plugin/src/main/resources/conf/tomcat-users.xml
@@ -0,0 +1,26 @@
+<?xml version='1.0' encoding='utf-8'?>
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You under the Apache License, Version 2.0
+  (the "License"); you may not use this file except in compliance with
+  the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+-->
+<tomcat-users>
+<!--
+  <role rolename="tomcat"/>
+  <role rolename="role1"/>
+  <user username="tomcat" password="tomcat" roles="tomcat"/>
+  <user username="both" password="tomcat" roles="tomcat,role1"/>
+  <user username="role1" password="tomcat" roles="role1"/>
+-->
+</tomcat-users>
diff --git a/tomcat8-maven-plugin/src/main/resources/conf/web.xml b/tomcat8-maven-plugin/src/main/resources/conf/web.xml
new file mode 100644
index 0000000..cc8383c
--- /dev/null
+++ b/tomcat8-maven-plugin/src/main/resources/conf/web.xml
@@ -0,0 +1,4283 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You under the Apache License, Version 2.0
+  (the "License"); you may not use this file except in compliance with
+  the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+-->
+<web-app xmlns="http://java.sun.com/xml/ns/javaee"
+  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+  xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
+                      http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd"
+  version="3.0">
+
+  <!-- ======================== Introduction ============================== -->
+  <!-- This document defines default values for *all* web applications      -->
+  <!-- loaded into this instance of Tomcat.  As each application is         -->
+  <!-- deployed, this file is processed, followed by the                    -->
+  <!-- "/WEB-INF/web.xml" deployment descriptor from your own               -->
+  <!-- applications.                                                        -->
+  <!--                                                                      -->
+  <!-- WARNING:  Do not configure application-specific resources here!      -->
+  <!-- They should go in the "/WEB-INF/web.xml" file in your application.   -->
+
+
+  <!-- ================== Built In Servlet Definitions ==================== -->
+
+
+  <!-- The default servlet for all web applications, that serves static     -->
+  <!-- resources.  It processes all requests that are not mapped to other   -->
+  <!-- servlets with servlet mappings (defined either here or in your own   -->
+  <!-- web.xml file).  This servlet supports the following initialization   -->
+  <!-- parameters (default values are in square brackets):                  -->
+  <!--                                                                      -->
+  <!--   debug               Debugging detail level for messages logged     -->
+  <!--                       by this servlet.  [0]                          -->
+  <!--                                                                      -->
+  <!--   fileEncoding        Encoding to be used to read static resources   -->
+  <!--                       [platform default]                             -->
+  <!--                                                                      -->
+  <!--   input               Input buffer size (in bytes) when reading      -->
+  <!--                       resources to be served.  [2048]                -->
+  <!--                                                                      -->
+  <!--   listings            Should directory listings be produced if there -->
+  <!--                       is no welcome file in this directory?  [false] -->
+  <!--                       WARNING: Listings for directories with many    -->
+  <!--                       entries can be slow and may consume            -->
+  <!--                       significant proportions of server resources.   -->
+  <!--                                                                      -->
+  <!--   output              Output buffer size (in bytes) when writing     -->
+  <!--                       resources to be served.  [2048]                -->
+  <!--                                                                      -->
+  <!--   readonly            Is this context "read only", so HTTP           -->
+  <!--                       commands like PUT and DELETE are               -->
+  <!--                       rejected?  [true]                              -->
+  <!--                                                                      -->
+  <!--   readmeFile          File to display together with the directory    -->
+  <!--                       contents. [null]                               -->
+  <!--                                                                      -->
+  <!--   sendfileSize        If the connector used supports sendfile, this  -->
+  <!--                       represents the minimal file size in KB for     -->
+  <!--                       which sendfile will be used. Use a negative    -->
+  <!--                       value to always disable sendfile.  [48]        -->
+  <!--                                                                      -->
+  <!--   useAcceptRanges     Should the Accept-Ranges header be included    -->
+  <!--                       in responses where appropriate? [true]         -->
+  <!--                                                                      -->
+  <!--  For directory listing customization. Checks localXsltFile, then     -->
+  <!--  globalXsltFile, then defaults to original behavior.                 -->
+  <!--                                                                      -->
+  <!--   localXsltFile       Make directory listings an XML doc and         -->
+  <!--                       pass the result to this style sheet residing   -->
+  <!--                       in that directory. This overrides              -->
+  <!--                       contextXsltFile and globalXsltFile[null]       -->
+  <!--                                                                      -->
+  <!--   contextXsltFile     Make directory listings an XML doc and         -->
+  <!--                       pass the result to this style sheet which is   -->
+  <!--                       relative to the context root. This overrides   -->
+  <!--                       globalXsltFile[null]                           -->
+  <!--                                                                      -->
+  <!--   globalXsltFile      Site wide configuration version of             -->
+  <!--                       localXsltFile This argument is expected        -->
+  <!--                       to be a physical file. [null]                  -->
+  <!--                                                                      -->
+  <!--                                                                      -->
+
+    <servlet>
+        <servlet-name>default</servlet-name>
+        <servlet-class>org.apache.catalina.servlets.DefaultServlet</servlet-class>
+        <init-param>
+            <param-name>debug</param-name>
+            <param-value>0</param-value>
+        </init-param>
+        <init-param>
+            <param-name>listings</param-name>
+            <param-value>false</param-value>
+        </init-param>
+        <load-on-startup>1</load-on-startup>
+    </servlet>
+
+
+  <!-- The JSP page compiler and execution servlet, which is the mechanism  -->
+  <!-- used by Tomcat to support JSP pages.  Traditionally, this servlet    -->
+  <!-- is mapped to the URL pattern "*.jsp".  This servlet supports the     -->
+  <!-- following initialization parameters (default values are in square    -->
+  <!-- brackets):                                                           -->
+  <!--                                                                      -->
+  <!--   checkInterval       If development is false and checkInterval is   -->
+  <!--                       greater than zero, background compilations are -->
+  <!--                       enabled. checkInterval is the time in seconds  -->
+  <!--                       between checks to see if a JSP page (and its   -->
+  <!--                       dependent files) needs to  be recompiled. [0]  -->
+  <!--                                                                      -->
+  <!--   classdebuginfo      Should the class file be compiled with         -->
+  <!--                       debugging information?  [true]                 -->
+  <!--                                                                      -->
+  <!--   classpath           What class path should I use while compiling   -->
+  <!--                       generated servlets?  [Created dynamically      -->
+  <!--                       based on the current web application]          -->
+  <!--                                                                      -->
+  <!--   compiler            Which compiler Ant should use to compile JSP   -->
+  <!--                       pages.  See the jasper documentation for more  -->
+  <!--                       information.                                   -->
+  <!--                                                                      -->
+  <!--   compilerSourceVM    Compiler source VM. [1.6]                      -->
+  <!--                                                                      -->
+  <!--   compilerTargetVM    Compiler target VM. [1.6]                      -->
+  <!--                                                                      -->
+  <!--   development         Is Jasper used in development mode? If true,   -->
+  <!--                       the frequency at which JSPs are checked for    -->
+  <!--                       modification may be specified via the          -->
+  <!--                       modificationTestInterval parameter. [true]     -->
+  <!--                                                                      -->
+  <!--   displaySourceFragment                                              -->
+  <!--                       Should a source fragment be included in        -->
+  <!--                       exception messages? [true]                     -->
+  <!--                                                                      -->
+  <!--   dumpSmap            Should the SMAP info for JSR45 debugging be    -->
+  <!--                       dumped to a file? [false]                      -->
+  <!--                       False if suppressSmap is true                  -->
+  <!--                                                                      -->
+  <!--   enablePooling       Determines whether tag handler pooling is      -->
+  <!--                       enabled. This is a compilation option. It will -->
+  <!--                       not alter the behaviour of JSPs that have      -->
+  <!--                       already been compiled. [true]                  -->
+  <!--                                                                      -->
+  <!--   engineOptionsClass  Allows specifying the Options class used to    -->
+  <!--                       configure Jasper. If not present, the default  -->
+  <!--                       EmbeddedServletOptions will be used.           -->
+  <!--                                                                      -->
+  <!--   errorOnUseBeanInvalidClassAttribute                                -->
+  <!--                       Should Jasper issue an error when the value of -->
+  <!--                       the class attribute in an useBean action is    -->
+  <!--                       not a valid bean class?  [true]                -->
+  <!--                                                                      -->
+  <!--   fork                Tell Ant to fork compiles of JSP pages so that -->
+  <!--                       a separate JVM is used for JSP page compiles   -->
+  <!--                       from the one Tomcat is running in. [true]      -->
+  <!--                                                                      -->
+  <!--   genStringAsCharArray                                               -->
+  <!--                       Should text strings be generated as char       -->
+  <!--                       arrays, to improve performance in some cases?  -->
+  <!--                       [false]                                        -->
+  <!--                                                                      -->
+  <!--   ieClassId           The class-id value to be sent to Internet      -->
+  <!--                       Explorer when using <jsp:plugin> tags.         -->
+  <!--                       [clsid:8AD9C840-044E-11D1-B3E9-00805F499D93]   -->
+  <!--                                                                      -->
+  <!--   javaEncoding        Java file encoding to use for generating java  -->
+  <!--                       source files. [UTF8]                           -->
+  <!--                                                                      -->
+  <!--   keepgenerated       Should we keep the generated Java source code  -->
+  <!--                       for each page instead of deleting it? [true]   -->
+  <!--                                                                      -->
+  <!--   mappedfile          Should we generate static content with one     -->
+  <!--                       print statement per input line, to ease        -->
+  <!--                       debugging?  [true]                             -->
+  <!--                                                                      -->
+  <!--   maxLoadedJsps       The maximum number of JSPs that will be loaded -->
+  <!--                       for a web application. If more than this       -->
+  <!--                       number of JSPs are loaded, the least recently  -->
+  <!--                       used JSPs will be unloaded so that the number  -->
+  <!--                       of JSPs loaded at any one time does not exceed -->
+  <!--                       this limit. A value of zero or less indicates  -->
+  <!--                       no limit. [-1]                                 -->
+  <!--                                                                      -->
+  <!--   jspIdleTimeout      The amount of time in seconds a JSP can be     -->
+  <!--                       idle before it is unloaded. A value of zero    -->
+  <!--                       or less indicates never unload. [-1]           -->
+  <!--                                                                      -->
+  <!--   modificationTestInterval                                           -->
+  <!--                       Causes a JSP (and its dependent files) to not  -->
+  <!--                       be checked for modification during the         -->
+  <!--                       specified time interval (in seconds) from the  -->
+  <!--                       last time the JSP was checked for              -->
+  <!--                       modification. A value of 0 will cause the JSP  -->
+  <!--                       to be checked on every access.                 -->
+  <!--                       Used in development mode only. [4]             -->
+  <!--                                                                      -->
+  <!--   recompileOnFail     If a JSP compilation fails should the          -->
+  <!--                       modificationTestInterval be ignored and the    -->
+  <!--                       next access trigger a re-compilation attempt?  -->
+  <!--                       Used in development mode only and is disabled  -->
+  <!--                       by default as compilation may be expensive and -->
+  <!--                       could lead to excessive resource usage.        -->
+  <!--                       [false]                                        -->
+  <!--                                                                      -->
+  <!--   scratchdir          What scratch directory should we use when      -->
+  <!--                       compiling JSP pages?  [default work directory  -->
+  <!--                       for the current web application]               -->
+  <!--                                                                      -->
+  <!--   suppressSmap        Should the generation of SMAP info for JSR45   -->
+  <!--                       debugging be suppressed?  [false]              -->
+  <!--                                                                      -->
+  <!--   trimSpaces          Should white spaces in template text between   -->
+  <!--                       actions or directives be trimmed?  [false]     -->
+  <!--                                                                      -->
+  <!--   xpoweredBy          Determines whether X-Powered-By response       -->
+  <!--                       header is added by generated servlet.  [false] -->
+
+    <servlet>
+        <servlet-name>jsp</servlet-name>
+        <servlet-class>org.apache.jasper.servlet.JspServlet</servlet-class>
+        <init-param>
+            <param-name>fork</param-name>
+            <param-value>false</param-value>
+        </init-param>
+        <init-param>
+            <param-name>xpoweredBy</param-name>
+            <param-value>false</param-value>
+        </init-param>
+        <load-on-startup>3</load-on-startup>
+    </servlet>
+
+
+  <!-- NOTE: An SSI Filter is also available as an alternative SSI          -->
+  <!-- implementation. Use either the Servlet or the Filter but NOT both.   -->
+  <!--                                                                      -->
+  <!-- Server Side Includes processing servlet, which processes SSI         -->
+  <!-- directives in HTML pages consistent with similar support in web      -->
+  <!-- servers like Apache.  Traditionally, this servlet is mapped to the   -->
+  <!-- URL pattern "*.shtml".  This servlet supports the following          -->
+  <!-- initialization parameters (default values are in square brackets):   -->
+  <!--                                                                      -->
+  <!--   buffered            Should output from this servlet be buffered?   -->
+  <!--                       (0=false, 1=true)  [0]                         -->
+  <!--                                                                      -->
+  <!--   debug               Debugging detail level for messages logged     -->
+  <!--                       by this servlet.  [0]                          -->
+  <!--                                                                      -->
+  <!--   expires             The number of seconds before a page with SSI   -->
+  <!--                       directives will expire.  [No default]          -->
+  <!--                                                                      -->
+  <!--   isVirtualWebappRelative                                            -->
+  <!--                       Should "virtual" paths be interpreted as       -->
+  <!--                       relative to the context root, instead of       -->
+  <!--                       the server root?  (0=false, 1=true) [0]        -->
+  <!--                                                                      -->
+  <!--   inputEncoding       The encoding to assume for SSI resources if    -->
+  <!--                       one is not available from the resource.        -->
+  <!--                       [Platform default]                             -->
+  <!--                                                                      -->
+  <!--   outputEncoding      The encoding to use for the page that results  -->
+  <!--                       from the SSI processing. [UTF-8]               -->
+  <!--                                                                      -->
+  <!--   allowExec           Is use of the exec command enabled? [false]    -->
+
+<!--
+    <servlet>
+        <servlet-name>ssi</servlet-name>
+        <servlet-class>
+          org.apache.catalina.ssi.SSIServlet
+        </servlet-class>
+        <init-param>
+          <param-name>buffered</param-name>
+          <param-value>1</param-value>
+        </init-param>
+        <init-param>
+          <param-name>debug</param-name>
+          <param-value>0</param-value>
+        </init-param>
+        <init-param>
+          <param-name>expires</param-name>
+          <param-value>666</param-value>
+        </init-param>
+        <init-param>
+          <param-name>isVirtualWebappRelative</param-name>
+          <param-value>0</param-value>
+        </init-param>
+        <load-on-startup>4</load-on-startup>
+    </servlet>
+-->
+
+
+  <!-- Common Gateway Includes (CGI) processing servlet, which supports     -->
+  <!-- execution of external applications that conform to the CGI spec      -->
+  <!-- requirements.  Typically, this servlet is mapped to the URL pattern  -->
+  <!-- "/cgi-bin/*", which means that any CGI applications that are         -->
+  <!-- executed must be present within the web application.  This servlet   -->
+  <!-- supports the following initialization parameters (default values     -->
+  <!-- are in square brackets):                                             -->
+  <!--                                                                      -->
+  <!--   cgiPathPrefix        The CGI search path will start at             -->
+  <!--                        webAppRootDir + File.separator + this prefix. -->
+  <!--                        [WEB-INF/cgi]                                 -->
+  <!--                                                                      -->
+  <!--   debug                Debugging detail level for messages logged    -->
+  <!--                        by this servlet.  [0]                         -->
+  <!--                                                                      -->
+  <!--   executable           Name of the executable used to run the        -->
+  <!--                        script. [perl]                                -->
+  <!--                                                                      -->
+  <!--   parameterEncoding    Name of parameter encoding to be used with    -->
+  <!--                        CGI servlet.                                  -->
+  <!--                        [System.getProperty("file.encoding","UTF-8")] -->
+  <!--                                                                      -->
+  <!--   passShellEnvironment Should the shell environment variables (if    -->
+  <!--                        any) be passed to the CGI script? [false]     -->
+  <!--                                                                      -->
+  <!--   stderrTimeout        The time (in milliseconds) to wait for the    -->
+  <!--                        reading of stderr to complete before          -->
+  <!--                        terminating the CGI process. [2000]           -->
+
+<!--
+    <servlet>
+        <servlet-name>cgi</servlet-name>
+        <servlet-class>org.apache.catalina.servlets.CGIServlet</servlet-class>
+        <init-param>
+          <param-name>debug</param-name>
+          <param-value>0</param-value>
+        </init-param>
+        <init-param>
+          <param-name>cgiPathPrefix</param-name>
+          <param-value>WEB-INF/cgi</param-value>
+        </init-param>
+         <load-on-startup>5</load-on-startup>
+    </servlet>
+-->
+
+
+  <!-- ================ Built In Servlet Mappings ========================= -->
+
+
+  <!-- The servlet mappings for the built in servlets defined above.  Note  -->
+  <!-- that, by default, the CGI and SSI servlets are *not* mapped.  You    -->
+  <!-- must uncomment these mappings (or add them to your application's own -->
+  <!-- web.xml deployment descriptor) to enable these services              -->
+
+    <!-- The mapping for the default servlet -->
+    <servlet-mapping>
+        <servlet-name>default</servlet-name>
+        <url-pattern>/</url-pattern>
+    </servlet-mapping>
+
+    <!-- The mappings for the JSP servlet -->
+    <servlet-mapping>
+        <servlet-name>jsp</servlet-name>
+        <url-pattern>*.jsp</url-pattern>
+        <url-pattern>*.jspx</url-pattern>
+    </servlet-mapping>
+
+    <!-- The mapping for the SSI servlet -->
+<!--
+    <servlet-mapping>
+        <servlet-name>ssi</servlet-name>
+        <url-pattern>*.shtml</url-pattern>
+    </servlet-mapping>
+-->
+
+    <!-- The mapping for the CGI Gateway servlet -->
+
+<!--
+    <servlet-mapping>
+        <servlet-name>cgi</servlet-name>
+        <url-pattern>/cgi-bin/*</url-pattern>
+    </servlet-mapping>
+-->
+
+
+  <!-- ================== Built In Filter Definitions ===================== -->
+
+  <!-- A filter that sets character encoding that is used to decode -->
+  <!-- parameters in a POST request -->
+<!--
+    <filter>
+        <filter-name>setCharacterEncodingFilter</filter-name>
+        <filter-class>org.apache.catalina.filters.SetCharacterEncodingFilter</filter-class>
+        <init-param>
+            <param-name>encoding</param-name>
+            <param-value>UTF-8</param-value>
+        </init-param>
+        <async-supported>true</async-supported>
+    </filter>
+-->
+
+  <!-- A filter that triggers request parameters parsing and rejects the    -->
+  <!-- request if some parameters were skipped because of parsing errors or -->
+  <!-- request size limitations.                                            -->
+<!--
+    <filter>
+        <filter-name>failedRequestFilter</filter-name>
+        <filter-class>
+          org.apache.catalina.filters.FailedRequestFilter
+        </filter-class>
+        <async-supported>true</async-supported>
+    </filter>
+-->
+
+
+  <!-- NOTE: An SSI Servlet is also available as an alternative SSI         -->
+  <!-- implementation. Use either the Servlet or the Filter but NOT both.   -->
+  <!--                                                                      -->
+  <!-- Server Side Includes processing filter, which processes SSI          -->
+  <!-- directives in HTML pages consistent with similar support in web      -->
+  <!-- servers like Apache.  Traditionally, this filter is mapped to the    -->
+  <!-- URL pattern "*.shtml", though it can be mapped to "*" as it will     -->
+  <!-- selectively enable/disable SSI processing based on mime types. For   -->
+  <!-- this to work you will need to uncomment the .shtml mime type         -->
+  <!-- definition towards the bottom of this file.                          -->
+  <!-- The contentType init param allows you to apply SSI processing to JSP -->
+  <!-- pages, javascript, or any other content you wish.  This filter       -->
+  <!-- supports the following initialization parameters (default values are -->
+  <!-- in square brackets):                                                 -->
+  <!--                                                                      -->
+  <!--   contentType         A regex pattern that must be matched before    -->
+  <!--                       SSI processing is applied.                     -->
+  <!--                       [text/x-server-parsed-html(;.*)?]              -->
+  <!--                                                                      -->
+  <!--   debug               Debugging detail level for messages logged     -->
+  <!--                       by this servlet.  [0]                          -->
+  <!--                                                                      -->
+  <!--   expires             The number of seconds before a page with SSI   -->
+  <!--                       directives will expire.  [No default]          -->
+  <!--                                                                      -->
+  <!--   isVirtualWebappRelative                                            -->
+  <!--                       Should "virtual" paths be interpreted as       -->
+  <!--                       relative to the context root, instead of       -->
+  <!--                       the server root?  (0=false, 1=true) [0]        -->
+  <!--                                                                      -->
+  <!--   allowExec           Is use of the exec command enabled? [false]    -->
+
+<!--
+    <filter>
+        <filter-name>ssi</filter-name>
+        <filter-class>
+          org.apache.catalina.ssi.SSIFilter
+        </filter-class>
+        <init-param>
+          <param-name>contentType</param-name>
+          <param-value>text/x-server-parsed-html(;.*)?</param-value>
+        </init-param>
+        <init-param>
+          <param-name>debug</param-name>
+          <param-value>0</param-value>
+        </init-param>
+        <init-param>
+          <param-name>expires</param-name>
+          <param-value>666</param-value>
+        </init-param>
+        <init-param>
+          <param-name>isVirtualWebappRelative</param-name>
+          <param-value>0</param-value>
+        </init-param>
+    </filter>
+-->
+
+
+  <!-- ==================== Built In Filter Mappings ====================== -->
+
+  <!-- The mapping for the Set Character Encoding Filter -->
+<!--
+    <filter-mapping>
+        <filter-name>setCharacterEncodingFilter</filter-name>
+        <url-pattern>/*</url-pattern>
+    </filter-mapping>
+-->
+
+  <!-- The mapping for the Failed Request Filter -->
+<!--
+    <filter-mapping>
+        <filter-name>failedRequestFilter</filter-name>
+        <url-pattern>/*</url-pattern>
+    </filter-mapping>
+-->
+
+  <!-- The mapping for the SSI Filter -->
+<!--
+    <filter-mapping>
+        <filter-name>ssi</filter-name>
+        <url-pattern>*.shtml</url-pattern>
+    </filter-mapping>
+-->
+
+
+  <!-- ==================== Default Session Configuration ================= -->
+  <!-- You can set the default session timeout (in minutes) for all newly   -->
+  <!-- created sessions by modifying the value below.                       -->
+
+    <session-config>
+        <session-timeout>30</session-timeout>
+    </session-config>
+
+
+  <!-- ===================== Default MIME Type Mappings =================== -->
+  <!-- When serving static resources, Tomcat will automatically generate    -->
+  <!-- a "Content-Type" header based on the resource's filename extension,  -->
+  <!-- based on these mappings.  Additional mappings can be added here (to  -->
+  <!-- apply to all web applications), or in your own application's web.xml -->
+  <!-- deployment descriptor.                                               -->
+
+    <mime-mapping>
+        <extension>123</extension>
+        <mime-type>application/vnd.lotus-1-2-3</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>3dml</extension>
+        <mime-type>text/vnd.in3d.3dml</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>3g2</extension>
+        <mime-type>video/3gpp2</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>3gp</extension>
+        <mime-type>video/3gpp</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>7z</extension>
+        <mime-type>application/x-7z-compressed</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>aab</extension>
+        <mime-type>application/x-authorware-bin</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>aac</extension>
+        <mime-type>audio/x-aac</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>aam</extension>
+        <mime-type>application/x-authorware-map</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>aas</extension>
+        <mime-type>application/x-authorware-seg</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>abs</extension>
+        <mime-type>audio/x-mpeg</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>abw</extension>
+        <mime-type>application/x-abiword</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>ac</extension>
+        <mime-type>application/pkix-attr-cert</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>acc</extension>
+        <mime-type>application/vnd.americandynamics.acc</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>ace</extension>
+        <mime-type>application/x-ace-compressed</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>acu</extension>
+        <mime-type>application/vnd.acucobol</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>acutc</extension>
+        <mime-type>application/vnd.acucorp</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>adp</extension>
+        <mime-type>audio/adpcm</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>aep</extension>
+        <mime-type>application/vnd.audiograph</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>afm</extension>
+        <mime-type>application/x-font-type1</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>afp</extension>
+        <mime-type>application/vnd.ibm.modcap</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>ahead</extension>
+        <mime-type>application/vnd.ahead.space</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>ai</extension>
+        <mime-type>application/postscript</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>aif</extension>
+        <mime-type>audio/x-aiff</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>aifc</extension>
+        <mime-type>audio/x-aiff</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>aiff</extension>
+        <mime-type>audio/x-aiff</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>aim</extension>
+        <mime-type>application/x-aim</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>air</extension>
+        <mime-type>application/vnd.adobe.air-application-installer-package+zip</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>ait</extension>
+        <mime-type>application/vnd.dvb.ait</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>ami</extension>
+        <mime-type>application/vnd.amiga.ami</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>anx</extension>
+        <mime-type>application/annodex</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>apk</extension>
+        <mime-type>application/vnd.android.package-archive</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>application</extension>
+        <mime-type>application/x-ms-application</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>apr</extension>
+        <mime-type>application/vnd.lotus-approach</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>art</extension>
+        <mime-type>image/x-jg</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>asc</extension>
+        <mime-type>application/pgp-signature</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>asf</extension>
+        <mime-type>video/x-ms-asf</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>asm</extension>
+        <mime-type>text/x-asm</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>aso</extension>
+        <mime-type>application/vnd.accpac.simply.aso</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>asx</extension>
+        <mime-type>video/x-ms-asf</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>atc</extension>
+        <mime-type>application/vnd.acucorp</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>atom</extension>
+        <mime-type>application/atom+xml</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>atomcat</extension>
+        <mime-type>application/atomcat+xml</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>atomsvc</extension>
+        <mime-type>application/atomsvc+xml</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>atx</extension>
+        <mime-type>application/vnd.antix.game-component</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>au</extension>
+        <mime-type>audio/basic</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>avi</extension>
+        <mime-type>video/x-msvideo</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>avx</extension>
+        <mime-type>video/x-rad-screenplay</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>aw</extension>
+        <mime-type>application/applixware</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>axa</extension>
+        <mime-type>audio/annodex</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>axv</extension>
+        <mime-type>video/annodex</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>azf</extension>
+        <mime-type>application/vnd.airzip.filesecure.azf</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>azs</extension>
+        <mime-type>application/vnd.airzip.filesecure.azs</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>azw</extension>
+        <mime-type>application/vnd.amazon.ebook</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>bat</extension>
+        <mime-type>application/x-msdownload</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>bcpio</extension>
+        <mime-type>application/x-bcpio</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>bdf</extension>
+        <mime-type>application/x-font-bdf</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>bdm</extension>
+        <mime-type>application/vnd.syncml.dm+wbxml</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>bed</extension>
+        <mime-type>application/vnd.realvnc.bed</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>bh2</extension>
+        <mime-type>application/vnd.fujitsu.oasysprs</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>bin</extension>
+        <mime-type>application/octet-stream</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>bmi</extension>
+        <mime-type>application/vnd.bmi</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>bmp</extension>
+        <mime-type>image/bmp</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>body</extension>
+        <mime-type>text/html</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>book</extension>
+        <mime-type>application/vnd.framemaker</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>box</extension>
+        <mime-type>application/vnd.previewsystems.box</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>boz</extension>
+        <mime-type>application/x-bzip2</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>bpk</extension>
+        <mime-type>application/octet-stream</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>btif</extension>
+        <mime-type>image/prs.btif</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>bz</extension>
+        <mime-type>application/x-bzip</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>bz2</extension>
+        <mime-type>application/x-bzip2</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>c</extension>
+        <mime-type>text/x-c</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>c11amc</extension>
+        <mime-type>application/vnd.cluetrust.cartomobile-config</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>c11amz</extension>
+        <mime-type>application/vnd.cluetrust.cartomobile-config-pkg</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>c4d</extension>
+        <mime-type>application/vnd.clonk.c4group</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>c4f</extension>
+        <mime-type>application/vnd.clonk.c4group</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>c4g</extension>
+        <mime-type>application/vnd.clonk.c4group</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>c4p</extension>
+        <mime-type>application/vnd.clonk.c4group</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>c4u</extension>
+        <mime-type>application/vnd.clonk.c4group</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>cab</extension>
+        <mime-type>application/vnd.ms-cab-compressed</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>cap</extension>
+        <mime-type>application/vnd.tcpdump.pcap</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>car</extension>
+        <mime-type>application/vnd.curl.car</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>cat</extension>
+        <mime-type>application/vnd.ms-pki.seccat</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>cc</extension>
+        <mime-type>text/x-c</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>cct</extension>
+        <mime-type>application/x-director</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>ccxml</extension>
+        <mime-type>application/ccxml+xml</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>cdbcmsg</extension>
+        <mime-type>application/vnd.contact.cmsg</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>cdf</extension>
+        <mime-type>application/x-cdf</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>cdkey</extension>
+        <mime-type>application/vnd.mediastation.cdkey</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>cdmia</extension>
+        <mime-type>application/cdmi-capability</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>cdmic</extension>
+        <mime-type>application/cdmi-container</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>cdmid</extension>
+        <mime-type>application/cdmi-domain</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>cdmio</extension>
+        <mime-type>application/cdmi-object</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>cdmiq</extension>
+        <mime-type>application/cdmi-queue</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>cdx</extension>
+        <mime-type>chemical/x-cdx</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>cdxml</extension>
+        <mime-type>application/vnd.chemdraw+xml</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>cdy</extension>
+        <mime-type>application/vnd.cinderella</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>cer</extension>
+        <mime-type>application/pkix-cert</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>cgm</extension>
+        <mime-type>image/cgm</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>chat</extension>
+        <mime-type>application/x-chat</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>chm</extension>
+        <mime-type>application/vnd.ms-htmlhelp</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>chrt</extension>
+        <mime-type>application/vnd.kde.kchart</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>cif</extension>
+        <mime-type>chemical/x-cif</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>cii</extension>
+        <mime-type>application/vnd.anser-web-certificate-issue-initiation</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>cil</extension>
+        <mime-type>application/vnd.ms-artgalry</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>cla</extension>
+        <mime-type>application/vnd.claymore</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>class</extension>
+        <mime-type>application/java</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>clkk</extension>
+        <mime-type>application/vnd.crick.clicker.keyboard</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>clkp</extension>
+        <mime-type>application/vnd.crick.clicker.palette</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>clkt</extension>
+        <mime-type>application/vnd.crick.clicker.template</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>clkw</extension>
+        <mime-type>application/vnd.crick.clicker.wordbank</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>clkx</extension>
+        <mime-type>application/vnd.crick.clicker</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>clp</extension>
+        <mime-type>application/x-msclip</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>cmc</extension>
+        <mime-type>application/vnd.cosmocaller</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>cmdf</extension>
+        <mime-type>chemical/x-cmdf</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>cml</extension>
+        <mime-type>chemical/x-cml</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>cmp</extension>
+        <mime-type>application/vnd.yellowriver-custom-menu</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>cmx</extension>
+        <mime-type>image/x-cmx</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>cod</extension>
+        <mime-type>application/vnd.rim.cod</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>com</extension>
+        <mime-type>application/x-msdownload</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>conf</extension>
+        <mime-type>text/plain</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>cpio</extension>
+        <mime-type>application/x-cpio</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>cpp</extension>
+        <mime-type>text/x-c</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>cpt</extension>
+        <mime-type>application/mac-compactpro</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>crd</extension>
+        <mime-type>application/x-mscardfile</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>crl</extension>
+        <mime-type>application/pkix-crl</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>crt</extension>
+        <mime-type>application/x-x509-ca-cert</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>cryptonote</extension>
+        <mime-type>application/vnd.rig.cryptonote</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>csh</extension>
+        <mime-type>application/x-csh</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>csml</extension>
+        <mime-type>chemical/x-csml</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>csp</extension>
+        <mime-type>application/vnd.commonspace</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>css</extension>
+        <mime-type>text/css</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>cst</extension>
+        <mime-type>application/x-director</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>csv</extension>
+        <mime-type>text/csv</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>cu</extension>
+        <mime-type>application/cu-seeme</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>curl</extension>
+        <mime-type>text/vnd.curl</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>cww</extension>
+        <mime-type>application/prs.cww</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>cxt</extension>
+        <mime-type>application/x-director</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>cxx</extension>
+        <mime-type>text/x-c</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>dae</extension>
+        <mime-type>model/vnd.collada+xml</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>daf</extension>
+        <mime-type>application/vnd.mobius.daf</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>dataless</extension>
+        <mime-type>application/vnd.fdsn.seed</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>davmount</extension>
+        <mime-type>application/davmount+xml</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>dcr</extension>
+        <mime-type>application/x-director</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>dcurl</extension>
+        <mime-type>text/vnd.curl.dcurl</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>dd2</extension>
+        <mime-type>application/vnd.oma.dd2+xml</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>ddd</extension>
+        <mime-type>application/vnd.fujixerox.ddd</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>deb</extension>
+        <mime-type>application/x-debian-package</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>def</extension>
+        <mime-type>text/plain</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>deploy</extension>
+        <mime-type>application/octet-stream</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>der</extension>
+        <mime-type>application/x-x509-ca-cert</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>dfac</extension>
+        <mime-type>application/vnd.dreamfactory</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>dib</extension>
+        <mime-type>image/bmp</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>dic</extension>
+        <mime-type>text/x-c</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>dir</extension>
+        <mime-type>application/x-director</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>dis</extension>
+        <mime-type>application/vnd.mobius.dis</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>dist</extension>
+        <mime-type>application/octet-stream</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>distz</extension>
+        <mime-type>application/octet-stream</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>djv</extension>
+        <mime-type>image/vnd.djvu</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>djvu</extension>
+        <mime-type>image/vnd.djvu</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>dll</extension>
+        <mime-type>application/x-msdownload</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>dmg</extension>
+        <mime-type>application/octet-stream</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>dmp</extension>
+        <mime-type>application/vnd.tcpdump.pcap</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>dms</extension>
+        <mime-type>application/octet-stream</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>dna</extension>
+        <mime-type>application/vnd.dna</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>doc</extension>
+        <mime-type>application/msword</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>docm</extension>
+        <mime-type>application/vnd.ms-word.document.macroenabled.12</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>docx</extension>
+        <mime-type>application/vnd.openxmlformats-officedocument.wordprocessingml.document</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>dot</extension>
+        <mime-type>application/msword</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>dotm</extension>
+        <mime-type>application/vnd.ms-word.template.macroenabled.12</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>dotx</extension>
+        <mime-type>application/vnd.openxmlformats-officedocument.wordprocessingml.template</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>dp</extension>
+        <mime-type>application/vnd.osgi.dp</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>dpg</extension>
+        <mime-type>application/vnd.dpgraph</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>dra</extension>
+        <mime-type>audio/vnd.dra</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>dsc</extension>
+        <mime-type>text/prs.lines.tag</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>dssc</extension>
+        <mime-type>application/dssc+der</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>dtb</extension>
+        <mime-type>application/x-dtbook+xml</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>dtd</extension>
+        <mime-type>application/xml-dtd</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>dts</extension>
+        <mime-type>audio/vnd.dts</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>dtshd</extension>
+        <mime-type>audio/vnd.dts.hd</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>dump</extension>
+        <mime-type>application/octet-stream</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>dv</extension>
+        <mime-type>video/x-dv</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>dvb</extension>
+        <mime-type>video/vnd.dvb.file</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>dvi</extension>
+        <mime-type>application/x-dvi</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>dwf</extension>
+        <mime-type>model/vnd.dwf</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>dwg</extension>
+        <mime-type>image/vnd.dwg</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>dxf</extension>
+        <mime-type>image/vnd.dxf</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>dxp</extension>
+        <mime-type>application/vnd.spotfire.dxp</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>dxr</extension>
+        <mime-type>application/x-director</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>ecelp4800</extension>
+        <mime-type>audio/vnd.nuera.ecelp4800</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>ecelp7470</extension>
+        <mime-type>audio/vnd.nuera.ecelp7470</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>ecelp9600</extension>
+        <mime-type>audio/vnd.nuera.ecelp9600</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>ecma</extension>
+        <mime-type>application/ecmascript</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>edm</extension>
+        <mime-type>application/vnd.novadigm.edm</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>edx</extension>
+        <mime-type>application/vnd.novadigm.edx</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>efif</extension>
+        <mime-type>application/vnd.picsel</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>ei6</extension>
+        <mime-type>application/vnd.pg.osasli</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>elc</extension>
+        <mime-type>application/octet-stream</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>eml</extension>
+        <mime-type>message/rfc822</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>emma</extension>
+        <mime-type>application/emma+xml</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>eol</extension>
+        <mime-type>audio/vnd.digital-winds</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>eot</extension>
+        <mime-type>application/vnd.ms-fontobject</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>eps</extension>
+        <mime-type>application/postscript</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>epub</extension>
+        <mime-type>application/epub+zip</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>es3</extension>
+        <mime-type>application/vnd.eszigno3+xml</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>esf</extension>
+        <mime-type>application/vnd.epson.esf</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>et3</extension>
+        <mime-type>application/vnd.eszigno3+xml</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>etx</extension>
+        <mime-type>text/x-setext</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>exe</extension>
+        <mime-type>application/octet-stream</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>exi</extension>
+        <mime-type>application/exi</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>ext</extension>
+        <mime-type>application/vnd.novadigm.ext</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>ez</extension>
+        <mime-type>application/andrew-inset</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>ez2</extension>
+        <mime-type>application/vnd.ezpix-album</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>ez3</extension>
+        <mime-type>application/vnd.ezpix-package</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>f</extension>
+        <mime-type>text/x-fortran</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>f4v</extension>
+        <mime-type>video/x-f4v</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>f77</extension>
+        <mime-type>text/x-fortran</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>f90</extension>
+        <mime-type>text/x-fortran</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>fbs</extension>
+        <mime-type>image/vnd.fastbidsheet</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>fcs</extension>
+        <mime-type>application/vnd.isac.fcs</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>fdf</extension>
+        <mime-type>application/vnd.fdf</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>fe_launch</extension>
+        <mime-type>application/vnd.denovo.fcselayout-link</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>fg5</extension>
+        <mime-type>application/vnd.fujitsu.oasysgp</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>fgd</extension>
+        <mime-type>application/x-director</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>fh</extension>
+        <mime-type>image/x-freehand</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>fh4</extension>
+        <mime-type>image/x-freehand</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>fh5</extension>
+        <mime-type>image/x-freehand</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>fh7</extension>
+        <mime-type>image/x-freehand</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>fhc</extension>
+        <mime-type>image/x-freehand</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>fig</extension>
+        <mime-type>application/x-xfig</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>flac</extension>
+        <mime-type>audio/flac</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>fli</extension>
+        <mime-type>video/x-fli</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>flo</extension>
+        <mime-type>application/vnd.micrografx.flo</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>flv</extension>
+        <mime-type>video/x-flv</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>flw</extension>
+        <mime-type>application/vnd.kde.kivio</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>flx</extension>
+        <mime-type>text/vnd.fmi.flexstor</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>fly</extension>
+        <mime-type>text/vnd.fly</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>fm</extension>
+        <mime-type>application/vnd.framemaker</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>fnc</extension>
+        <mime-type>application/vnd.frogans.fnc</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>for</extension>
+        <mime-type>text/x-fortran</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>fpx</extension>
+        <mime-type>image/vnd.fpx</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>frame</extension>
+        <mime-type>application/vnd.framemaker</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>fsc</extension>
+        <mime-type>application/vnd.fsc.weblaunch</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>fst</extension>
+        <mime-type>image/vnd.fst</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>ftc</extension>
+        <mime-type>application/vnd.fluxtime.clip</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>fti</extension>
+        <mime-type>application/vnd.anser-web-funds-transfer-initiation</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>fvt</extension>
+        <mime-type>video/vnd.fvt</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>fxp</extension>
+        <mime-type>application/vnd.adobe.fxp</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>fxpl</extension>
+        <mime-type>application/vnd.adobe.fxp</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>fzs</extension>
+        <mime-type>application/vnd.fuzzysheet</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>g2w</extension>
+        <mime-type>application/vnd.geoplan</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>g3</extension>
+        <mime-type>image/g3fax</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>g3w</extension>
+        <mime-type>application/vnd.geospace</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>gac</extension>
+        <mime-type>application/vnd.groove-account</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>gbr</extension>
+        <mime-type>application/rpki-ghostbusters</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>gdl</extension>
+        <mime-type>model/vnd.gdl</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>geo</extension>
+        <mime-type>application/vnd.dynageo</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>gex</extension>
+        <mime-type>application/vnd.geometry-explorer</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>ggb</extension>
+        <mime-type>application/vnd.geogebra.file</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>ggt</extension>
+        <mime-type>application/vnd.geogebra.tool</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>ghf</extension>
+        <mime-type>application/vnd.groove-help</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>gif</extension>
+        <mime-type>image/gif</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>gim</extension>
+        <mime-type>application/vnd.groove-identity-message</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>gmx</extension>
+        <mime-type>application/vnd.gmx</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>gnumeric</extension>
+        <mime-type>application/x-gnumeric</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>gph</extension>
+        <mime-type>application/vnd.flographit</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>gqf</extension>
+        <mime-type>application/vnd.grafeq</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>gqs</extension>
+        <mime-type>application/vnd.grafeq</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>gram</extension>
+        <mime-type>application/srgs</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>gre</extension>
+        <mime-type>application/vnd.geometry-explorer</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>grv</extension>
+        <mime-type>application/vnd.groove-injector</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>grxml</extension>
+        <mime-type>application/srgs+xml</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>gsf</extension>
+        <mime-type>application/x-font-ghostscript</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>gtar</extension>
+        <mime-type>application/x-gtar</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>gtm</extension>
+        <mime-type>application/vnd.groove-tool-message</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>gtw</extension>
+        <mime-type>model/vnd.gtw</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>gv</extension>
+        <mime-type>text/vnd.graphviz</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>gxt</extension>
+        <mime-type>application/vnd.geonext</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>gz</extension>
+        <mime-type>application/x-gzip</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>h</extension>
+        <mime-type>text/x-c</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>h261</extension>
+        <mime-type>video/h261</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>h263</extension>
+        <mime-type>video/h263</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>h264</extension>
+        <mime-type>video/h264</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>hal</extension>
+        <mime-type>application/vnd.hal+xml</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>hbci</extension>
+        <mime-type>application/vnd.hbci</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>hdf</extension>
+        <mime-type>application/x-hdf</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>hh</extension>
+        <mime-type>text/x-c</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>hlp</extension>
+        <mime-type>application/winhlp</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>hpgl</extension>
+        <mime-type>application/vnd.hp-hpgl</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>hpid</extension>
+        <mime-type>application/vnd.hp-hpid</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>hps</extension>
+        <mime-type>application/vnd.hp-hps</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>hqx</extension>
+        <mime-type>application/mac-binhex40</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>htc</extension>
+        <mime-type>text/x-component</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>htke</extension>
+        <mime-type>application/vnd.kenameaapp</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>htm</extension>
+        <mime-type>text/html</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>html</extension>
+        <mime-type>text/html</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>hvd</extension>
+        <mime-type>application/vnd.yamaha.hv-dic</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>hvp</extension>
+        <mime-type>application/vnd.yamaha.hv-voice</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>hvs</extension>
+        <mime-type>application/vnd.yamaha.hv-script</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>i2g</extension>
+        <mime-type>application/vnd.intergeo</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>icc</extension>
+        <mime-type>application/vnd.iccprofile</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>ice</extension>
+        <mime-type>x-conference/x-cooltalk</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>icm</extension>
+        <mime-type>application/vnd.iccprofile</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>ico</extension>
+        <mime-type>image/x-icon</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>ics</extension>
+        <mime-type>text/calendar</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>ief</extension>
+        <mime-type>image/ief</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>ifb</extension>
+        <mime-type>text/calendar</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>ifm</extension>
+        <mime-type>application/vnd.shana.informed.formdata</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>iges</extension>
+        <mime-type>model/iges</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>igl</extension>
+        <mime-type>application/vnd.igloader</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>igm</extension>
+        <mime-type>application/vnd.insors.igm</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>igs</extension>
+        <mime-type>model/iges</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>igx</extension>
+        <mime-type>application/vnd.micrografx.igx</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>iif</extension>
+        <mime-type>application/vnd.shana.informed.interchange</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>imp</extension>
+        <mime-type>application/vnd.accpac.simply.imp</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>ims</extension>
+        <mime-type>application/vnd.ms-ims</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>in</extension>
+        <mime-type>text/plain</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>ink</extension>
+        <mime-type>application/inkml+xml</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>inkml</extension>
+        <mime-type>application/inkml+xml</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>iota</extension>
+        <mime-type>application/vnd.astraea-software.iota</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>ipfix</extension>
+        <mime-type>application/ipfix</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>ipk</extension>
+        <mime-type>application/vnd.shana.informed.package</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>irm</extension>
+        <mime-type>application/vnd.ibm.rights-management</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>irp</extension>
+        <mime-type>application/vnd.irepository.package+xml</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>iso</extension>
+        <mime-type>application/octet-stream</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>itp</extension>
+        <mime-type>application/vnd.shana.informed.formtemplate</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>ivp</extension>
+        <mime-type>application/vnd.immervision-ivp</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>ivu</extension>
+        <mime-type>application/vnd.immervision-ivu</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>jad</extension>
+        <mime-type>text/vnd.sun.j2me.app-descriptor</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>jam</extension>
+        <mime-type>application/vnd.jam</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>jar</extension>
+        <mime-type>application/java-archive</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>java</extension>
+        <mime-type>text/x-java-source</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>jisp</extension>
+        <mime-type>application/vnd.jisp</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>jlt</extension>
+        <mime-type>application/vnd.hp-jlyt</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>jnlp</extension>
+        <mime-type>application/x-java-jnlp-file</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>joda</extension>
+        <mime-type>application/vnd.joost.joda-archive</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>jpe</extension>
+        <mime-type>image/jpeg</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>jpeg</extension>
+        <mime-type>image/jpeg</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>jpg</extension>
+        <mime-type>image/jpeg</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>jpgm</extension>
+        <mime-type>video/jpm</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>jpgv</extension>
+        <mime-type>video/jpeg</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>jpm</extension>
+        <mime-type>video/jpm</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>js</extension>
+        <mime-type>application/javascript</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>jsf</extension>
+        <mime-type>text/plain</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>json</extension>
+        <mime-type>application/json</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>jspf</extension>
+        <mime-type>text/plain</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>kar</extension>
+        <mime-type>audio/midi</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>karbon</extension>
+        <mime-type>application/vnd.kde.karbon</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>kfo</extension>
+        <mime-type>application/vnd.kde.kformula</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>kia</extension>
+        <mime-type>application/vnd.kidspiration</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>kml</extension>
+        <mime-type>application/vnd.google-earth.kml+xml</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>kmz</extension>
+        <mime-type>application/vnd.google-earth.kmz</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>kne</extension>
+        <mime-type>application/vnd.kinar</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>knp</extension>
+        <mime-type>application/vnd.kinar</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>kon</extension>
+        <mime-type>application/vnd.kde.kontour</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>kpr</extension>
+        <mime-type>application/vnd.kde.kpresenter</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>kpt</extension>
+        <mime-type>application/vnd.kde.kpresenter</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>ksp</extension>
+        <mime-type>application/vnd.kde.kspread</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>ktr</extension>
+        <mime-type>application/vnd.kahootz</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>ktx</extension>
+        <mime-type>image/ktx</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>ktz</extension>
+        <mime-type>application/vnd.kahootz</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>kwd</extension>
+        <mime-type>application/vnd.kde.kword</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>kwt</extension>
+        <mime-type>application/vnd.kde.kword</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>lasxml</extension>
+        <mime-type>application/vnd.las.las+xml</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>latex</extension>
+        <mime-type>application/x-latex</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>lbd</extension>
+        <mime-type>application/vnd.llamagraphics.life-balance.desktop</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>lbe</extension>
+        <mime-type>application/vnd.llamagraphics.life-balance.exchange+xml</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>les</extension>
+        <mime-type>application/vnd.hhe.lesson-player</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>lha</extension>
+        <mime-type>application/octet-stream</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>link66</extension>
+        <mime-type>application/vnd.route66.link66+xml</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>list</extension>
+        <mime-type>text/plain</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>list3820</extension>
+        <mime-type>application/vnd.ibm.modcap</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>listafp</extension>
+        <mime-type>application/vnd.ibm.modcap</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>log</extension>
+        <mime-type>text/plain</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>lostxml</extension>
+        <mime-type>application/lost+xml</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>lrf</extension>
+        <mime-type>application/octet-stream</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>lrm</extension>
+        <mime-type>application/vnd.ms-lrm</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>ltf</extension>
+        <mime-type>application/vnd.frogans.ltf</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>lvp</extension>
+        <mime-type>audio/vnd.lucent.voice</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>lwp</extension>
+        <mime-type>application/vnd.lotus-wordpro</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>lzh</extension>
+        <mime-type>application/octet-stream</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>m13</extension>
+        <mime-type>application/x-msmediaview</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>m14</extension>
+        <mime-type>application/x-msmediaview</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>m1v</extension>
+        <mime-type>video/mpeg</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>m21</extension>
+        <mime-type>application/mp21</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>m2a</extension>
+        <mime-type>audio/mpeg</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>m2v</extension>
+        <mime-type>video/mpeg</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>m3a</extension>
+        <mime-type>audio/mpeg</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>m3u</extension>
+        <mime-type>audio/x-mpegurl</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>m3u8</extension>
+        <mime-type>application/vnd.apple.mpegurl</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>m4a</extension>
+        <mime-type>audio/mp4</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>m4b</extension>
+        <mime-type>audio/mp4</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>m4r</extension>
+        <mime-type>audio/mp4</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>m4u</extension>
+        <mime-type>video/vnd.mpegurl</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>m4v</extension>
+        <mime-type>video/mp4</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>ma</extension>
+        <mime-type>application/mathematica</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>mac</extension>
+        <mime-type>image/x-macpaint</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>mads</extension>
+        <mime-type>application/mads+xml</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>mag</extension>
+        <mime-type>application/vnd.ecowin.chart</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>maker</extension>
+        <mime-type>application/vnd.framemaker</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>man</extension>
+        <mime-type>text/troff</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>mathml</extension>
+        <mime-type>application/mathml+xml</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>mb</extension>
+        <mime-type>application/mathematica</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>mbk</extension>
+        <mime-type>application/vnd.mobius.mbk</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>mbox</extension>
+        <mime-type>application/mbox</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>mc1</extension>
+        <mime-type>application/vnd.medcalcdata</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>mcd</extension>
+        <mime-type>application/vnd.mcd</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>mcurl</extension>
+        <mime-type>text/vnd.curl.mcurl</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>mdb</extension>
+        <mime-type>application/x-msaccess</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>mdi</extension>
+        <mime-type>image/vnd.ms-modi</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>me</extension>
+        <mime-type>text/troff</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>mesh</extension>
+        <mime-type>model/mesh</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>meta4</extension>
+        <mime-type>application/metalink4+xml</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>mets</extension>
+        <mime-type>application/mets+xml</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>mfm</extension>
+        <mime-type>application/vnd.mfmp</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>mft</extension>
+        <mime-type>application/rpki-manifest</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>mgp</extension>
+        <mime-type>application/vnd.osgeo.mapguide.package</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>mgz</extension>
+        <mime-type>application/vnd.proteus.magazine</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>mid</extension>
+        <mime-type>audio/midi</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>midi</extension>
+        <mime-type>audio/midi</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>mif</extension>
+        <mime-type>application/x-mif</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>mime</extension>
+        <mime-type>message/rfc822</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>mj2</extension>
+        <mime-type>video/mj2</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>mjp2</extension>
+        <mime-type>video/mj2</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>mlp</extension>
+        <mime-type>application/vnd.dolby.mlp</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>mmd</extension>
+        <mime-type>application/vnd.chipnuts.karaoke-mmd</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>mmf</extension>
+        <mime-type>application/vnd.smaf</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>mmr</extension>
+        <mime-type>image/vnd.fujixerox.edmics-mmr</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>mny</extension>
+        <mime-type>application/x-msmoney</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>mobi</extension>
+        <mime-type>application/x-mobipocket-ebook</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>mods</extension>
+        <mime-type>application/mods+xml</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>mov</extension>
+        <mime-type>video/quicktime</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>movie</extension>
+        <mime-type>video/x-sgi-movie</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>mp1</extension>
+        <mime-type>audio/mpeg</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>mp2</extension>
+        <mime-type>audio/mpeg</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>mp21</extension>
+        <mime-type>application/mp21</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>mp2a</extension>
+        <mime-type>audio/mpeg</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>mp3</extension>
+        <mime-type>audio/mpeg</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>mp4</extension>
+        <mime-type>video/mp4</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>mp4a</extension>
+        <mime-type>audio/mp4</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>mp4s</extension>
+        <mime-type>application/mp4</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>mp4v</extension>
+        <mime-type>video/mp4</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>mpa</extension>
+        <mime-type>audio/mpeg</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>mpc</extension>
+        <mime-type>application/vnd.mophun.certificate</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>mpe</extension>
+        <mime-type>video/mpeg</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>mpeg</extension>
+        <mime-type>video/mpeg</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>mpega</extension>
+        <mime-type>audio/x-mpeg</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>mpg</extension>
+        <mime-type>video/mpeg</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>mpg4</extension>
+        <mime-type>video/mp4</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>mpga</extension>
+        <mime-type>audio/mpeg</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>mpkg</extension>
+        <mime-type>application/vnd.apple.installer+xml</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>mpm</extension>
+        <mime-type>application/vnd.blueice.multipass</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>mpn</extension>
+        <mime-type>application/vnd.mophun.application</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>mpp</extension>
+        <mime-type>application/vnd.ms-project</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>mpt</extension>
+        <mime-type>application/vnd.ms-project</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>mpv2</extension>
+        <mime-type>video/mpeg2</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>mpy</extension>
+        <mime-type>application/vnd.ibm.minipay</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>mqy</extension>
+        <mime-type>application/vnd.mobius.mqy</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>mrc</extension>
+        <mime-type>application/marc</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>mrcx</extension>
+        <mime-type>application/marcxml+xml</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>ms</extension>
+        <mime-type>text/troff</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>mscml</extension>
+        <mime-type>application/mediaservercontrol+xml</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>mseed</extension>
+        <mime-type>application/vnd.fdsn.mseed</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>mseq</extension>
+        <mime-type>application/vnd.mseq</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>msf</extension>
+        <mime-type>application/vnd.epson.msf</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>msh</extension>
+        <mime-type>model/mesh</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>msi</extension>
+        <mime-type>application/x-msdownload</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>msl</extension>
+        <mime-type>application/vnd.mobius.msl</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>msty</extension>
+        <mime-type>application/vnd.muvee.style</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>mts</extension>
+        <mime-type>model/vnd.mts</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>mus</extension>
+        <mime-type>application/vnd.musician</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>musicxml</extension>
+        <mime-type>application/vnd.recordare.musicxml+xml</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>mvb</extension>
+        <mime-type>application/x-msmediaview</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>mwf</extension>
+        <mime-type>application/vnd.mfer</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>mxf</extension>
+        <mime-type>application/mxf</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>mxl</extension>
+        <mime-type>application/vnd.recordare.musicxml</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>mxml</extension>
+        <mime-type>application/xv+xml</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>mxs</extension>
+        <mime-type>application/vnd.triscape.mxs</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>mxu</extension>
+        <mime-type>video/vnd.mpegurl</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>n-gage</extension>
+        <mime-type>application/vnd.nokia.n-gage.symbian.install</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>n3</extension>
+        <mime-type>text/n3</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>nb</extension>
+        <mime-type>application/mathematica</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>nbp</extension>
+        <mime-type>application/vnd.wolfram.player</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>nc</extension>
+        <mime-type>application/x-netcdf</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>ncx</extension>
+        <mime-type>application/x-dtbncx+xml</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>ngdat</extension>
+        <mime-type>application/vnd.nokia.n-gage.data</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>nlu</extension>
+        <mime-type>application/vnd.neurolanguage.nlu</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>nml</extension>
+        <mime-type>application/vnd.enliven</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>nnd</extension>
+        <mime-type>application/vnd.noblenet-directory</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>nns</extension>
+        <mime-type>application/vnd.noblenet-sealer</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>nnw</extension>
+        <mime-type>application/vnd.noblenet-web</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>npx</extension>
+        <mime-type>image/vnd.net-fpx</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>nsf</extension>
+        <mime-type>application/vnd.lotus-notes</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>oa2</extension>
+        <mime-type>application/vnd.fujitsu.oasys2</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>oa3</extension>
+        <mime-type>application/vnd.fujitsu.oasys3</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>oas</extension>
+        <mime-type>application/vnd.fujitsu.oasys</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>obd</extension>
+        <mime-type>application/x-msbinder</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>oda</extension>
+        <mime-type>application/oda</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <!-- OpenDocument Database -->
+        <extension>odb</extension>
+        <mime-type>application/vnd.oasis.opendocument.database</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <!-- OpenDocument Chart -->
+        <extension>odc</extension>
+        <mime-type>application/vnd.oasis.opendocument.chart</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <!-- OpenDocument Formula -->
+        <extension>odf</extension>
+        <mime-type>application/vnd.oasis.opendocument.formula</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>odft</extension>
+        <mime-type>application/vnd.oasis.opendocument.formula-template</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <!-- OpenDocument Drawing -->
+        <extension>odg</extension>
+        <mime-type>application/vnd.oasis.opendocument.graphics</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <!-- OpenDocument Image -->
+        <extension>odi</extension>
+        <mime-type>application/vnd.oasis.opendocument.image</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <!-- OpenDocument Master Document -->
+        <extension>odm</extension>
+        <mime-type>application/vnd.oasis.opendocument.text-master</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <!-- OpenDocument Presentation -->
+        <extension>odp</extension>
+        <mime-type>application/vnd.oasis.opendocument.presentation</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <!-- OpenDocument Spreadsheet -->
+        <extension>ods</extension>
+        <mime-type>application/vnd.oasis.opendocument.spreadsheet</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <!-- OpenDocument Text -->
+        <extension>odt</extension>
+        <mime-type>application/vnd.oasis.opendocument.text</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>oga</extension>
+        <mime-type>audio/ogg</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>ogg</extension>
+        <mime-type>audio/ogg</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>ogv</extension>
+        <mime-type>video/ogg</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <!-- xiph mime types -->
+        <extension>ogx</extension>
+        <mime-type>application/ogg</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>onepkg</extension>
+        <mime-type>application/onenote</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>onetmp</extension>
+        <mime-type>application/onenote</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>onetoc</extension>
+        <mime-type>application/onenote</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>onetoc2</extension>
+        <mime-type>application/onenote</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>opf</extension>
+        <mime-type>application/oebps-package+xml</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>oprc</extension>
+        <mime-type>application/vnd.palm</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>org</extension>
+        <mime-type>application/vnd.lotus-organizer</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>osf</extension>
+        <mime-type>application/vnd.yamaha.openscoreformat</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>osfpvg</extension>
+        <mime-type>application/vnd.yamaha.openscoreformat.osfpvg+xml</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>otc</extension>
+        <mime-type>application/vnd.oasis.opendocument.chart-template</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>otf</extension>
+        <mime-type>application/x-font-otf</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <!-- OpenDocument Drawing Template -->
+        <extension>otg</extension>
+        <mime-type>application/vnd.oasis.opendocument.graphics-template</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <!-- HTML Document Template -->
+        <extension>oth</extension>
+        <mime-type>application/vnd.oasis.opendocument.text-web</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>oti</extension>
+        <mime-type>application/vnd.oasis.opendocument.image-template</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <!-- OpenDocument Presentation Template -->
+        <extension>otp</extension>
+        <mime-type>application/vnd.oasis.opendocument.presentation-template</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <!-- OpenDocument Spreadsheet Template -->
+        <extension>ots</extension>
+        <mime-type>application/vnd.oasis.opendocument.spreadsheet-template</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <!-- OpenDocument Text Template -->
+        <extension>ott</extension>
+        <mime-type>application/vnd.oasis.opendocument.text-template</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>oxps</extension>
+        <mime-type>application/oxps</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>oxt</extension>
+        <mime-type>application/vnd.openofficeorg.extension</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>p</extension>
+        <mime-type>text/x-pascal</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>p10</extension>
+        <mime-type>application/pkcs10</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>p12</extension>
+        <mime-type>application/x-pkcs12</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>p7b</extension>
+        <mime-type>application/x-pkcs7-certificates</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>p7c</extension>
+        <mime-type>application/pkcs7-mime</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>p7m</extension>
+        <mime-type>application/pkcs7-mime</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>p7r</extension>
+        <mime-type>application/x-pkcs7-certreqresp</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>p7s</extension>
+        <mime-type>application/pkcs7-signature</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>p8</extension>
+        <mime-type>application/pkcs8</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>pas</extension>
+        <mime-type>text/x-pascal</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>paw</extension>
+        <mime-type>application/vnd.pawaafile</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>pbd</extension>
+        <mime-type>application/vnd.powerbuilder6</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>pbm</extension>
+        <mime-type>image/x-portable-bitmap</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>pcap</extension>
+        <mime-type>application/vnd.tcpdump.pcap</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>pcf</extension>
+        <mime-type>application/x-font-pcf</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>pcl</extension>
+        <mime-type>application/vnd.hp-pcl</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>pclxl</extension>
+        <mime-type>application/vnd.hp-pclxl</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>pct</extension>
+        <mime-type>image/pict</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>pcurl</extension>
+        <mime-type>application/vnd.curl.pcurl</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>pcx</extension>
+        <mime-type>image/x-pcx</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>pdb</extension>
+        <mime-type>application/vnd.palm</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>pdf</extension>
+        <mime-type>application/pdf</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>pfa</extension>
+        <mime-type>application/x-font-type1</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>pfb</extension>
+        <mime-type>application/x-font-type1</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>pfm</extension>
+        <mime-type>application/x-font-type1</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>pfr</extension>
+        <mime-type>application/font-tdpfr</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>pfx</extension>
+        <mime-type>application/x-pkcs12</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>pgm</extension>
+        <mime-type>image/x-portable-graymap</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>pgn</extension>
+        <mime-type>application/x-chess-pgn</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>pgp</extension>
+        <mime-type>application/pgp-encrypted</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>pic</extension>
+        <mime-type>image/pict</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>pict</extension>
+        <mime-type>image/pict</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>pkg</extension>
+        <mime-type>application/octet-stream</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>pki</extension>
+        <mime-type>application/pkixcmp</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>pkipath</extension>
+        <mime-type>application/pkix-pkipath</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>plb</extension>
+        <mime-type>application/vnd.3gpp.pic-bw-large</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>plc</extension>
+        <mime-type>application/vnd.mobius.plc</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>plf</extension>
+        <mime-type>application/vnd.pocketlearn</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>pls</extension>
+        <mime-type>audio/x-scpls</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>pml</extension>
+        <mime-type>application/vnd.ctc-posml</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>png</extension>
+        <mime-type>image/png</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>pnm</extension>
+        <mime-type>image/x-portable-anymap</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>pnt</extension>
+        <mime-type>image/x-macpaint</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>portpkg</extension>
+        <mime-type>application/vnd.macports.portpkg</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>pot</extension>
+        <mime-type>application/vnd.ms-powerpoint</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>potm</extension>
+        <mime-type>application/vnd.ms-powerpoint.template.macroenabled.12</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>potx</extension>
+        <mime-type>application/vnd.openxmlformats-officedocument.presentationml.template</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>ppam</extension>
+        <mime-type>application/vnd.ms-powerpoint.addin.macroenabled.12</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>ppd</extension>
+        <mime-type>application/vnd.cups-ppd</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>ppm</extension>
+        <mime-type>image/x-portable-pixmap</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>pps</extension>
+        <mime-type>application/vnd.ms-powerpoint</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>ppsm</extension>
+        <mime-type>application/vnd.ms-powerpoint.slideshow.macroenabled.12</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>ppsx</extension>
+        <mime-type>application/vnd.openxmlformats-officedocument.presentationml.slideshow</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>ppt</extension>
+        <mime-type>application/vnd.ms-powerpoint</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>pptm</extension>
+        <mime-type>application/vnd.ms-powerpoint.presentation.macroenabled.12</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>pptx</extension>
+        <mime-type>application/vnd.openxmlformats-officedocument.presentationml.presentation</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>pqa</extension>
+        <mime-type>application/vnd.palm</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>prc</extension>
+        <mime-type>application/x-mobipocket-ebook</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>pre</extension>
+        <mime-type>application/vnd.lotus-freelance</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>prf</extension>
+        <mime-type>application/pics-rules</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>ps</extension>
+        <mime-type>application/postscript</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>psb</extension>
+        <mime-type>application/vnd.3gpp.pic-bw-small</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>psd</extension>
+        <mime-type>image/vnd.adobe.photoshop</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>psf</extension>
+        <mime-type>application/x-font-linux-psf</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>pskcxml</extension>
+        <mime-type>application/pskc+xml</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>ptid</extension>
+        <mime-type>application/vnd.pvi.ptid1</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>pub</extension>
+        <mime-type>application/x-mspublisher</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>pvb</extension>
+        <mime-type>application/vnd.3gpp.pic-bw-var</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>pwn</extension>
+        <mime-type>application/vnd.3m.post-it-notes</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>pya</extension>
+        <mime-type>audio/vnd.ms-playready.media.pya</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>pyv</extension>
+        <mime-type>video/vnd.ms-playready.media.pyv</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>qam</extension>
+        <mime-type>application/vnd.epson.quickanime</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>qbo</extension>
+        <mime-type>application/vnd.intu.qbo</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>qfx</extension>
+        <mime-type>application/vnd.intu.qfx</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>qps</extension>
+        <mime-type>application/vnd.publishare-delta-tree</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>qt</extension>
+        <mime-type>video/quicktime</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>qti</extension>
+        <mime-type>image/x-quicktime</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>qtif</extension>
+        <mime-type>image/x-quicktime</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>qwd</extension>
+        <mime-type>application/vnd.quark.quarkxpress</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>qwt</extension>
+        <mime-type>application/vnd.quark.quarkxpress</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>qxb</extension>
+        <mime-type>application/vnd.quark.quarkxpress</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>qxd</extension>
+        <mime-type>application/vnd.quark.quarkxpress</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>qxl</extension>
+        <mime-type>application/vnd.quark.quarkxpress</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>qxt</extension>
+        <mime-type>application/vnd.quark.quarkxpress</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>ra</extension>
+        <mime-type>audio/x-pn-realaudio</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>ram</extension>
+        <mime-type>audio/x-pn-realaudio</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>rar</extension>
+        <mime-type>application/x-rar-compressed</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>ras</extension>
+        <mime-type>image/x-cmu-raster</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>rcprofile</extension>
+        <mime-type>application/vnd.ipunplugged.rcprofile</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>rdf</extension>
+        <mime-type>application/rdf+xml</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>rdz</extension>
+        <mime-type>application/vnd.data-vision.rdz</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>rep</extension>
+        <mime-type>application/vnd.businessobjects</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>res</extension>
+        <mime-type>application/x-dtbresource+xml</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>rgb</extension>
+        <mime-type>image/x-rgb</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>rif</extension>
+        <mime-type>application/reginfo+xml</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>rip</extension>
+        <mime-type>audio/vnd.rip</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>rl</extension>
+        <mime-type>application/resource-lists+xml</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>rlc</extension>
+        <mime-type>image/vnd.fujixerox.edmics-rlc</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>rld</extension>
+        <mime-type>application/resource-lists-diff+xml</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>rm</extension>
+        <mime-type>application/vnd.rn-realmedia</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>rmi</extension>
+        <mime-type>audio/midi</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>rmp</extension>
+        <mime-type>audio/x-pn-realaudio-plugin</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>rms</extension>
+        <mime-type>application/vnd.jcp.javame.midlet-rms</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>rnc</extension>
+        <mime-type>application/relax-ng-compact-syntax</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>roa</extension>
+        <mime-type>application/rpki-roa</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>roff</extension>
+        <mime-type>text/troff</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>rp9</extension>
+        <mime-type>application/vnd.cloanto.rp9</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>rpss</extension>
+        <mime-type>application/vnd.nokia.radio-presets</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>rpst</extension>
+        <mime-type>application/vnd.nokia.radio-preset</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>rq</extension>
+        <mime-type>application/sparql-query</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>rs</extension>
+        <mime-type>application/rls-services+xml</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>rsd</extension>
+        <mime-type>application/rsd+xml</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>rss</extension>
+        <mime-type>application/rss+xml</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>rtf</extension>
+        <mime-type>application/rtf</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>rtx</extension>
+        <mime-type>text/richtext</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>s</extension>
+        <mime-type>text/x-asm</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>saf</extension>
+        <mime-type>application/vnd.yamaha.smaf-audio</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>sbml</extension>
+        <mime-type>application/sbml+xml</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>sc</extension>
+        <mime-type>application/vnd.ibm.secure-container</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>scd</extension>
+        <mime-type>application/x-msschedule</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>scm</extension>
+        <mime-type>application/vnd.lotus-screencam</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>scq</extension>
+        <mime-type>application/scvp-cv-request</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>scs</extension>
+        <mime-type>application/scvp-cv-response</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>scurl</extension>
+        <mime-type>text/vnd.curl.scurl</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>sda</extension>
+        <mime-type>application/vnd.stardivision.draw</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>sdc</extension>
+        <mime-type>application/vnd.stardivision.calc</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>sdd</extension>
+        <mime-type>application/vnd.stardivision.impress</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>sdkd</extension>
+        <mime-type>application/vnd.solent.sdkm+xml</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>sdkm</extension>
+        <mime-type>application/vnd.solent.sdkm+xml</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>sdp</extension>
+        <mime-type>application/sdp</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>sdw</extension>
+        <mime-type>application/vnd.stardivision.writer</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>see</extension>
+        <mime-type>application/vnd.seemail</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>seed</extension>
+        <mime-type>application/vnd.fdsn.seed</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>sema</extension>
+        <mime-type>application/vnd.sema</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>semd</extension>
+        <mime-type>application/vnd.semd</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>semf</extension>
+        <mime-type>application/vnd.semf</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>ser</extension>
+        <mime-type>application/java-serialized-object</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>setpay</extension>
+        <mime-type>application/set-payment-initiation</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>setreg</extension>
+        <mime-type>application/set-registration-initiation</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>sfd-hdstx</extension>
+        <mime-type>application/vnd.hydrostatix.sof-data</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>sfs</extension>
+        <mime-type>application/vnd.spotfire.sfs</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>sgl</extension>
+        <mime-type>application/vnd.stardivision.writer-global</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>sgm</extension>
+        <mime-type>text/sgml</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>sgml</extension>
+        <mime-type>text/sgml</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>sh</extension>
+        <mime-type>application/x-sh</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>shar</extension>
+        <mime-type>application/x-shar</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>shf</extension>
+        <mime-type>application/shf+xml</mime-type>
+    </mime-mapping>
+    <!--
+    <mime-mapping>
+        <extension>shtml</extension>
+        <mime-type>text/x-server-parsed-html</mime-type>
+    </mime-mapping>
+    -->
+    <mime-mapping>
+        <extension>sig</extension>
+        <mime-type>application/pgp-signature</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>silo</extension>
+        <mime-type>model/mesh</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>sis</extension>
+        <mime-type>application/vnd.symbian.install</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>sisx</extension>
+        <mime-type>application/vnd.symbian.install</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>sit</extension>
+        <mime-type>application/x-stuffit</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>sitx</extension>
+        <mime-type>application/x-stuffitx</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>skd</extension>
+        <mime-type>application/vnd.koan</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>skm</extension>
+        <mime-type>application/vnd.koan</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>skp</extension>
+        <mime-type>application/vnd.koan</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>skt</extension>
+        <mime-type>application/vnd.koan</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>sldm</extension>
+        <mime-type>application/vnd.ms-powerpoint.slide.macroenabled.12</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>sldx</extension>
+        <mime-type>application/vnd.openxmlformats-officedocument.presentationml.slide</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>slt</extension>
+        <mime-type>application/vnd.epson.salt</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>sm</extension>
+        <mime-type>application/vnd.stepmania.stepchart</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>smf</extension>
+        <mime-type>application/vnd.stardivision.math</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>smi</extension>
+        <mime-type>application/smil+xml</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>smil</extension>
+        <mime-type>application/smil+xml</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>smzip</extension>
+        <mime-type>application/vnd.stepmania.package</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>snd</extension>
+        <mime-type>audio/basic</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>snf</extension>
+        <mime-type>application/x-font-snf</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>so</extension>
+        <mime-type>application/octet-stream</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>spc</extension>
+        <mime-type>application/x-pkcs7-certificates</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>spf</extension>
+        <mime-type>application/vnd.yamaha.smaf-phrase</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>spl</extension>
+        <mime-type>application/x-futuresplash</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>spot</extension>
+        <mime-type>text/vnd.in3d.spot</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>spp</extension>
+        <mime-type>application/scvp-vp-response</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>spq</extension>
+        <mime-type>application/scvp-vp-request</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>spx</extension>
+        <mime-type>audio/ogg</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>src</extension>
+        <mime-type>application/x-wais-source</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>sru</extension>
+        <mime-type>application/sru+xml</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>srx</extension>
+        <mime-type>application/sparql-results+xml</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>sse</extension>
+        <mime-type>application/vnd.kodak-descriptor</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>ssf</extension>
+        <mime-type>application/vnd.epson.ssf</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>ssml</extension>
+        <mime-type>application/ssml+xml</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>st</extension>
+        <mime-type>application/vnd.sailingtracker.track</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>stc</extension>
+        <mime-type>application/vnd.sun.xml.calc.template</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>std</extension>
+        <mime-type>application/vnd.sun.xml.draw.template</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>stf</extension>
+        <mime-type>application/vnd.wt.stf</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>sti</extension>
+        <mime-type>application/vnd.sun.xml.impress.template</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>stk</extension>
+        <mime-type>application/hyperstudio</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>stl</extension>
+        <mime-type>application/vnd.ms-pki.stl</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>str</extension>
+        <mime-type>application/vnd.pg.format</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>stw</extension>
+        <mime-type>application/vnd.sun.xml.writer.template</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>sub</extension>
+        <mime-type>text/vnd.dvb.subtitle</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>sus</extension>
+        <mime-type>application/vnd.sus-calendar</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>susp</extension>
+        <mime-type>application/vnd.sus-calendar</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>sv4cpio</extension>
+        <mime-type>application/x-sv4cpio</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>sv4crc</extension>
+        <mime-type>application/x-sv4crc</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>svc</extension>
+        <mime-type>application/vnd.dvb.service</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>svd</extension>
+        <mime-type>application/vnd.svd</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>svg</extension>
+        <mime-type>image/svg+xml</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>svgz</extension>
+        <mime-type>image/svg+xml</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>swa</extension>
+        <mime-type>application/x-director</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>swf</extension>
+        <mime-type>application/x-shockwave-flash</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>swi</extension>
+        <mime-type>application/vnd.aristanetworks.swi</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>sxc</extension>
+        <mime-type>application/vnd.sun.xml.calc</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>sxd</extension>
+        <mime-type>application/vnd.sun.xml.draw</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>sxg</extension>
+        <mime-type>application/vnd.sun.xml.writer.global</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>sxi</extension>
+        <mime-type>application/vnd.sun.xml.impress</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>sxm</extension>
+        <mime-type>application/vnd.sun.xml.math</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>sxw</extension>
+        <mime-type>application/vnd.sun.xml.writer</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>t</extension>
+        <mime-type>text/troff</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>taglet</extension>
+        <mime-type>application/vnd.mynfc</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>tao</extension>
+        <mime-type>application/vnd.tao.intent-module-archive</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>tar</extension>
+        <mime-type>application/x-tar</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>tcap</extension>
+        <mime-type>application/vnd.3gpp2.tcap</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>tcl</extension>
+        <mime-type>application/x-tcl</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>teacher</extension>
+        <mime-type>application/vnd.smart.teacher</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>tei</extension>
+        <mime-type>application/tei+xml</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>teicorpus</extension>
+        <mime-type>application/tei+xml</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>tex</extension>
+        <mime-type>application/x-tex</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>texi</extension>
+        <mime-type>application/x-texinfo</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>texinfo</extension>
+        <mime-type>application/x-texinfo</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>text</extension>
+        <mime-type>text/plain</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>tfi</extension>
+        <mime-type>application/thraud+xml</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>tfm</extension>
+        <mime-type>application/x-tex-tfm</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>thmx</extension>
+        <mime-type>application/vnd.ms-officetheme</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>tif</extension>
+        <mime-type>image/tiff</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>tiff</extension>
+        <mime-type>image/tiff</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>tmo</extension>
+        <mime-type>application/vnd.tmobile-livetv</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>torrent</extension>
+        <mime-type>application/x-bittorrent</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>tpl</extension>
+        <mime-type>application/vnd.groove-tool-template</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>tpt</extension>
+        <mime-type>application/vnd.trid.tpt</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>tr</extension>
+        <mime-type>text/troff</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>tra</extension>
+        <mime-type>application/vnd.trueapp</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>trm</extension>
+        <mime-type>application/x-msterminal</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>tsd</extension>
+        <mime-type>application/timestamped-data</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>tsv</extension>
+        <mime-type>text/tab-separated-values</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>ttc</extension>
+        <mime-type>application/x-font-ttf</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>ttf</extension>
+        <mime-type>application/x-font-ttf</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>ttl</extension>
+        <mime-type>text/turtle</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>twd</extension>
+        <mime-type>application/vnd.simtech-mindmapper</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>twds</extension>
+        <mime-type>application/vnd.simtech-mindmapper</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>txd</extension>
+        <mime-type>application/vnd.genomatix.tuxedo</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>txf</extension>
+        <mime-type>application/vnd.mobius.txf</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>txt</extension>
+        <mime-type>text/plain</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>u32</extension>
+        <mime-type>application/x-authorware-bin</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>udeb</extension>
+        <mime-type>application/x-debian-package</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>ufd</extension>
+        <mime-type>application/vnd.ufdl</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>ufdl</extension>
+        <mime-type>application/vnd.ufdl</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>ulw</extension>
+        <mime-type>audio/basic</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>umj</extension>
+        <mime-type>application/vnd.umajin</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>unityweb</extension>
+        <mime-type>application/vnd.unity</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>uoml</extension>
+        <mime-type>application/vnd.uoml+xml</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>uri</extension>
+        <mime-type>text/uri-list</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>uris</extension>
+        <mime-type>text/uri-list</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>urls</extension>
+        <mime-type>text/uri-list</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>ustar</extension>
+        <mime-type>application/x-ustar</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>utz</extension>
+        <mime-type>application/vnd.uiq.theme</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>uu</extension>
+        <mime-type>text/x-uuencode</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>uva</extension>
+        <mime-type>audio/vnd.dece.audio</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>uvd</extension>
+        <mime-type>application/vnd.dece.data</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>uvf</extension>
+        <mime-type>application/vnd.dece.data</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>uvg</extension>
+        <mime-type>image/vnd.dece.graphic</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>uvh</extension>
+        <mime-type>video/vnd.dece.hd</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>uvi</extension>
+        <mime-type>image/vnd.dece.graphic</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>uvm</extension>
+        <mime-type>video/vnd.dece.mobile</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>uvp</extension>
+        <mime-type>video/vnd.dece.pd</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>uvs</extension>
+        <mime-type>video/vnd.dece.sd</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>uvt</extension>
+        <mime-type>application/vnd.dece.ttml+xml</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>uvu</extension>
+        <mime-type>video/vnd.uvvu.mp4</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>uvv</extension>
+        <mime-type>video/vnd.dece.video</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>uvva</extension>
+        <mime-type>audio/vnd.dece.audio</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>uvvd</extension>
+        <mime-type>application/vnd.dece.data</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>uvvf</extension>
+        <mime-type>application/vnd.dece.data</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>uvvg</extension>
+        <mime-type>image/vnd.dece.graphic</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>uvvh</extension>
+        <mime-type>video/vnd.dece.hd</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>uvvi</extension>
+        <mime-type>image/vnd.dece.graphic</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>uvvm</extension>
+        <mime-type>video/vnd.dece.mobile</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>uvvp</extension>
+        <mime-type>video/vnd.dece.pd</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>uvvs</extension>
+        <mime-type>video/vnd.dece.sd</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>uvvt</extension>
+        <mime-type>application/vnd.dece.ttml+xml</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>uvvu</extension>
+        <mime-type>video/vnd.uvvu.mp4</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>uvvv</extension>
+        <mime-type>video/vnd.dece.video</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>uvvx</extension>
+        <mime-type>application/vnd.dece.unspecified</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>uvvz</extension>
+        <mime-type>application/vnd.dece.zip</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>uvx</extension>
+        <mime-type>application/vnd.dece.unspecified</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>uvz</extension>
+        <mime-type>application/vnd.dece.zip</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>vcard</extension>
+        <mime-type>text/vcard</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>vcd</extension>
+        <mime-type>application/x-cdlink</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>vcf</extension>
+        <mime-type>text/x-vcard</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>vcg</extension>
+        <mime-type>application/vnd.groove-vcard</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>vcs</extension>
+        <mime-type>text/x-vcalendar</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>vcx</extension>
+        <mime-type>application/vnd.vcx</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>vis</extension>
+        <mime-type>application/vnd.visionary</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>viv</extension>
+        <mime-type>video/vnd.vivo</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>vor</extension>
+        <mime-type>application/vnd.stardivision.writer</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>vox</extension>
+        <mime-type>application/x-authorware-bin</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>vrml</extension>
+        <mime-type>model/vrml</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>vsd</extension>
+        <mime-type>application/vnd.visio</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>vsf</extension>
+        <mime-type>application/vnd.vsf</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>vss</extension>
+        <mime-type>application/vnd.visio</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>vst</extension>
+        <mime-type>application/vnd.visio</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>vsw</extension>
+        <mime-type>application/vnd.visio</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>vtu</extension>
+        <mime-type>model/vnd.vtu</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>vxml</extension>
+        <mime-type>application/voicexml+xml</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>w3d</extension>
+        <mime-type>application/x-director</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>wad</extension>
+        <mime-type>application/x-doom</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>wav</extension>
+        <mime-type>audio/x-wav</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>wax</extension>
+        <mime-type>audio/x-ms-wax</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <!-- Wireless Bitmap -->
+        <extension>wbmp</extension>
+        <mime-type>image/vnd.wap.wbmp</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>wbs</extension>
+        <mime-type>application/vnd.criticaltools.wbs+xml</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>wbxml</extension>
+        <mime-type>application/vnd.wap.wbxml</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>wcm</extension>
+        <mime-type>application/vnd.ms-works</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>wdb</extension>
+        <mime-type>application/vnd.ms-works</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>weba</extension>
+        <mime-type>audio/webm</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>webm</extension>
+        <mime-type>video/webm</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>webp</extension>
+        <mime-type>image/webp</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>wg</extension>
+        <mime-type>application/vnd.pmi.widget</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>wgt</extension>
+        <mime-type>application/widget</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>wks</extension>
+        <mime-type>application/vnd.ms-works</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>wm</extension>
+        <mime-type>video/x-ms-wm</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>wma</extension>
+        <mime-type>audio/x-ms-wma</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>wmd</extension>
+        <mime-type>application/x-ms-wmd</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>wmf</extension>
+        <mime-type>application/x-msmetafile</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <!-- WML Source -->
+        <extension>wml</extension>
+        <mime-type>text/vnd.wap.wml</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <!-- Compiled WML -->
+        <extension>wmlc</extension>
+        <mime-type>application/vnd.wap.wmlc</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <!-- WML Script Source -->
+        <extension>wmls</extension>
+        <mime-type>text/vnd.wap.wmlscript</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <!-- Compiled WML Script -->
+        <extension>wmlsc</extension>
+        <mime-type>application/vnd.wap.wmlscriptc</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>wmv</extension>
+        <mime-type>video/x-ms-wmv</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>wmx</extension>
+        <mime-type>video/x-ms-wmx</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>wmz</extension>
+        <mime-type>application/x-ms-wmz</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>woff</extension>
+        <mime-type>application/x-font-woff</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>wpd</extension>
+        <mime-type>application/vnd.wordperfect</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>wpl</extension>
+        <mime-type>application/vnd.ms-wpl</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>wps</extension>
+        <mime-type>application/vnd.ms-works</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>wqd</extension>
+        <mime-type>application/vnd.wqd</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>wri</extension>
+        <mime-type>application/x-mswrite</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>wrl</extension>
+        <mime-type>model/vrml</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>wsdl</extension>
+        <mime-type>application/wsdl+xml</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>wspolicy</extension>
+        <mime-type>application/wspolicy+xml</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>wtb</extension>
+        <mime-type>application/vnd.webturbo</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>wvx</extension>
+        <mime-type>video/x-ms-wvx</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>x32</extension>
+        <mime-type>application/x-authorware-bin</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>x3d</extension>
+        <mime-type>application/vnd.hzn-3d-crossword</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>xap</extension>
+        <mime-type>application/x-silverlight-app</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>xar</extension>
+        <mime-type>application/vnd.xara</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>xbap</extension>
+        <mime-type>application/x-ms-xbap</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>xbd</extension>
+        <mime-type>application/vnd.fujixerox.docuworks.binder</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>xbm</extension>
+        <mime-type>image/x-xbitmap</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>xdf</extension>
+        <mime-type>application/xcap-diff+xml</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>xdm</extension>
+        <mime-type>application/vnd.syncml.dm+xml</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>xdp</extension>
+        <mime-type>application/vnd.adobe.xdp+xml</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>xdssc</extension>
+        <mime-type>application/dssc+xml</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>xdw</extension>
+        <mime-type>application/vnd.fujixerox.docuworks</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>xenc</extension>
+        <mime-type>application/xenc+xml</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>xer</extension>
+        <mime-type>application/patch-ops-error+xml</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>xfdf</extension>
+        <mime-type>application/vnd.adobe.xfdf</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>xfdl</extension>
+        <mime-type>application/vnd.xfdl</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>xht</extension>
+        <mime-type>application/xhtml+xml</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>xhtml</extension>
+        <mime-type>application/xhtml+xml</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>xhvml</extension>
+        <mime-type>application/xv+xml</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>xif</extension>
+        <mime-type>image/vnd.xiff</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>xla</extension>
+        <mime-type>application/vnd.ms-excel</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>xlam</extension>
+        <mime-type>application/vnd.ms-excel.addin.macroenabled.12</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>xlc</extension>
+        <mime-type>application/vnd.ms-excel</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>xlm</extension>
+        <mime-type>application/vnd.ms-excel</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>xls</extension>
+        <mime-type>application/vnd.ms-excel</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>xlsb</extension>
+        <mime-type>application/vnd.ms-excel.sheet.binary.macroenabled.12</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>xlsm</extension>
+        <mime-type>application/vnd.ms-excel.sheet.macroenabled.12</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>xlsx</extension>
+        <mime-type>application/vnd.openxmlformats-officedocument.spreadsheetml.sheet</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>xlt</extension>
+        <mime-type>application/vnd.ms-excel</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>xltm</extension>
+        <mime-type>application/vnd.ms-excel.template.macroenabled.12</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>xltx</extension>
+        <mime-type>application/vnd.openxmlformats-officedocument.spreadsheetml.template</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>xlw</extension>
+        <mime-type>application/vnd.ms-excel</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>xml</extension>
+        <mime-type>application/xml</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>xo</extension>
+        <mime-type>application/vnd.olpc-sugar</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>xop</extension>
+        <mime-type>application/xop+xml</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>xpi</extension>
+        <mime-type>application/x-xpinstall</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>xpm</extension>
+        <mime-type>image/x-xpixmap</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>xpr</extension>
+        <mime-type>application/vnd.is-xpr</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>xps</extension>
+        <mime-type>application/vnd.ms-xpsdocument</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>xpw</extension>
+        <mime-type>application/vnd.intercon.formnet</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>xpx</extension>
+        <mime-type>application/vnd.intercon.formnet</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>xsl</extension>
+        <mime-type>application/xml</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>xslt</extension>
+        <mime-type>application/xslt+xml</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>xsm</extension>
+        <mime-type>application/vnd.syncml+xml</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>xspf</extension>
+        <mime-type>application/xspf+xml</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>xul</extension>
+        <mime-type>application/vnd.mozilla.xul+xml</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>xvm</extension>
+        <mime-type>application/xv+xml</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>xvml</extension>
+        <mime-type>application/xv+xml</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>xwd</extension>
+        <mime-type>image/x-xwindowdump</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>xyz</extension>
+        <mime-type>chemical/x-xyz</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>yang</extension>
+        <mime-type>application/yang</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>yin</extension>
+        <mime-type>application/yin+xml</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>z</extension>
+        <mime-type>application/x-compress</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>Z</extension>
+        <mime-type>application/x-compress</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>zaz</extension>
+        <mime-type>application/vnd.zzazz.deck+xml</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>zip</extension>
+        <mime-type>application/zip</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>zir</extension>
+        <mime-type>application/vnd.zul</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>zirz</extension>
+        <mime-type>application/vnd.zul</mime-type>
+    </mime-mapping>
+    <mime-mapping>
+        <extension>zmm</extension>
+        <mime-type>application/vnd.handheld-entertainment+xml</mime-type>
+    </mime-mapping>
+
+  <!-- ==================== Default Welcome File List ===================== -->
+  <!-- When a request URI refers to a directory, the default servlet looks  -->
+  <!-- for a "welcome file" within that directory and, if present, to the   -->
+  <!-- corresponding resource URI for display.                              -->
+  <!-- If no welcome files are present, the default servlet either serves a -->
+  <!-- directory listing (see default servlet configuration on how to       -->
+  <!-- customize) or returns a 404 status, depending on the value of the    -->
+  <!-- listings setting.                                                    -->
+  <!--                                                                      -->
+  <!-- If you define welcome files in your own application's web.xml        -->
+  <!-- deployment descriptor, that list *replaces* the list configured      -->
+  <!-- here, so be sure to include any of the default values that you wish  -->
+  <!-- to use within your application.                                       -->
+
+    <welcome-file-list>
+        <welcome-file>index.html</welcome-file>
+        <welcome-file>index.htm</welcome-file>
+        <welcome-file>index.jsp</welcome-file>
+    </welcome-file-list>
+
+</web-app>
diff --git a/tomcat8-maven-plugin/src/site/apt/adjust-embedded-tomcat-version.apt.vm b/tomcat8-maven-plugin/src/site/apt/adjust-embedded-tomcat-version.apt.vm
new file mode 100644
index 0000000..7123565
--- /dev/null
+++ b/tomcat8-maven-plugin/src/site/apt/adjust-embedded-tomcat-version.apt.vm
@@ -0,0 +1,162 @@
+ ---
+ Adjust Tomcat Version
+ ---
+ Olivier Lamy
+ ---
+ 2012-04-11
+ ---
+
+ ~~ Licensed to the Apache Software Foundation (ASF) under one
+ ~~ or more contributor license agreements.  See the NOTICE file
+ ~~ distributed with this work for additional information
+ ~~ regarding copyright ownership.  The ASF licenses this file
+ ~~ to you under the Apache License, Version 2.0 (the
+ ~~ "License"); you may not use this file except in compliance
+ ~~ with the License.  You may obtain a copy of the License at
+ ~~
+ ~~   http://www.apache.org/licenses/LICENSE-2.0
+ ~~
+ ~~ Unless required by applicable law or agreed to in writing,
+ ~~ software distributed under the License is distributed on an
+ ~~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ ~~ KIND, either express or implied.  See the License for the
+ ~~ specific language governing permissions and limitations
+ ~~ under the License.
+
+ ~~ NOTE: For help with the syntax of this file, see:
+ ~~ http://maven.apache.org/doxia/references/apt-format.html
+
+Adjust Tomcat Version
+
+ In case you need to adjust the version of the embedded tomcat to run you can do so by changing
+ the runtime-dependencies:
+
++--
+<project>
+   [...]
+  <properties>
+   <tomcat.version>7.0.50</tomcat.version>
+   [...]
+  </properties>
+   [...]
+  <build>
+    <pluginManagement>
+      <plugins>
+        <plugin>
+          <groupId>org.apache.tomcat.maven</groupId>
+          <artifactId>tomcat7-maven-plugin</artifactId>
+          <version>${project.version}</version>
+          <dependencies>
+          <dependency>
+            <groupId>org.apache.tomcat.embed</groupId>
+            <artifactId>tomcat-embed-core</artifactId>
+            <version>${tomcat.version}</version>
+          </dependency>
+          <dependency>
+            <groupId>org.apache.tomcat</groupId>
+            <artifactId>tomcat-util</artifactId>
+            <version>${tomcat.version}</version>
+          </dependency>
+          <dependency>
+            <groupId>org.apache.tomcat</groupId>
+            <artifactId>tomcat-coyote</artifactId>
+            <version>${tomcat.version}</version>
+          </dependency>
+          <dependency>
+            <groupId>org.apache.tomcat</groupId>
+            <artifactId>tomcat-api</artifactId>
+            <version>${tomcat.version}</version>
+          </dependency>
+
+          <dependency>
+            <groupId>org.apache.tomcat</groupId>
+            <artifactId>tomcat-jdbc</artifactId>
+            <version>${tomcat.version}</version>
+          </dependency>
+
+          <dependency>
+            <groupId>org.apache.tomcat</groupId>
+            <artifactId>tomcat-dbcp</artifactId>
+            <version>${tomcat.version}</version>
+          </dependency>
+
+          <dependency>
+            <groupId>org.apache.tomcat</groupId>
+            <artifactId>tomcat-servlet-api</artifactId>
+            <version>${tomcat.version}</version>
+          </dependency>
+
+          <dependency>
+            <groupId>org.apache.tomcat</groupId>
+            <artifactId>tomcat-jsp-api</artifactId>
+            <version>${tomcat.version}</version>
+          </dependency>
+
+          <dependency>
+            <groupId>org.apache.tomcat</groupId>
+            <artifactId>tomcat-jasper</artifactId>
+            <version>${tomcat.version}</version>
+          </dependency>
+
+          <dependency>
+            <groupId>org.apache.tomcat</groupId>
+            <artifactId>tomcat-jasper-el</artifactId>
+            <version>${tomcat.version}</version>
+          </dependency>
+
+          <dependency>
+            <groupId>org.apache.tomcat</groupId>
+            <artifactId>tomcat-el-api</artifactId>
+            <version>${tomcat.version}</version>
+          </dependency>
+
+          <dependency>
+            <groupId>org.apache.tomcat</groupId>
+            <artifactId>tomcat-catalina</artifactId>
+            <version>${tomcat.version}</version>
+          </dependency>
+
+          <dependency>
+            <groupId>org.apache.tomcat</groupId>
+            <artifactId>tomcat-tribes</artifactId>
+            <version>${tomcat.version}</version>
+          </dependency>
+
+          <dependency>
+            <groupId>org.apache.tomcat</groupId>
+            <artifactId>tomcat-catalina-ha</artifactId>
+            <version>${tomcat.version}</version>
+          </dependency>
+
+          <dependency>
+            <groupId>org.apache.tomcat</groupId>
+            <artifactId>tomcat-annotations-api</artifactId>
+            <version>${tomcat.version}</version>
+          </dependency>
+
+          <dependency>
+            <groupId>org.apache.tomcat</groupId>
+            <artifactId>tomcat-juli</artifactId>
+            <version>${tomcat.version}</version>
+          </dependency>
+
+          <dependency>
+            <groupId>org.apache.tomcat.embed</groupId>
+            <artifactId>tomcat-embed-logging-juli</artifactId>
+            <version>${tomcat.version}</version>
+          </dependency>
+          <dependency>
+            <groupId>org.apache.tomcat.embed</groupId>
+            <artifactId>tomcat-embed-logging-log4j</artifactId>
+            <version>${tomcat.version}</version>
+          </dependency>
+          </dependencies>
+        </plugin>
+        [...]
+      </plugins>
+    </pluginManagement>
+    [...]
+  </build>
+  [...]
+</project>
++--
diff --git a/tomcat8-maven-plugin/src/site/apt/index.apt b/tomcat8-maven-plugin/src/site/apt/index.apt
new file mode 100644
index 0000000..f95d015
--- /dev/null
+++ b/tomcat8-maven-plugin/src/site/apt/index.apt
@@ -0,0 +1,39 @@
+ ---
+ Introduction
+ ---
+ Olivier Lamy
+ ---
+ 2012-02-03
+ ---
+
+ ~~ Licensed to the Apache Software Foundation (ASF) under one
+ ~~ or more contributor license agreements.  See the NOTICE file
+ ~~ distributed with this work for additional information
+ ~~ regarding copyright ownership.  The ASF licenses this file
+ ~~ to you under the Apache License, Version 2.0 (the
+ ~~ "License"); you may not use this file except in compliance
+ ~~ with the License.  You may obtain a copy of the License at
+ ~~
+ ~~   http://www.apache.org/licenses/LICENSE-2.0
+ ~~
+ ~~ Unless required by applicable law or agreed to in writing,
+ ~~ software distributed under the License is distributed on an
+ ~~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ ~~ KIND, either express or implied.  See the License for the
+ ~~ specific language governing permissions and limitations
+ ~~ under the License.
+
+ ~~ NOTE: For help with the syntax of this file, see:
+ ~~ http://maven.apache.org/doxia/references/apt-format.html
+
+Tomcat Maven Plugin
+
+ The Tomcat7 Maven Plugin provides goals to manipulate WAR projects within the {{{http://tomcat.apache.org/}Tomcat}} servlet container version 7.x
+
+* Goals Overview
+
+  The goals for this plugin are available here {{{./plugin-info.html}goals page}}.
+
+* Usage
+
+  Instructions on how to use the Tomcat Maven Plugin can be found on the {{{./usage.html}usage page}}.
diff --git a/tomcat8-maven-plugin/src/site/apt/usage.apt.vm b/tomcat8-maven-plugin/src/site/apt/usage.apt.vm
new file mode 100644
index 0000000..8d615e4
--- /dev/null
+++ b/tomcat8-maven-plugin/src/site/apt/usage.apt.vm
@@ -0,0 +1,182 @@
+ ---
+ Usage
+ ---
+ Olivier Lamy
+ ---
+ 2012-02-03
+ ---
+
+ ~~ Licensed to the Apache Software Foundation (ASF) under one
+ ~~ or more contributor license agreements.  See the NOTICE file
+ ~~ distributed with this work for additional information
+ ~~ regarding copyright ownership.  The ASF licenses this file
+ ~~ to you under the Apache License, Version 2.0 (the
+ ~~ "License"); you may not use this file except in compliance
+ ~~ with the License.  You may obtain a copy of the License at
+ ~~
+ ~~   http://www.apache.org/licenses/LICENSE-2.0
+ ~~
+ ~~ Unless required by applicable law or agreed to in writing,
+ ~~ software distributed under the License is distributed on an
+ ~~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ ~~ KIND, either express or implied.  See the License for the
+ ~~ specific language governing permissions and limitations
+ ~~ under the License.
+
+ ~~ NOTE: For help with the syntax of this file, see:
+ ~~ http://maven.apache.org/doxia/references/apt-format.html
+
+Usage
+
+ If no explicit configuration is provided then the Tomcat7 Maven Plugin defaults to
+ the following:
+
+ * Tomcat manager URL of <<<http://localhost:8080/manager>>>
+
+ * Authentication details of username <<<admin>>> and no password
+
+ * Context path of <<</$\{project.artifactId\}>>>
+
+ []
+
+ These can be overridden as described below.
+
+* Using a different Tomcat manager URL
+
+ To configure the plugin for a different Tomcat instance, add a plugin
+ configuration block to your <<<pom.xml>>> as follows:
+
++--
+<project>
+  ...
+  <build>
+    ...
+    <plugins>
+      ...
+      <plugin>
+        <groupId>org.apache.tomcat.maven</groupId>
+        <artifactId>tomcat7-maven-plugin</artifactId>
+        <version>${project.version}</version>
+        <configuration>
+          <url>http://www.mydomain.com:1234/mymanager</url>
+        </configuration>
+      </plugin>
+      ...
+    </plugins>
+    ...
+  </build>
+  ...
+</project>
++--
+
+  The default Tomcat manager URL is <<<http://localhost:8080/manager/text>>>.
+
+* Using different Tomcat manager authentication details
+
+ To specify a different username and password to use when authenticating with
+ Tomcat manager:
+
+ [[1]] Add a plugin configuration block to your <<<pom.xml>>>:
+
++--
+<project>
+  ...
+  <build>
+    ...
+    <plugins>
+      ...
+      <plugin>
+        <groupId>org.apache.tomcat.maven</groupId>
+        <artifactId>tomcat7-maven-plugin</artifactId>
+        <version>${project.version}</version>
+        <configuration>
+          <server>myserver</server>
+        </configuration>
+      </plugin>
+      ...
+    </plugins>
+    ...
+  </build>
+  ...
+</project>
++--
+
+ [[2]] Add a corresponding <<<server>>> block to your <<<settings.xml>>>:
+
++--
+<settings>
+  ...
+  <servers>
+    ...
+    <server>
+      <id>myserver</id>
+      <username>myusername</username>
+      <password>mypassword</password>
+    </server>
+    ...
+  </servers>
+  ...
+</settings>
++--
+
+ []
+
+ The default authentication details are username <<<admin>>> and no password.
+
+* Using a different context path
+
+ The default context path is <<</$\{project.artifactId\}>>>.
+
+ To change the context path to <<</mycontext>>> configure the plugin like this:
+
++--
+<project>
+  ...
+  <build>
+    ...
+    <plugins>
+      ...
+      <plugin>
+        <groupId>org.apache.tomcat.maven</groupId>
+        <artifactId>tomcat7-maven-plugin</artifactId>
+        <version>${project.version}</version>
+        <configuration>
+          <path>/mycontext</path>
+        </configuration>
+      </plugin>
+      ...
+    </plugins>
+    ...
+  </build>
+  ...
+</project>
++--
+
+ If you are using <<<project.build.finalName>>> to change the name of your WAR
+ file, you can use that value when you configure the context path as well. To do
+ that add the following configuration block to your <<<pom.xml>>>:
+
++--
+<project>
+  ...
+  <build>
+    ...
+    <finalName>mycontext</finalName>
+    ...
+    <plugins>
+      ...
+      <plugin>
+        <groupId>org.apache.tomcat.maven</groupId>
+        <artifactId>tomcat7-maven-plugin</artifactId>
+        <version>${project.version}</version>
+        <configuration>
+          <path>/\${project.build.finalName}</path>
+        </configuration>
+      </plugin>
+      ...
+    </plugins>
+    ...
+  </build>
+  ...
+</project>
++--
diff --git a/tomcat8-maven-plugin/src/site/site.xml b/tomcat8-maven-plugin/src/site/site.xml
new file mode 100644
index 0000000..257830f
--- /dev/null
+++ b/tomcat8-maven-plugin/src/site/site.xml
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+  ~ Licensed to the Apache Software Foundation (ASF) under one
+  ~ or more contributor license agreements.  See the NOTICE file
+  ~ distributed with this work for additional information
+  ~ regarding copyright ownership.  The ASF licenses this file
+  ~ to you under the Apache License, Version 2.0 (the
+  ~ "License"); you may not use this file except in compliance
+  ~ with the License.  You may obtain a copy of the License at
+  ~
+  ~   http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing,
+  ~ software distributed under the License is distributed on an
+  ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  ~ KIND, either express or implied.  See the License for the
+  ~ specific language governing permissions and limitations
+  ~ under the License.
+  -->
+
+<project xmlns="http://maven.apache.org/DECORATION/1.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/DECORATION/1.0.0 http://maven.apache.org/xsd/decoration-1.0.0.xsd">
+  <body>
+    <menu name="Overview">
+      <item name="Introduction"          href="index.html"/>
+      <item name="Goals"                 href="plugin-info.html"/>
+      <item name="Adjust Tomcat Version" href="adjust-embedded-tomcat-version.html"/>
+    </menu>
+
+    <menu ref="reports"/>
+
+    <menu name="ASF">
+      <item name="How Apache Works"  href="http://www.apache.org/foundation/how-it-works.html"/>
+      <item name="Foundation"        href="http://www.apache.org/foundation/"/>
+      <item name="Sponsoring Apache" href="http://www.apache.org/foundation/sponsorship.html"/>
+      <item name="Thanks"            href="http://www.apache.org/foundation/thanks.html"/>
+    </menu>
+
+  </body>
+</project>
diff --git a/tomcat8-maven-plugin/src/test/java/org/apache/tomcat/maven/it/Tomcat7DeployWarOnlyProjectIT.java b/tomcat8-maven-plugin/src/test/java/org/apache/tomcat/maven/it/Tomcat7DeployWarOnlyProjectIT.java
new file mode 100644
index 0000000..24d6cab
--- /dev/null
+++ b/tomcat8-maven-plugin/src/test/java/org/apache/tomcat/maven/it/Tomcat7DeployWarOnlyProjectIT.java
@@ -0,0 +1,31 @@
+package org.apache.tomcat.maven.it;
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import org.apache.tomcat.maven.it.AbstractDeployWarOnlyProjectIT;
+
+/**
+ * @author Olivier Lamy
+ */
+public class Tomcat7DeployWarOnlyProjectIT
+    extends AbstractDeployWarOnlyProjectIT
+{
+    // no op
+
+}
diff --git a/tomcat8-maven-plugin/src/test/java/org/apache/tomcat/maven/it/Tomcat7DeployWarProjectIT.java b/tomcat8-maven-plugin/src/test/java/org/apache/tomcat/maven/it/Tomcat7DeployWarProjectIT.java
new file mode 100644
index 0000000..893c80f
--- /dev/null
+++ b/tomcat8-maven-plugin/src/test/java/org/apache/tomcat/maven/it/Tomcat7DeployWarProjectIT.java
@@ -0,0 +1,30 @@
+package org.apache.tomcat.maven.it;
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import org.apache.tomcat.maven.it.AbstractDeployWarProjectIT;
+
+/**
+ * @author Olivier Lamy
+ */
+public class Tomcat7DeployWarProjectIT
+    extends AbstractDeployWarProjectIT
+{
+    // no op
+}
diff --git a/tomcat8-maven-plugin/src/test/java/org/apache/tomcat/maven/it/Tomcat7RunMultiConfigIT.java b/tomcat8-maven-plugin/src/test/java/org/apache/tomcat/maven/it/Tomcat7RunMultiConfigIT.java
new file mode 100644
index 0000000..8892ecf
--- /dev/null
+++ b/tomcat8-maven-plugin/src/test/java/org/apache/tomcat/maven/it/Tomcat7RunMultiConfigIT.java
@@ -0,0 +1,38 @@
+package org.apache.tomcat.maven.it;
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import org.apache.maven.it.VerificationException;
+import org.apache.tomcat.maven.it.AbstractTomcatRunMultiConfigIT;
+
+/**
+ * @author Olivier Lamy
+ */
+public class Tomcat7RunMultiConfigIT
+    extends AbstractTomcatRunMultiConfigIT
+{
+    @Override
+    protected void verifyConnectorsStarted()
+        throws VerificationException
+    {
+        verifier.verifyTextInLog("INFO: Starting ProtocolHandler [\"http-bio-" + getHttpItPort() + "\"]");
+        verifier.verifyTextInLog("INFO: Starting ProtocolHandler [\"http-bio-" + getHttpsItPort() + "\"]");
+        verifier.verifyTextInLog("INFO: Starting ProtocolHandler [\"ajp-bio-" + getAjpItPort() + "\"]");
+    }
+}
diff --git a/tomcat8-maven-plugin/src/test/java/org/apache/tomcat/maven/it/Tomcat7SimpleWarProjectIT.java b/tomcat8-maven-plugin/src/test/java/org/apache/tomcat/maven/it/Tomcat7SimpleWarProjectIT.java
new file mode 100644
index 0000000..4381ad1
--- /dev/null
+++ b/tomcat8-maven-plugin/src/test/java/org/apache/tomcat/maven/it/Tomcat7SimpleWarProjectIT.java
@@ -0,0 +1,43 @@
+package org.apache.tomcat.maven.it;
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import org.apache.maven.it.VerificationException;
+import org.apache.tomcat.maven.it.AbstractSimpleWarProjectIT;
+
+/**
+ * @author Olivier Lamy
+ */
+public class Tomcat7SimpleWarProjectIT
+    extends AbstractSimpleWarProjectIT
+{
+    protected int getTimeout()
+    {
+        return 20000;
+    }
+
+    @Override
+    protected void verifyConnectorsStarted()
+        throws VerificationException
+    {
+        verifier.verifyTextInLog("INFO: Starting ProtocolHandler [\"http-bio-" + getHttpItPort() + "\"]");
+
+        verifier.verifyTextInLog( "INFO: Starting ProtocolHandler [\"ajp-bio-"+ getAjpItPort() +"\"]" );
+    }
+}
diff --git a/tomcat8-maven-plugin/src/test/keystore b/tomcat8-maven-plugin/src/test/keystore
new file mode 100644
index 0000000..016d596
--- /dev/null
+++ b/tomcat8-maven-plugin/src/test/keystore
Binary files differ
diff --git a/tomcat8-maven-plugin/src/test/manager.war b/tomcat8-maven-plugin/src/test/manager.war
new file mode 100644
index 0000000..065cd9d
--- /dev/null
+++ b/tomcat8-maven-plugin/src/test/manager.war
Binary files differ
diff --git a/tomcat8-maven-plugin/src/test/resources/deploy-only-war-project/pom.xml b/tomcat8-maven-plugin/src/test/resources/deploy-only-war-project/pom.xml
new file mode 100644
index 0000000..0b6930e
--- /dev/null
+++ b/tomcat8-maven-plugin/src/test/resources/deploy-only-war-project/pom.xml
@@ -0,0 +1,137 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one
+  or more contributor license agreements.  See the NOTICE file
+  distributed with this work for additional information
+  regarding copyright ownership.  The ASF licenses this file
+  to you under the Apache License, Version 2.0 (the
+  "License"); you may not use this file except in compliance
+  with the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing,
+  software distributed under the License is distributed on an
+  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  KIND, either express or implied.  See the License for the
+  specific language governing permissions and limitations
+  under the License.
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+  <modelVersion>4.0.0</modelVersion>
+  <groupId>org.apache.tomcat.maven.it</groupId>
+  <artifactId>simple-war-project</artifactId>
+  <version>1.0-SNAPSHOT</version>
+  <packaging>war</packaging>
+
+  <properties>
+    <project.build.sourceEncoding>${project.build.sourceEncoding}</project.build.sourceEncoding>
+  </properties>
+
+  <build>
+    <pluginManagement>
+      <plugins>
+        <plugin>
+          <groupId>org.apache.maven.plugins</groupId>
+          <artifactId>maven-war-plugin</artifactId>
+          <version>2.1-alpha-2</version>
+        </plugin>
+        <plugin>
+          <groupId>org.apache.maven.plugins</groupId>
+          <artifactId>maven-compiler-plugin</artifactId>
+          <version>2.3.2</version>
+        </plugin>
+        <plugin>
+          <groupId>org.apache.tomcat.maven</groupId>
+          <artifactId>tomcat7-maven-plugin</artifactId>
+          <version>${project.version}</version>
+        </plugin>
+      </plugins>
+    </pluginManagement>
+
+    <plugins>
+      <plugin>
+        <artifactId>maven-war-plugin</artifactId>
+        <configuration>
+          <webXml>src/main/webapp/web.xml</webXml>
+        </configuration>
+      </plugin>
+      <plugin>
+        <groupId>org.apache.tomcat.maven</groupId>
+        <artifactId>tomcat7-maven-plugin</artifactId>
+        <executions>
+          <execution>
+            <id>tomcat-run</id>
+            <goals>
+              <goal>run-war-only</goal>
+            </goals>
+            <phase>pre-integration-test</phase>
+            <configuration>
+              <fork>true</fork>
+              <path>/foo</path>
+              <serverXml>src/main/tomcatconf/server.xml</serverXml>
+              <tomcatUsers>src/main/tomcatconf/tomcat-users.xml</tomcatUsers>
+            </configuration>
+          </execution>
+          <execution>
+            <id>tomcat-deploy</id>
+            <phase>integration-test</phase>
+            <goals>
+              <goal>deploy-only</goal>
+            </goals>
+            <configuration>
+              <url>http://localhost:${its.http.port}/manager</url>
+              <path>/bar</path>
+              <warFile>${warTestPath}</warFile>
+              <username>tomcat</username>
+              <password>tomcat</password>
+              <tag>test</tag>
+            </configuration>
+          </execution>
+          <execution>
+            <id>tomcat-shutdown</id>
+            <phase>post-integration-test</phase>
+            <goals>
+              <goal>shutdown</goal>
+            </goals>
+          </execution>
+        </executions>
+      </plugin>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-failsafe-plugin</artifactId>
+        <version>${failsafe.version}</version>
+        <executions>
+          <execution>
+            <id>integration-test</id>
+            <goals>
+              <goal>integration-test</goal>
+            </goals>
+          </execution>
+          <execution>
+            <id>verify</id>
+            <goals>
+              <goal>verify</goal>
+            </goals>
+          </execution>
+        </executions>
+      </plugin>
+    </plugins>
+  </build>
+
+  <dependencies>
+    <dependency>
+      <groupId>org.springframework</groupId>
+      <artifactId>spring-context-support</artifactId>
+      <version>2.5.6</version>
+    </dependency>
+    <dependency>
+      <groupId>junit</groupId>
+      <artifactId>junit</artifactId>
+      <version>4.9</version>
+      <scope>test</scope>
+    </dependency>
+  </dependencies>
+
+</project>
diff --git a/tomcat8-maven-plugin/src/test/resources/deploy-only-war-project/src/main/tomcatconf/empty.txt b/tomcat8-maven-plugin/src/test/resources/deploy-only-war-project/src/main/tomcatconf/empty.txt
new file mode 100644
index 0000000..11925e4
--- /dev/null
+++ b/tomcat8-maven-plugin/src/test/resources/deploy-only-war-project/src/main/tomcatconf/empty.txt
@@ -0,0 +1,19 @@
+ ~~ Licensed to the Apache Software Foundation (ASF) under one
+ ~~ or more contributor license agreements.  See the NOTICE file
+ ~~ distributed with this work for additional information
+ ~~ regarding copyright ownership.  The ASF licenses this file
+ ~~ to you under the Apache License, Version 2.0 (the
+ ~~ "License"); you may not use this file except in compliance
+ ~~ with the License.  You may obtain a copy of the License at
+ ~~
+ ~~   http://www.apache.org/licenses/LICENSE-2.0
+ ~~
+ ~~ Unless required by applicable law or agreed to in writing,
+ ~~ software distributed under the License is distributed on an
+ ~~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ ~~ KIND, either express or implied.  See the License for the
+ ~~ specific language governing permissions and limitations
+ ~~ under the License.
+
+ ~~ NOTE: For help with the syntax of this file, see:
+ ~~ http://maven.apache.org/doxia/references/apt-format.html
\ No newline at end of file
diff --git a/tomcat8-maven-plugin/src/test/resources/deploy-only-war-project/src/main/tomcatconf/logging.properties b/tomcat8-maven-plugin/src/test/resources/deploy-only-war-project/src/main/tomcatconf/logging.properties
new file mode 100644
index 0000000..df3dac5
--- /dev/null
+++ b/tomcat8-maven-plugin/src/test/resources/deploy-only-war-project/src/main/tomcatconf/logging.properties
@@ -0,0 +1,66 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more

+# contributor license agreements.  See the NOTICE file distributed with

+# this work for additional information regarding copyright ownership.

+# The ASF licenses this file to You under the Apache License, Version 2.0

+# (the "License"); you may not use this file except in compliance with

+# the License.  You may obtain a copy of the License at

+#

+#     http://www.apache.org/licenses/LICENSE-2.0

+#

+# Unless required by applicable law or agreed to in writing, software

+# distributed under the License is distributed on an "AS IS" BASIS,

+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

+# See the License for the specific language governing permissions and

+# limitations under the License.

+

+handlers = 1catalina.org.apache.juli.FileHandler, 2localhost.org.apache.juli.FileHandler, 3manager.org.apache.juli.FileHandler, 4host-manager.org.apache.juli.FileHandler, java.util.logging.ConsoleHandler

+

+.handlers = 1catalina.org.apache.juli.FileHandler, java.util.logging.ConsoleHandler

+

+############################################################

+# Handler specific properties.

+# Describes specific configuration info for Handlers.

+############################################################

+

+1catalina.org.apache.juli.FileHandler.level = FINE

+1catalina.org.apache.juli.FileHandler.directory = ${catalina.base}/logs

+1catalina.org.apache.juli.FileHandler.prefix = catalina.

+

+2localhost.org.apache.juli.FileHandler.level = FINE

+2localhost.org.apache.juli.FileHandler.directory = ${catalina.base}/logs

+2localhost.org.apache.juli.FileHandler.prefix = localhost.

+

+3manager.org.apache.juli.FileHandler.level = FINE

+3manager.org.apache.juli.FileHandler.directory = ${catalina.base}/logs

+3manager.org.apache.juli.FileHandler.prefix = manager.

+

+4host-manager.org.apache.juli.FileHandler.level = FINE

+4host-manager.org.apache.juli.FileHandler.directory = ${catalina.base}/logs

+4host-manager.org.apache.juli.FileHandler.prefix = host-manager.

+

+java.util.logging.ConsoleHandler.level = FINE

+java.util.logging.ConsoleHandler.formatter = java.util.logging.SimpleFormatter

+

+

+############################################################

+# Facility specific properties.

+# Provides extra control for each logger.

+############################################################

+

+org.apache.catalina.core.ContainerBase.[Catalina].[localhost].level = INFO

+org.apache.catalina.core.ContainerBase.[Catalina].[localhost].handlers = 2localhost.org.apache.juli.FileHandler

+

+org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/manager].level = INFO

+org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/manager].handlers = 3manager.org.apache.juli.FileHandler

+

+org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/host-manager].level = INFO

+org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/host-manager].handlers = 4host-manager.org.apache.juli.FileHandler

+

+# For example, set the org.apache.catalina.util.LifecycleBase logger to log

+# each component that extends LifecycleBase changing state:

+#org.apache.catalina.util.LifecycleBase.level = FINE

+

+# To see debug messages in TldLocationsCache, uncomment the following line:

+#org.apache.jasper.compiler.TldLocationsCache.level = FINE

+

+org.apache.catalina.realm.MemoryRealm = FINE

diff --git a/tomcat8-maven-plugin/src/test/resources/deploy-only-war-project/src/main/tomcatconf/server.xml b/tomcat8-maven-plugin/src/test/resources/deploy-only-war-project/src/main/tomcatconf/server.xml
new file mode 100644
index 0000000..73f3317
--- /dev/null
+++ b/tomcat8-maven-plugin/src/test/resources/deploy-only-war-project/src/main/tomcatconf/server.xml
@@ -0,0 +1,44 @@
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one
+  or more contributor license agreements.  See the NOTICE file
+  distributed with this work for additional information
+  regarding copyright ownership.  The ASF licenses this file
+  to you under the Apache License, Version 2.0 (the
+  "License"); you may not use this file except in compliance
+  with the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing,
+  software distributed under the License is distributed on an
+  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  KIND, either express or implied.  See the License for the
+  specific language governing permissions and limitations
+  under the License.
+-->
+
+<Server port="${its.server.port}" shutdown="SHUTDOWN">
+
+  <GlobalNamingResources>
+    <!-- Used by Manager webapp -->
+    <Resource name="UserDatabase" auth="Container"
+              type="org.apache.catalina.UserDatabase"
+       description="User database that can be updated and saved"
+           factory="org.apache.catalina.users.MemoryUserDatabaseFactory"
+          pathname="conf/tomcat-users.xml" />
+  </GlobalNamingResources>
+
+  <Service name="Catalina">
+    <Connector port="${its.http.port}" keepAliveTimeout="1800000" maxKeepAliveRequests="30000" maxThreads="300" />
+    <Engine name="Catalina" defaultHost="localhost">
+      <Valve className="org.apache.catalina.valves.AccessLogValve"
+             resolveHosts="false" pattern="%t-ip:%a-protocol::%H-status:%s-localPort:%p-path:%U-time:%D ms" buffered="false"/>
+      <Realm className="org.apache.catalina.realm.UserDatabaseRealm"
+             resourceName="UserDatabase" />
+      <Host name="localhost" appBase="${project.build.directory}/test-classes/deploy-only-war-project/target/tomcat/webapps">
+        <Context path="/manager" privileged="true" docBase="${managerWebAppPath}/manager"/>
+      </Host>
+    </Engine>
+    
+  </Service>
+</Server>
diff --git a/tomcat8-maven-plugin/src/test/resources/deploy-only-war-project/src/main/tomcatconf/tomcat-users.xml b/tomcat8-maven-plugin/src/test/resources/deploy-only-war-project/src/main/tomcatconf/tomcat-users.xml
new file mode 100644
index 0000000..5f83bf5
--- /dev/null
+++ b/tomcat8-maven-plugin/src/test/resources/deploy-only-war-project/src/main/tomcatconf/tomcat-users.xml
@@ -0,0 +1,31 @@
+<?xml version='1.0' encoding='utf-8'?>
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You under the Apache License, Version 2.0
+  (the "License"); you may not use this file except in compliance with
+  the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+-->
+<tomcat-users>
+<!--
+  <role rolename="tomcat"/>
+  <role rolename="role1"/>
+  <user username="tomcat" password="tomcat" roles="tomcat"/>
+  <user username="both" password="tomcat" roles="tomcat,role1"/>
+  <user username="role1" password="tomcat" roles="role1"/>
+-->
+  <role rolename="manager"/>
+  <role rolename="manager-gui"/>
+  <role rolename="manager-script"/>
+  <user username="admin" password="admin123" roles="manager,manager-gui,manager-script" />
+  <user username="tomcat" password="tomcat" roles="manager"/>
+</tomcat-users>
diff --git a/tomcat8-maven-plugin/src/test/resources/deploy-only-war-project/src/main/webapp/index.jsp b/tomcat8-maven-plugin/src/test/resources/deploy-only-war-project/src/main/webapp/index.jsp
new file mode 100644
index 0000000..2197216
--- /dev/null
+++ b/tomcat8-maven-plugin/src/test/resources/deploy-only-war-project/src/main/webapp/index.jsp
@@ -0,0 +1,17 @@
+<%--
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You under the Apache License, Version 2.0
+  (the "License"); you may not use this file except in compliance with
+  the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+--%>
+It works !!
\ No newline at end of file
diff --git a/tomcat8-maven-plugin/src/test/resources/deploy-only-war-project/src/main/webapp/web.xml b/tomcat8-maven-plugin/src/test/resources/deploy-only-war-project/src/main/webapp/web.xml
new file mode 100644
index 0000000..3507562
--- /dev/null
+++ b/tomcat8-maven-plugin/src/test/resources/deploy-only-war-project/src/main/webapp/web.xml
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one
+  or more contributor license agreements.  See the NOTICE file
+  distributed with this work for additional information
+  regarding copyright ownership.  The ASF licenses this file
+  to you under the Apache License, Version 2.0 (the
+  "License"); you may not use this file except in compliance
+  with the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing,
+  software distributed under the License is distributed on an
+  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  KIND, either express or implied.  See the License for the
+  specific language governing permissions and limitations
+  under the License.
+-->
+
+<web-app xmlns="http://java.sun.com/xml/ns/j2ee" version="2.4" 
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
+         xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
+    
+    
+</web-app>
\ No newline at end of file
diff --git a/tomcat8-maven-plugin/src/test/resources/deploy-only-war-project/src/test/java/WaitIT.java b/tomcat8-maven-plugin/src/test/resources/deploy-only-war-project/src/test/java/WaitIT.java
new file mode 100644
index 0000000..4c020c6
--- /dev/null
+++ b/tomcat8-maven-plugin/src/test/resources/deploy-only-war-project/src/test/java/WaitIT.java
@@ -0,0 +1,30 @@
+import org.junit.Test;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+
+@SuppressWarnings({"WrongPackageStatement"})
+public final class WaitIT {
+  @Test
+  public void testWait() throws Exception {
+    System.out.println("Just wait a while...");
+    Thread.sleep(${it.sleep.time});
+  }
+}
diff --git a/tomcat8-maven-plugin/src/test/resources/deploy-war-project/pom.xml b/tomcat8-maven-plugin/src/test/resources/deploy-war-project/pom.xml
new file mode 100644
index 0000000..d2f639f
--- /dev/null
+++ b/tomcat8-maven-plugin/src/test/resources/deploy-war-project/pom.xml
@@ -0,0 +1,135 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one
+  or more contributor license agreements.  See the NOTICE file
+  distributed with this work for additional information
+  regarding copyright ownership.  The ASF licenses this file
+  to you under the Apache License, Version 2.0 (the
+  "License"); you may not use this file except in compliance
+  with the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing,
+  software distributed under the License is distributed on an
+  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  KIND, either express or implied.  See the License for the
+  specific language governing permissions and limitations
+  under the License.
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+  <modelVersion>4.0.0</modelVersion>
+  <groupId>org.apache.tomcat.maven.it</groupId>
+  <artifactId>simple-war-project</artifactId>
+  <version>1.0-SNAPSHOT</version>
+  <packaging>war</packaging>
+
+  <properties>
+    <project.build.sourceEncoding>${project.build.sourceEncoding}</project.build.sourceEncoding>
+  </properties>
+
+  <build>
+    <pluginManagement>
+      <plugins>
+        <plugin>
+          <groupId>org.apache.maven.plugins</groupId>
+          <artifactId>maven-war-plugin</artifactId>
+          <version>2.1-alpha-2</version>
+        </plugin>
+        <plugin>
+          <groupId>org.apache.maven.plugins</groupId>
+          <artifactId>maven-compiler-plugin</artifactId>
+          <version>2.3.2</version>
+        </plugin>
+        <plugin>
+          <groupId>org.apache.tomcat.maven</groupId>
+          <artifactId>tomcat7-maven-plugin</artifactId>
+          <version>${project.version}</version>
+        </plugin>
+      </plugins>
+    </pluginManagement>
+
+    <plugins>
+      <plugin>
+        <artifactId>maven-war-plugin</artifactId>
+        <configuration>
+          <webXml>src/main/webapp/web.xml</webXml>
+        </configuration>
+      </plugin>
+      <plugin>
+        <groupId>org.apache.tomcat.maven</groupId>
+        <artifactId>tomcat7-maven-plugin</artifactId>
+        <executions>
+          <execution>
+            <id>tomcat-run</id>
+            <goals>
+              <goal>run-war-only</goal>
+            </goals>
+            <phase>pre-integration-test</phase>
+            <configuration>
+              <fork>true</fork>
+              <path>/foo</path>
+              <serverXml>src/main/tomcatconf/server.xml</serverXml>
+              <tomcatUsers>src/main/tomcatconf/tomcat-users.xml</tomcatUsers>
+            </configuration>
+          </execution>
+          <execution>
+            <id>tomcat-deploy</id>
+            <phase>integration-test</phase>
+            <goals>
+              <goal>deploy</goal>
+            </goals>
+            <configuration>
+              <url>http://localhost:${its.http.port}/manager</url>
+              <username>tomcat</username>
+              <password>tomcat</password>
+              <path>/foo</path>
+            </configuration>
+          </execution>
+          <execution>
+            <id>tomcat-shutdown</id>
+            <phase>post-integration-test</phase>
+            <goals>
+              <goal>shutdown</goal>
+            </goals>
+          </execution>
+        </executions>
+      </plugin>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-failsafe-plugin</artifactId>
+        <version>${failsafe.version}</version>
+        <executions>
+          <execution>
+            <id>integration-test</id>
+            <goals>
+              <goal>integration-test</goal>
+            </goals>
+          </execution>
+          <execution>
+            <id>verify</id>
+            <goals>
+              <goal>verify</goal>
+            </goals>
+          </execution>
+        </executions>
+      </plugin>
+    </plugins>
+  </build>
+
+  <dependencies>
+    <dependency>
+      <groupId>org.springframework</groupId>
+      <artifactId>spring-context-support</artifactId>
+      <version>2.5.6</version>
+    </dependency>
+    <dependency>
+      <groupId>junit</groupId>
+      <artifactId>junit</artifactId>
+      <version>4.9</version>
+      <scope>test</scope>
+    </dependency>
+  </dependencies>
+
+</project>
diff --git a/tomcat8-maven-plugin/src/test/resources/deploy-war-project/src/main/tomcatconf/empty.txt b/tomcat8-maven-plugin/src/test/resources/deploy-war-project/src/main/tomcatconf/empty.txt
new file mode 100644
index 0000000..11925e4
--- /dev/null
+++ b/tomcat8-maven-plugin/src/test/resources/deploy-war-project/src/main/tomcatconf/empty.txt
@@ -0,0 +1,19 @@
+ ~~ Licensed to the Apache Software Foundation (ASF) under one
+ ~~ or more contributor license agreements.  See the NOTICE file
+ ~~ distributed with this work for additional information
+ ~~ regarding copyright ownership.  The ASF licenses this file
+ ~~ to you under the Apache License, Version 2.0 (the
+ ~~ "License"); you may not use this file except in compliance
+ ~~ with the License.  You may obtain a copy of the License at
+ ~~
+ ~~   http://www.apache.org/licenses/LICENSE-2.0
+ ~~
+ ~~ Unless required by applicable law or agreed to in writing,
+ ~~ software distributed under the License is distributed on an
+ ~~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ ~~ KIND, either express or implied.  See the License for the
+ ~~ specific language governing permissions and limitations
+ ~~ under the License.
+
+ ~~ NOTE: For help with the syntax of this file, see:
+ ~~ http://maven.apache.org/doxia/references/apt-format.html
\ No newline at end of file
diff --git a/tomcat8-maven-plugin/src/test/resources/deploy-war-project/src/main/tomcatconf/logging.properties b/tomcat8-maven-plugin/src/test/resources/deploy-war-project/src/main/tomcatconf/logging.properties
new file mode 100644
index 0000000..df3dac5
--- /dev/null
+++ b/tomcat8-maven-plugin/src/test/resources/deploy-war-project/src/main/tomcatconf/logging.properties
@@ -0,0 +1,66 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more

+# contributor license agreements.  See the NOTICE file distributed with

+# this work for additional information regarding copyright ownership.

+# The ASF licenses this file to You under the Apache License, Version 2.0

+# (the "License"); you may not use this file except in compliance with

+# the License.  You may obtain a copy of the License at

+#

+#     http://www.apache.org/licenses/LICENSE-2.0

+#

+# Unless required by applicable law or agreed to in writing, software

+# distributed under the License is distributed on an "AS IS" BASIS,

+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

+# See the License for the specific language governing permissions and

+# limitations under the License.

+

+handlers = 1catalina.org.apache.juli.FileHandler, 2localhost.org.apache.juli.FileHandler, 3manager.org.apache.juli.FileHandler, 4host-manager.org.apache.juli.FileHandler, java.util.logging.ConsoleHandler

+

+.handlers = 1catalina.org.apache.juli.FileHandler, java.util.logging.ConsoleHandler

+

+############################################################

+# Handler specific properties.

+# Describes specific configuration info for Handlers.

+############################################################

+

+1catalina.org.apache.juli.FileHandler.level = FINE

+1catalina.org.apache.juli.FileHandler.directory = ${catalina.base}/logs

+1catalina.org.apache.juli.FileHandler.prefix = catalina.

+

+2localhost.org.apache.juli.FileHandler.level = FINE

+2localhost.org.apache.juli.FileHandler.directory = ${catalina.base}/logs

+2localhost.org.apache.juli.FileHandler.prefix = localhost.

+

+3manager.org.apache.juli.FileHandler.level = FINE

+3manager.org.apache.juli.FileHandler.directory = ${catalina.base}/logs

+3manager.org.apache.juli.FileHandler.prefix = manager.

+

+4host-manager.org.apache.juli.FileHandler.level = FINE

+4host-manager.org.apache.juli.FileHandler.directory = ${catalina.base}/logs

+4host-manager.org.apache.juli.FileHandler.prefix = host-manager.

+

+java.util.logging.ConsoleHandler.level = FINE

+java.util.logging.ConsoleHandler.formatter = java.util.logging.SimpleFormatter

+

+

+############################################################

+# Facility specific properties.

+# Provides extra control for each logger.

+############################################################

+

+org.apache.catalina.core.ContainerBase.[Catalina].[localhost].level = INFO

+org.apache.catalina.core.ContainerBase.[Catalina].[localhost].handlers = 2localhost.org.apache.juli.FileHandler

+

+org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/manager].level = INFO

+org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/manager].handlers = 3manager.org.apache.juli.FileHandler

+

+org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/host-manager].level = INFO

+org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/host-manager].handlers = 4host-manager.org.apache.juli.FileHandler

+

+# For example, set the org.apache.catalina.util.LifecycleBase logger to log

+# each component that extends LifecycleBase changing state:

+#org.apache.catalina.util.LifecycleBase.level = FINE

+

+# To see debug messages in TldLocationsCache, uncomment the following line:

+#org.apache.jasper.compiler.TldLocationsCache.level = FINE

+

+org.apache.catalina.realm.MemoryRealm = FINE

diff --git a/tomcat8-maven-plugin/src/test/resources/deploy-war-project/src/main/tomcatconf/server.xml b/tomcat8-maven-plugin/src/test/resources/deploy-war-project/src/main/tomcatconf/server.xml
new file mode 100644
index 0000000..960ba62
--- /dev/null
+++ b/tomcat8-maven-plugin/src/test/resources/deploy-war-project/src/main/tomcatconf/server.xml
@@ -0,0 +1,44 @@
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one
+  or more contributor license agreements.  See the NOTICE file
+  distributed with this work for additional information
+  regarding copyright ownership.  The ASF licenses this file
+  to you under the Apache License, Version 2.0 (the
+  "License"); you may not use this file except in compliance
+  with the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing,
+  software distributed under the License is distributed on an
+  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  KIND, either express or implied.  See the License for the
+  specific language governing permissions and limitations
+  under the License.
+-->
+
+<Server port="${its.server.port}" shutdown="SHUTDOWN">
+
+  <GlobalNamingResources>
+    <!-- Used by Manager webapp -->
+    <Resource name="UserDatabase" auth="Container"
+              type="org.apache.catalina.UserDatabase"
+       description="User database that can be updated and saved"
+           factory="org.apache.catalina.users.MemoryUserDatabaseFactory"
+          pathname="conf/tomcat-users.xml" />
+  </GlobalNamingResources>
+
+  <Service name="Catalina">
+    <Connector port="${its.http.port}" keepAliveTimeout="1800000" maxKeepAliveRequests="30000" maxThreads="300" />
+    <Engine name="Catalina" defaultHost="localhost">
+      <Valve className="org.apache.catalina.valves.AccessLogValve"
+             resolveHosts="false" pattern="%t-ip:%a-protocol::%H-status:%s-localPort:%p-path:%U-time:%D ms" buffered="false"/>
+      <Realm className="org.apache.catalina.realm.UserDatabaseRealm"
+             resourceName="UserDatabase" />
+      <Host name="localhost" appBase="${project.build.directory}/test-classes/deploy-war-project/target/tomcat/webapps">
+        <Context path="/manager" privileged="true" docBase="${managerWebAppPath}/manager"/>
+      </Host>
+    </Engine>
+    
+  </Service>
+</Server>
diff --git a/tomcat8-maven-plugin/src/test/resources/deploy-war-project/src/main/tomcatconf/tomcat-users.xml b/tomcat8-maven-plugin/src/test/resources/deploy-war-project/src/main/tomcatconf/tomcat-users.xml
new file mode 100644
index 0000000..5f83bf5
--- /dev/null
+++ b/tomcat8-maven-plugin/src/test/resources/deploy-war-project/src/main/tomcatconf/tomcat-users.xml
@@ -0,0 +1,31 @@
+<?xml version='1.0' encoding='utf-8'?>
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You under the Apache License, Version 2.0
+  (the "License"); you may not use this file except in compliance with
+  the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+-->
+<tomcat-users>
+<!--
+  <role rolename="tomcat"/>
+  <role rolename="role1"/>
+  <user username="tomcat" password="tomcat" roles="tomcat"/>
+  <user username="both" password="tomcat" roles="tomcat,role1"/>
+  <user username="role1" password="tomcat" roles="role1"/>
+-->
+  <role rolename="manager"/>
+  <role rolename="manager-gui"/>
+  <role rolename="manager-script"/>
+  <user username="admin" password="admin123" roles="manager,manager-gui,manager-script" />
+  <user username="tomcat" password="tomcat" roles="manager"/>
+</tomcat-users>
diff --git a/tomcat8-maven-plugin/src/test/resources/deploy-war-project/src/main/webapp/index.jsp b/tomcat8-maven-plugin/src/test/resources/deploy-war-project/src/main/webapp/index.jsp
new file mode 100644
index 0000000..2197216
--- /dev/null
+++ b/tomcat8-maven-plugin/src/test/resources/deploy-war-project/src/main/webapp/index.jsp
@@ -0,0 +1,17 @@
+<%--
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You under the Apache License, Version 2.0
+  (the "License"); you may not use this file except in compliance with
+  the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+--%>
+It works !!
\ No newline at end of file
diff --git a/tomcat8-maven-plugin/src/test/resources/deploy-war-project/src/main/webapp/web.xml b/tomcat8-maven-plugin/src/test/resources/deploy-war-project/src/main/webapp/web.xml
new file mode 100644
index 0000000..3507562
--- /dev/null
+++ b/tomcat8-maven-plugin/src/test/resources/deploy-war-project/src/main/webapp/web.xml
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one
+  or more contributor license agreements.  See the NOTICE file
+  distributed with this work for additional information
+  regarding copyright ownership.  The ASF licenses this file
+  to you under the Apache License, Version 2.0 (the
+  "License"); you may not use this file except in compliance
+  with the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing,
+  software distributed under the License is distributed on an
+  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  KIND, either express or implied.  See the License for the
+  specific language governing permissions and limitations
+  under the License.
+-->
+
+<web-app xmlns="http://java.sun.com/xml/ns/j2ee" version="2.4" 
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
+         xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
+    
+    
+</web-app>
\ No newline at end of file
diff --git a/tomcat8-maven-plugin/src/test/resources/deploy-war-project/src/test/java/WaitIT.java b/tomcat8-maven-plugin/src/test/resources/deploy-war-project/src/test/java/WaitIT.java
new file mode 100644
index 0000000..4c020c6
--- /dev/null
+++ b/tomcat8-maven-plugin/src/test/resources/deploy-war-project/src/test/java/WaitIT.java
@@ -0,0 +1,30 @@
+import org.junit.Test;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+
+@SuppressWarnings({"WrongPackageStatement"})
+public final class WaitIT {
+  @Test
+  public void testWait() throws Exception {
+    System.out.println("Just wait a while...");
+    Thread.sleep(${it.sleep.time});
+  }
+}
diff --git a/tomcat8-maven-plugin/src/test/resources/log4j2-test.xml b/tomcat8-maven-plugin/src/test/resources/log4j2-test.xml
new file mode 100644
index 0000000..eef73d8
--- /dev/null
+++ b/tomcat8-maven-plugin/src/test/resources/log4j2-test.xml
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!--
+  ~ Licensed to the Apache Software Foundation (ASF) under one
+  ~ or more contributor license agreements.  See the NOTICE file
+  ~ distributed with this work for additional information
+  ~ regarding copyright ownership.  The ASF licenses this file
+  ~ to you under the Apache License, Version 2.0 (the
+  ~ "License"); you may not use this file except in compliance
+  ~ with the License.  You may obtain a copy of the License at
+  ~
+  ~   http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing,
+  ~ software distributed under the License is distributed on an
+  ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  ~ KIND, either express or implied.  See the License for the
+  ~ specific language governing permissions and limitations
+  ~ under the License.
+  -->
+
+
+<configuration>
+  <appenders>
+    <Console name="console" target="SYSTEM_OUT">
+      <PatternLayout pattern="%d{HH:mm:ss.SSS} [%t] %-5level %logger{36} - %msg%n"/>
+    </Console>
+  </appenders>
+  <loggers>
+
+    <root level="info">
+      <appender-ref ref="console"/>
+    </root>
+  </loggers>
+</configuration>
+
+
diff --git a/tomcat8-maven-plugin/src/test/resources/simple-war-project/pom.xml b/tomcat8-maven-plugin/src/test/resources/simple-war-project/pom.xml
new file mode 100644
index 0000000..684a419
--- /dev/null
+++ b/tomcat8-maven-plugin/src/test/resources/simple-war-project/pom.xml
@@ -0,0 +1,126 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one
+  or more contributor license agreements.  See the NOTICE file
+  distributed with this work for additional information
+  regarding copyright ownership.  The ASF licenses this file
+  to you under the Apache License, Version 2.0 (the
+  "License"); you may not use this file except in compliance
+  with the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing,
+  software distributed under the License is distributed on an
+  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  KIND, either express or implied.  See the License for the
+  specific language governing permissions and limitations
+  under the License.
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+  <modelVersion>4.0.0</modelVersion>
+  <groupId>org.apache.tomcat.maven.it</groupId>
+  <artifactId>simple-war-project</artifactId>
+  <version>1.0-SNAPSHOT</version>
+  <packaging>war</packaging>
+  <properties>
+    <project.build.sourceEncoding>${project.build.sourceEncoding}</project.build.sourceEncoding>
+  </properties>
+
+
+  <build>
+    <pluginManagement>
+      <plugins>
+        <plugin>
+          <groupId>org.apache.maven.plugins</groupId>
+          <artifactId>maven-war-plugin</artifactId>
+          <version>2.1-alpha-2</version>
+        </plugin>
+        <plugin>
+          <groupId>org.apache.maven.plugins</groupId>
+          <artifactId>maven-compiler-plugin</artifactId>
+          <version>2.3.2</version>
+        </plugin>
+        <plugin>
+          <groupId>org.apache.tomcat.maven</groupId>
+          <artifactId>tomcat7-maven-plugin</artifactId>
+          <version>${project.version}</version>
+        </plugin>
+      </plugins>
+    </pluginManagement>
+
+    <plugins>
+      <plugin>
+        <artifactId>maven-war-plugin</artifactId>
+        <configuration>
+          <webXml>src/main/webapp/web.xml</webXml>
+        </configuration>
+      </plugin>
+      <plugin>
+        <groupId>org.apache.tomcat.maven</groupId>
+        <artifactId>tomcat7-maven-plugin</artifactId>
+        <executions>
+          <execution>
+            <id>tomcat-run</id>
+            <goals>
+              <goal>run</goal>
+            </goals>
+            <phase>pre-integration-test</phase>
+            <configuration>
+              <fork>true</fork>
+              <port>${its.http.port}</port>
+              <ajpPort>${its.ajp.port}</ajpPort>
+              <path>/</path>
+              <systemProperties>
+                <com.sun.management.jmxremote.ssl>false</com.sun.management.jmxremote.ssl>
+              </systemProperties>
+              <tomcatLoggingFile>src/main/tomcatconf/logging.properties</tomcatLoggingFile>
+            </configuration>
+          </execution>
+          <execution>
+            <id>tomcat-shutdown</id>
+            <phase>post-integration-test</phase>
+            <goals>
+              <goal>shutdown</goal>
+            </goals>
+          </execution>
+        </executions>
+      </plugin>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-failsafe-plugin</artifactId>
+        <version>${failsafe.version}</version>
+        <executions>
+          <execution>
+            <id>integration-test</id>
+            <goals>
+              <goal>integration-test</goal>
+            </goals>
+          </execution>
+          <execution>
+            <id>verify</id>
+            <goals>
+              <goal>verify</goal>
+            </goals>
+          </execution>
+        </executions>
+      </plugin>
+    </plugins>
+  </build>
+
+  <dependencies>
+    <dependency>
+      <groupId>org.springframework</groupId>
+      <artifactId>spring-context-support</artifactId>
+      <version>2.5.6</version>
+    </dependency>
+    <dependency>
+      <groupId>junit</groupId>
+      <artifactId>junit</artifactId>
+      <version>4.9</version>
+      <scope>test</scope>
+    </dependency>
+  </dependencies>
+
+</project>
diff --git a/tomcat8-maven-plugin/src/test/resources/simple-war-project/src/main/tomcatconf/empty.txt b/tomcat8-maven-plugin/src/test/resources/simple-war-project/src/main/tomcatconf/empty.txt
new file mode 100644
index 0000000..11925e4
--- /dev/null
+++ b/tomcat8-maven-plugin/src/test/resources/simple-war-project/src/main/tomcatconf/empty.txt
@@ -0,0 +1,19 @@
+ ~~ Licensed to the Apache Software Foundation (ASF) under one
+ ~~ or more contributor license agreements.  See the NOTICE file
+ ~~ distributed with this work for additional information
+ ~~ regarding copyright ownership.  The ASF licenses this file
+ ~~ to you under the Apache License, Version 2.0 (the
+ ~~ "License"); you may not use this file except in compliance
+ ~~ with the License.  You may obtain a copy of the License at
+ ~~
+ ~~   http://www.apache.org/licenses/LICENSE-2.0
+ ~~
+ ~~ Unless required by applicable law or agreed to in writing,
+ ~~ software distributed under the License is distributed on an
+ ~~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ ~~ KIND, either express or implied.  See the License for the
+ ~~ specific language governing permissions and limitations
+ ~~ under the License.
+
+ ~~ NOTE: For help with the syntax of this file, see:
+ ~~ http://maven.apache.org/doxia/references/apt-format.html
\ No newline at end of file
diff --git a/tomcat8-maven-plugin/src/test/resources/simple-war-project/src/main/tomcatconf/logging.properties b/tomcat8-maven-plugin/src/test/resources/simple-war-project/src/main/tomcatconf/logging.properties
new file mode 100644
index 0000000..709a122
--- /dev/null
+++ b/tomcat8-maven-plugin/src/test/resources/simple-war-project/src/main/tomcatconf/logging.properties
@@ -0,0 +1,66 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+handlers = 1catalina.org.apache.juli.FileHandler, 2localhost.org.apache.juli.FileHandler, 3manager.org.apache.juli.FileHandler, 4host-manager.org.apache.juli.FileHandler, java.util.logging.ConsoleHandler
+
+.handlers = 1catalina.org.apache.juli.FileHandler, java.util.logging.ConsoleHandler
+
+############################################################
+# Handler specific properties.
+# Describes specific configuration info for Handlers.
+############################################################
+
+1catalina.org.apache.juli.FileHandler.level = FINE
+1catalina.org.apache.juli.FileHandler.directory = ${catalina.base}/logs
+1catalina.org.apache.juli.FileHandler.prefix = catalina.
+
+2localhost.org.apache.juli.FileHandler.level = FINE
+2localhost.org.apache.juli.FileHandler.directory = ${catalina.base}/logs
+2localhost.org.apache.juli.FileHandler.prefix = localhost.
+
+3manager.org.apache.juli.FileHandler.level = FINE
+3manager.org.apache.juli.FileHandler.directory = ${catalina.base}/logs
+3manager.org.apache.juli.FileHandler.prefix = manager.
+
+4host-manager.org.apache.juli.FileHandler.level = FINE
+4host-manager.org.apache.juli.FileHandler.directory = ${catalina.base}/logs
+4host-manager.org.apache.juli.FileHandler.prefix = host-manager.
+
+java.util.logging.ConsoleHandler.level = FINE
+java.util.logging.ConsoleHandler.formatter = java.util.logging.SimpleFormatter
+
+
+############################################################
+# Facility specific properties.
+# Provides extra control for each logger.
+############################################################
+
+org.apache.catalina.core.ContainerBase.[Catalina].[localhost].level = FINE
+org.apache.catalina.core.ContainerBase.[Catalina].[localhost].handlers = 2localhost.org.apache.juli.FileHandler
+
+org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/manager].level = FINE
+org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/manager].handlers = 3manager.org.apache.juli.FileHandler
+
+org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/host-manager].level = FINE
+org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/host-manager].handlers = 4host-manager.org.apache.juli.FileHandler
+
+# For example, set the org.apache.catalina.util.LifecycleBase logger to log
+# each component that extends LifecycleBase changing state:
+org.apache.catalina.util.LifecycleBase.level = FINE
+
+# To see debug messages in TldLocationsCache, uncomment the following line:
+org.apache.jasper.compiler.TldLocationsCache.level = FINE
+
+org.apache = FINE
diff --git a/tomcat8-maven-plugin/src/test/resources/simple-war-project/src/main/tomcatconf/server.xml b/tomcat8-maven-plugin/src/test/resources/simple-war-project/src/main/tomcatconf/server.xml
new file mode 100644
index 0000000..76ab562
--- /dev/null
+++ b/tomcat8-maven-plugin/src/test/resources/simple-war-project/src/main/tomcatconf/server.xml
@@ -0,0 +1,43 @@
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one
+  or more contributor license agreements.  See the NOTICE file
+  distributed with this work for additional information
+  regarding copyright ownership.  The ASF licenses this file
+  to you under the Apache License, Version 2.0 (the
+  "License"); you may not use this file except in compliance
+  with the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing,
+  software distributed under the License is distributed on an
+  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  KIND, either express or implied.  See the License for the
+  specific language governing permissions and limitations
+  under the License.
+-->
+
+<Server port="8010" shutdown="SHUTDOWN">
+
+  <GlobalNamingResources>
+    <!-- Used by Manager webapp -->
+    <Resource name="UserDatabase" auth="Container"
+              type="org.apache.catalina.UserDatabase"
+       description="User database that can be updated and saved"
+           factory="org.apache.catalina.users.MemoryUserDatabaseFactory"
+          pathname="conf/tomcat-users.xml" />
+  </GlobalNamingResources>
+
+  <Service name="Catalina">
+    <Connector port="8080" keepAliveTimeout="1800000" maxKeepAliveRequests="30000" maxThreads="300" />
+    <Connector port="8088" keepAliveTimeout="1800000" maxKeepAliveRequests="30000" maxThreads="300" />
+    <Engine name="Catalina" defaultHost="localhost">
+      <Valve className="org.apache.catalina.valves.AccessLogValve" 
+             resolveHosts="false" pattern="%t-ip:%a-protocol:%H-localPort:%p-path:%U-time:%D ms"/> 
+      <Realm className="org.apache.catalina.realm.UserDatabaseRealm"
+             resourceName="UserDatabase" />
+      <Host name="localhost" appBase="webapps" />
+    </Engine>
+    
+  </Service>
+</Server>
diff --git a/tomcat8-maven-plugin/src/test/resources/simple-war-project/src/main/webapp/index.jsp b/tomcat8-maven-plugin/src/test/resources/simple-war-project/src/main/webapp/index.jsp
new file mode 100644
index 0000000..2197216
--- /dev/null
+++ b/tomcat8-maven-plugin/src/test/resources/simple-war-project/src/main/webapp/index.jsp
@@ -0,0 +1,17 @@
+<%--
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You under the Apache License, Version 2.0
+  (the "License"); you may not use this file except in compliance with
+  the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+--%>
+It works !!
\ No newline at end of file
diff --git a/tomcat8-maven-plugin/src/test/resources/simple-war-project/src/main/webapp/web.xml b/tomcat8-maven-plugin/src/test/resources/simple-war-project/src/main/webapp/web.xml
new file mode 100644
index 0000000..7cddd47
--- /dev/null
+++ b/tomcat8-maven-plugin/src/test/resources/simple-war-project/src/main/webapp/web.xml
@@ -0,0 +1,26 @@
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one
+  or more contributor license agreements.  See the NOTICE file
+  distributed with this work for additional information
+  regarding copyright ownership.  The ASF licenses this file
+  to you under the Apache License, Version 2.0 (the
+  "License"); you may not use this file except in compliance
+  with the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing,
+  software distributed under the License is distributed on an
+  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  KIND, either express or implied.  See the License for the
+  specific language governing permissions and limitations
+  under the License.
+-->
+
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<web-app xmlns="http://java.sun.com/xml/ns/j2ee" version="2.4" 
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
+         xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
+    
+    
+</web-app>
\ No newline at end of file
diff --git a/tomcat8-maven-plugin/src/test/resources/simple-war-project/src/test/java/WaitIT.java b/tomcat8-maven-plugin/src/test/resources/simple-war-project/src/test/java/WaitIT.java
new file mode 100644
index 0000000..4c020c6
--- /dev/null
+++ b/tomcat8-maven-plugin/src/test/resources/simple-war-project/src/test/java/WaitIT.java
@@ -0,0 +1,30 @@
+import org.junit.Test;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+
+@SuppressWarnings({"WrongPackageStatement"})
+public final class WaitIT {
+  @Test
+  public void testWait() throws Exception {
+    System.out.println("Just wait a while...");
+    Thread.sleep(${it.sleep.time});
+  }
+}
diff --git a/tomcat8-maven-plugin/src/test/resources/tomcat-run-multi-config/pom.xml b/tomcat8-maven-plugin/src/test/resources/tomcat-run-multi-config/pom.xml
new file mode 100644
index 0000000..b0cbf27
--- /dev/null
+++ b/tomcat8-maven-plugin/src/test/resources/tomcat-run-multi-config/pom.xml
@@ -0,0 +1,135 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one
+  or more contributor license agreements.  See the NOTICE file
+  distributed with this work for additional information
+  regarding copyright ownership.  The ASF licenses this file
+  to you under the Apache License, Version 2.0 (the
+  "License"); you may not use this file except in compliance
+  with the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing,
+  software distributed under the License is distributed on an
+  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  KIND, either express or implied.  See the License for the
+  specific language governing permissions and limitations
+  under the License.
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+  <modelVersion>4.0.0</modelVersion>
+  <groupId>org.apache.tomcat.maven.it</groupId>
+  <artifactId>tomcat-run-multi-config</artifactId>
+  <version>1.0-SNAPSHOT</version>
+  <packaging>war</packaging>
+
+  <properties>
+    <!-- Set to false if you want to debug the tomcat -->
+    <maven.tomcat.fork>true</maven.tomcat.fork>
+    <pluginVersion>${project.version}</pluginVersion>
+    <maven.compiler.source>${maven.compiler.source}</maven.compiler.source>
+    <maven.compiler.target>${maven.compiler.target}</maven.compiler.target>
+    <project.build.sourceEncoding>${project.build.sourceEncoding}</project.build.sourceEncoding>
+    <failOnMissingWebXml>false</failOnMissingWebXml>
+  </properties>
+
+  <build>
+    <pluginManagement>
+      <plugins>
+        <plugin>
+          <groupId>org.apache.tomcat.maven</groupId>
+          <artifactId>tomcat7-maven-plugin</artifactId>
+          <version>${project.version}</version>
+        </plugin>
+      </plugins>
+    </pluginManagement>
+
+    <plugins>
+      <plugin>
+        <artifactId>maven-war-plugin</artifactId>
+        <configuration>
+          <webXml>src/main/webapp/web.xml</webXml>
+        </configuration>
+      </plugin>
+      <plugin>
+        <groupId>org.apache.tomcat.maven</groupId>
+        <artifactId>tomcat7-maven-plugin</artifactId>
+        <executions>
+          <execution>
+            <id>tomcat-run</id>
+            <goals>
+              <goal>run</goal>
+            </goals>
+            <phase>pre-integration-test</phase>
+            <configuration>
+              <additionalConfigFilesDir>\${basedir}/src/main/tcconf</additionalConfigFilesDir>
+              <configurationDir>\${project.build.directory}/tc</configurationDir>
+              <path>/multi-config</path>
+              <port>${its.http.port}</port>
+              <httpsPort>${its.https.port}</httpsPort>
+              <keystoreFile>${keystoreTestPath}</keystoreFile>
+              <ajpPort>${its.ajp.port}</ajpPort>
+              <uriEncoding>UTF-8</uriEncoding>
+              <systemProperties>
+                <com.sun.management.jmxremote.ssl>false</com.sun.management.jmxremote.ssl>
+              </systemProperties>
+            </configuration>
+          </execution>
+          <execution>
+            <id>tomcat-shutdown</id>
+            <phase>post-integration-test</phase>
+            <goals>
+              <goal>shutdown</goal>
+            </goals>
+          </execution>
+        </executions>
+      </plugin>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-failsafe-plugin</artifactId>
+        <version>${failsafe.version}</version>
+        <executions>
+          <execution>
+            <id>integration-test</id>
+            <goals>
+              <goal>integration-test</goal>
+            </goals>
+          </execution>
+          <execution>
+            <id>verify</id>
+            <goals>
+              <goal>verify</goal>
+            </goals>
+          </execution>
+        </executions>
+      </plugin>
+    </plugins>
+  </build>
+
+  <dependencies>
+    <dependency>
+      <groupId>org.springframework</groupId>
+      <artifactId>spring-context-support</artifactId>
+      <version>2.5.6</version>
+    </dependency>
+    <dependency>
+      <groupId>junit</groupId>
+      <artifactId>junit</artifactId>
+      <version>${junit.version}</version>
+      <scope>test</scope>
+    </dependency>
+    <dependency>
+      <groupId>jstl</groupId>
+      <artifactId>jstl</artifactId>
+      <version>1.1.2</version>
+    </dependency>
+    <dependency>
+      <groupId>taglibs</groupId>
+      <artifactId>standard</artifactId>
+      <version>1.1.2</version>
+    </dependency>
+  </dependencies>
+
+</project>
diff --git a/tomcat8-maven-plugin/src/test/resources/tomcat-run-multi-config/src/main/tcconf/empty.txt b/tomcat8-maven-plugin/src/test/resources/tomcat-run-multi-config/src/main/tcconf/empty.txt
new file mode 100644
index 0000000..11925e4
--- /dev/null
+++ b/tomcat8-maven-plugin/src/test/resources/tomcat-run-multi-config/src/main/tcconf/empty.txt
@@ -0,0 +1,19 @@
+ ~~ Licensed to the Apache Software Foundation (ASF) under one
+ ~~ or more contributor license agreements.  See the NOTICE file
+ ~~ distributed with this work for additional information
+ ~~ regarding copyright ownership.  The ASF licenses this file
+ ~~ to you under the Apache License, Version 2.0 (the
+ ~~ "License"); you may not use this file except in compliance
+ ~~ with the License.  You may obtain a copy of the License at
+ ~~
+ ~~   http://www.apache.org/licenses/LICENSE-2.0
+ ~~
+ ~~ Unless required by applicable law or agreed to in writing,
+ ~~ software distributed under the License is distributed on an
+ ~~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ ~~ KIND, either express or implied.  See the License for the
+ ~~ specific language governing permissions and limitations
+ ~~ under the License.
+
+ ~~ NOTE: For help with the syntax of this file, see:
+ ~~ http://maven.apache.org/doxia/references/apt-format.html
\ No newline at end of file
diff --git a/tomcat8-maven-plugin/src/test/resources/tomcat-run-multi-config/src/main/webapp/index.jsp b/tomcat8-maven-plugin/src/test/resources/tomcat-run-multi-config/src/main/webapp/index.jsp
new file mode 100644
index 0000000..6fa84f6
--- /dev/null
+++ b/tomcat8-maven-plugin/src/test/resources/tomcat-run-multi-config/src/main/webapp/index.jsp
@@ -0,0 +1,40 @@
+<%@ page language="java" contentType="text/html;charset=UTF-8" pageEncoding="UTF-8"%>
+<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
+<%--
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You under the Apache License, Version 2.0
+  (the "License"); you may not use this file except in compliance with
+  the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+--%>
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+<title>Example</title>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+</head>
+<body>
+<p>
+<c:choose>
+    <c:when test="${empty param.string}">
+        Not set.
+    </c:when>
+    <c:otherwise>
+        String: <b><c:out value="${param.string}" /></b>!
+    </c:otherwise>
+</c:choose>
+</p>
+</body>
+</html>
+
+
+
diff --git a/tomcat8-maven-plugin/src/test/resources/tomcat-run-multi-config/src/main/webapp/web.xml b/tomcat8-maven-plugin/src/test/resources/tomcat-run-multi-config/src/main/webapp/web.xml
new file mode 100644
index 0000000..96c7790
--- /dev/null
+++ b/tomcat8-maven-plugin/src/test/resources/tomcat-run-multi-config/src/main/webapp/web.xml
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+  ~ Licensed to the Apache Software Foundation (ASF) under one
+  ~ or more contributor license agreements.  See the NOTICE file
+  ~ distributed with this work for additional information
+  ~ regarding copyright ownership.  The ASF licenses this file
+  ~ to you under the Apache License, Version 2.0 (the
+  ~ "License"); you may not use this file except in compliance
+  ~ with the License.  You may obtain a copy of the License at
+  ~
+  ~   http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing,
+  ~ software distributed under the License is distributed on an
+  ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  ~ KIND, either express or implied.  See the License for the
+  ~ specific language governing permissions and limitations
+  ~ under the License.
+  -->
+
+<web-app xmlns="http://java.sun.com/xml/ns/j2ee" version="2.4"
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
+
+<jsp-config>
+        <taglib>
+                <taglib-uri>http://java.sun.com/jsp/jstl/core</taglib-uri>
+                <taglib-location>/WEB-INF/tld/c.tld</taglib-location>
+        </taglib>
+</jsp-config>
+  <!--
+  <taglib>
+    <taglib-uri>http://java.sun.com/jstl/core</taglib-uri>
+    <taglib-location>/WEB-INF/c.tld</taglib-location>
+  </taglib>
+-->
+
+</web-app>
diff --git a/tomcat8-maven-plugin/src/test/resources/tomcat-run-multi-config/src/test/java/WaitIT.java b/tomcat8-maven-plugin/src/test/resources/tomcat-run-multi-config/src/test/java/WaitIT.java
new file mode 100644
index 0000000..4c020c6
--- /dev/null
+++ b/tomcat8-maven-plugin/src/test/resources/tomcat-run-multi-config/src/test/java/WaitIT.java
@@ -0,0 +1,30 @@
+import org.junit.Test;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+
+@SuppressWarnings({"WrongPackageStatement"})
+public final class WaitIT {
+  @Test
+  public void testWait() throws Exception {
+    System.out.println("Just wait a while...");
+    Thread.sleep(${it.sleep.time});
+  }
+}
diff --git a/tomcat8-maven-plugin/src/test/simple-war-project-1.0-SNAPSHOT.war b/tomcat8-maven-plugin/src/test/simple-war-project-1.0-SNAPSHOT.war
new file mode 100644
index 0000000..b0315c9
--- /dev/null
+++ b/tomcat8-maven-plugin/src/test/simple-war-project-1.0-SNAPSHOT.war
Binary files differ