<?xml version="1.0"?>
<!-- 
/*
 * Copyright 2001-2004 The Apache Software Foundation.
 * 
 * Licensed 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.
 */
 -->

<document>

  <properties>
    <title>Maven War Plugin</title>
    <author email="vmassol@octo.com">Vincent Massol</author>
  </properties>

  <body>
    <section name="Maven War Plugin">
      <p>
        This plug-in provides the ability to generate either a deployed webapp
        or a webapp packaged as a WAR file.
      </p>
      <subsection name="Bundling dependencies">
        <p>
If you need to add extra dependencies in the web application, there are two
properties you can use.</p>
<table>
<tr><td><code>war.bundle</code></td><td>This property includes the dependency in
<code>/WEB-INF/lib</code></td></tr>
<tr><td><code>war.target.path</code></td><td>This bundles the dependency in the path
specified relative to the base of the web application.</td></tr>
</table>
<p>For example, the following adds commons-lang to <code>/WEB-INF/lib</code> and
myApplet to the <code>/applets</code> directory.
        </p>
<source><![CDATA[
  <dependency>
    <id>commons-lang</id>
    <version>2.0</version>
    <properties>
      <war.bundle>true</war.bundle>
    </properties>
  </dependency>

  <dependency>
    <id>myApplet</id>
    <version>1.4</version>
    <properties>
      <war.target.path>applets</war.target.path>
    </properties>
  </dependency>]]></source>
      </subsection>
      <subsection name="Filtering web.xml">
        <p>
          If you need to copy the web.xml file in order to replace some
          filter tokens or simply perform some custom modification to it,
          simply write a pre-goal to the <code>war:war</code> goal in which 
          you perform the manipulation. Then set the
          <code>maven.war.webxml</code> property to point to your modified
          <code>web.xml</code>.
        </p>
      </subsection>
    </section>
 </body>
</document>
