maven-plugins/war/xdocs/properties.xml
dion 602ded6152 Update docs
git-svn-id: https://svn.apache.org/repos/asf/maven/maven-1/plugins/trunk@115515 13f79535-47bb-0310-9956-ffa450edef68
2004-06-19 08:58:52 +00:00

191 lines
6.1 KiB
XML

<?xml version="1.0" encoding="ISO-8859-1"?>
<!--
/*
* 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>War Properties</title>
<author email="vmassol@octo.com">Vincent Massol</author>
</properties>
<body>
<section name="War Settings">
<table>
<tr><th>Property</th><th>Optional?</th><th>Description</th></tr>
<tr>
<td>maven.war.src</td>
<td>Yes</td>
<td>
Location of the webapp in the source tree. Your
<code>WEB-INF</code> directory must be located right under
<code>${maven.war.src}</code>. It defaults to
<code>${maven.src.dir}/webapp</code>.
</td>
</tr>
<tr>
<td>maven.war.src.includes</td>
<td>Yes</td>
<td>
Comma or space separated list of Ant path patterns specifycing
what files and directories from <code>${maven.war.src}</code>
should be included in the web application. All files are included
by default.
</td>
</tr>
<tr>
<td>maven.war.src.excludes</td>
<td>Yes</td>
<td>
Comma or space separated list of Ant path patterns specifycing
what files and directories from <code>${maven.war.src}</code>
should be excluded from the web application. No files are excluded
by default.
</td>
</tr>
<tr>
<td>maven.war.webxml</td>
<td>Yes</td>
<td>
Location of the <code>web.xml</code> file. It defaults to
<code>${maven.war.src}/WEB-INF/web.xml</code>.
</td>
</tr>
<tr>
<td>maven.war.classes.includes</td>
<td>Yes</td>
<td>
Classes to include from WEB-INF/classes
Note: Classes are relative to
<code>${maven.build.dir}</code>.
</td>
</tr>
<tr>
<td>maven.war.classes.excludes</td>
<td>Yes</td>
<td>
Classes to exclude from WEB-INF/classes
Note: Classes are relative to
<code>${maven.build.dir}</code>.
</td>
</tr>
<tr>
<td>maven.war.final.name</td>
<td>Yes</td>
<td>
<p>Name of the war file that is built.</p>
<p>Defaults to <code>${pom.artifactId}.war</code></p>
<p>
Use <code>${pom.artifactId}-${pom.currentVersion}</code>
to mimic the files created using the jar and ear plugins
</p>
</td>
</tr>
<tr>
<td>maven.war.build.dir</td>
<td>Yes</td>
<td>
Directory where the war will be generated. It defaults
to <code>${maven.build.dir}</code>.
</td>
</tr>
<tr>
<td>maven.war.webapp.dir</td>
<td>Yes</td>
<td>
Directory where the webapp will be generated. It defaults to
<code>${maven.war.build.dir}/${pom.artifactId}</code>.
</td>
</tr>
<tr>
<td>maven.war.manifest</td>
<td>Yes</td>
<td>
Location of the MANIFEST.MF file in the source tree. It defaults to
<code>${maven.war.src}/META-INF/MANIFEST.MF</code>.
</td>
</tr>
<tr>
<td>maven.war.index</td>
<td>Yes</td>
<td>
Whether to create an index list to speed up classloading.
This is a JDK 1.3+ specific feature. Defaults to false.
</td>
</tr>
<tr>
<a id="tld_dir"/>
<td>maven.war.tld.dir</td>
<td>Yes</td>
<td>
Subdirectory of web application context root directory
where tag library descriptors (tld files) will be copied.
The Maven WAR Plugin copies to this location all dependencies,
specified in the POM, of the type <code>tld</code> and marked
with a property of <code>war.bundle</code> set to <code>true</code>.
See the section below for more information.
<br/>
It defaults to <code>WEB-INF/tld</code>.
This setting is adhering to
<a href="http://developer.java.sun.com/developer/technicalArticles/javaserverpages/code_convention/"
>SUN Code Conventions for the JavaServer Pages</a>
</td>
</tr>
</table>
</section>
<section name="Including artifacts in the Webapp">
<p>
You must tell Maven what artifacts you want included in the Webapp. This
is achieved by specifying a property in the POM, using the
following syntax:
</p>
<source><![CDATA[
<dependency>
<groupId>grpId</groupId>
<artifactId>jarid</artifactId>
<version>jarversion</version>
<type>jar</type>
<properties>
<war.bundle>true</war.bundle>
</properties>
</dependency>
<dependency>
<groupId>grpId</groupId>
<artifactId>tldid</artifactId>
<version>tldversion</version>
<type>tld</type>
<properties>
<war.bundle>true</war.bundle>
</properties>
</dependency>
]]></source>
<p>
This process is type senstive.
Currently following types are supported:
<ol>
<li>jar (bundled into WEB-INF/lib)</li>
<li>tld (bundled into WEB-INF/tld, see: <a href="#tld_dir">maven.war.tld.dir</a>)</li>
</ol>
</p>
</section>
</body>
</document>