<?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>User Guide</title>
    <author email="jason@zenplex.com">Jason van Zyl</author>
  </properties>

  <body>
    <section name="User Guide">
      <p>
        <ol>
          <li><a href="#About this Guide">About this Guide</a></li>
          <li><a href="#Introduction">Introduction</a></li>
          <li><a href="#The Project Object Model">Project Object Model</a></li>
          <li><a href="#POM Processing">POM Processing</a></li>
            <ol>
              <li><a href="#POM Interpolation">POM Interpolation</a></li>
              <li><a href="#POM Inheritance">POM Inheritance</a></li>
            </ol>
          <li><a href="#Using Plugin-ins">Using Plug-ins</a></li>
          <li><a href="#maven.xml">The maven.xml file</a>
            <ol>
              <li><a href="#Sample maven.xml">Sample maven.xml</a></li>
              <li><a href="#The project element">The project element</a></li>
              <li><a href="#Goals">Goals</a></li>
              <li><a href="#Jelly coding">Jelly coding</a></li>
            </ol>
          </li>
          <li><a href="#Maven Setup">Maven Setup</a>
            <ol>
              <li><a href="#Properties Processing">Properties Processing</a></li>
              <li><a href="#Plug-in Properties">Plug-in Properties</a></li>
              <li><a href="#Behavioural Properties">Behavioural Properties</a></li>
              <li><a href="#Using Proxies">Using Proxies</a></li>
              <li><a href="#Using Multiple Remote Repositories">Using Multiple Remote Repositories</a></li>
            </ol>
          </li>
          <li><a href="#Project Setup">Setup</a>
            <ol>
              <li><a href="#Starting a New Project">Starting a New Project</a></li>
            </ol>
          </li>
          <li><a href="#Building">Building</a>
            <ol>
              <li><a href="#Build Lifecyle">Build Lifecycle</a></li>
              <li><a href="#Storing JARs in CVS">Storing JARs in CVS</a></li>
              <li><a href="#Overriding Stated Dependencies">Overriding Stated Dependencies</a></li>
              <li><a href="#Using SNAPSHOT Dependencies">Using SNAPSHOT Dependencies</a></li>
              <li><a href="#Multi Project Builds and the Reactor">Multi Project Builds and the Reactor</a></li>
              <li><a href="#Building Offline">Building Offline</a></li>
              <li><a href="#Summary of CLI Options">Summary of CLI Options</a></li>
            </ol>
          </li>
          <li><a href="#Testing">Testing</a>
            <br/>
            <ol>
              <li><a href="#Test Resources">Test Resources</a></li>
              <li><a href="#Running a Single Test">Running a Single Test</a></li>
            </ol>
          </li>
          <li><a href="#Packaging">Packaging</a>
            <br/>
            <ol>
              <li><a href="#JAR Resources">JAR Resources</a></li>
            </ol>
          </li>
          <li><a href="#Deploying">Deploying</a>
            <br/>
            <ol>
              <li><a href="#Resolving SNAPSHOT Dependencies">Resolving SNAPSHOT Dependencies</a></li>
              <li><a href="#Copying Dependency JARs">Copying Dependency JARs</a></li>
            </ol>
          </li>
          <li><a href="#Naming Conventions">Naming Conventions</a></li>
          <li><a href="#Remote Repository Layout">Remote Repository Layout</a></li>
          <li><a href="#Local Repository Layout">Local Repository Layout</a></li>
          <li><a href="#Site Generation">Site Generation</a></li>
            <ol>
              <li><a href="#Colors">Colors</a></li>
              <li><a href="#Stylesheets">Stylesheets</a></li>
              <li><a href="#Reports">Reports</a></li>
            </ol>
        </ol>
      </p>
    </section>

    <section name="About this Guide">
      <p>
        The Maven User Guide is intended to help developers get acquainted with Maven
        by providing thorough descriptions and examples. If you have any
        suggestions or comments please feel free to post them to the
        <a href="mailto:users@maven.apache.org">Maven users' list</a>.
      </p>
      <p>
        Thanks for choosing Maven!
      </p>
    </section>

    <section name="Introduction">
      <p>
        Maven was originally started as an attempt to simplify the build
        processes in the Jakarta Turbine project. There were several
        projects each with their own Ant build files that were all slightly
        different and JARs were checked into CVS. We wanted a standard way to
        build the projects, a clear definition of what the project consisted
        of, an easy way to publish project information and a way to share JARs
        across several projects.
      </p>

      <p>
        What resulted is a tool that can now be used for building and managing
        any Java-based project. We hope that we have created something that
        will make the day-to-work work of Java developers easier and generally
        help with the comprehension of any Java-based project.
      </p>

    </section>

    <section name="The Project Object Model">
      <p>
        Maven is based on the concept of a project object model (POM) in that all the
        artifacts produced by Maven are a result of consulting a well defined
        model for your project. Builds, documentation, source metrics,
        source cross-references and anything else that may be provided by a
        Maven plug-in are all controlled by your POM.
      </p>
    </section>

    <section name="POM Processing">
      <p>
        This document outlines how the POM is processing during Maven
        execution. Some simple forms of POM inheritance are shown, and the
        interpolation mechanism is demonstrated.
      </p>

      <subsection name="POM Interpolation">
        <p>
          The POM, in its familiar project.xml form, is now processed as a Jelly
          script. In the majority of cases users won't care that the project.xml
          is really a Jelly script under the covers but it does allow the use
          interpolated values if you wish. I would rather not see logic start
          cropping up in project.xml files but the flexibility is there now that
          the project.xml file is a stealth Jelly script :-) Below is an example
          of what you can do:
        </p>

        <source><![CDATA[
<?xml version="1.0" encoding="ISO-8859-1"?>
<project>

  <pomVersion>3</pomVersion>
  <groupId>maven</groupId>
  <artifactId>maven</artifactId>
  <name>Maven</name>
  <currentVersion>1.0-b5-dev</currentVersion>
  <organization>
    <name>Apache Software Foundation</name>
    <url>http://jakarta.apache.org/</url>
    <logo>/images/jakarta-logo-blue.gif</logo>
  </organization>
  <inceptionYear>2001</inceptionYear>
  <package>org.apache.${pom.artifactId}</package>
  <logo>/images/${pom.artifactId}.jpg</logo>

  <description>Maven is a project that was created in ${pom.inceptionYear}.</description>
  <shortDescription>${pom.name} is a Java Project Management Tool</shortDescription>

</project>]]>
        </source>

      </subsection>

      <subsection name="POM Inheritance">
        <p>
          There is now a simple form of inheritance available for use when using
          the POM in its familiar project.xml form. Below is an example of what
          you can do:
        </p>

<source><![CDATA[
<?xml version="1.0" encoding="ISO-8859-1"?>
  <project>
    <extend>project.xml</extend>
    
    <groupId>super-extendo</groupId>
    <artifactId>super-extendo<artifactId>
    <name>Super Extendo</name>

    <build>
      <unitTest>
        <includes>
          <include>**/*Test*.java</include>
        </includes>
        <excludes>
          <exclude>**/TestAll.java</exclude>
          <exclude>**/*Abstract*.java</exclude>
        </excludes>
      </unitTest>
    </build>
  </project>
]]></source>

        <p>
          Currently the resolution of the parent is fairly dumb and there hasn't been any
          testing beyond a single level of extension. But even this level
          of extension coupled with interpolation can potentially buy you a lot.
          The motivation for this was an attempt at simplifying building for the
          commons.
        </p>

        <p>
          You could define something like this for the master template:
        </p>

        <source><![CDATA[
<project>
  <pomVersion>3</pomVersion>
  <groupId>commons</groupId>
  <artifactId>commons-master</artifactId>
  <name>Commons Master Maven POM</name>

  <organization>
    <name>Apache Software Foundation</name>
    <url>http://www.apache.org</url>
  </organization>

  <gumpRepositoryId>jakarta</gumpRepositoryId>

  <url>http://jakarta.apache.org/commons/${pom.artifactId}.html</url>
  <issueTrackingUrl>http://nagoya.apache.org/</issueTrackingUrl>
  <siteAddress>jakarta.apache.org</siteAddress>
  <siteDirectory>/www/jakarta.apache.org/commons/${pom.artifactId}/</siteDirectory>
  <distributionDirectory>
    /www/jakarta.apache.org/builds/jakarta-commons/${pom.artifactId}/
  </distributionDirectory>

  <repository>
    <connection>
      scm:cvs:pserver:anoncvs@cvs.apache.org:/home/cvspublic:jakarta-commons/${pom.artifactId}
    </connection>
    <url>http://cvs.apache.org/viewcvs/jakarta-commons/${pom.artifactId}/</url>
  </repository>
  ...
</project>
 ]]></source>

        <p>
          And for a child you could have something like this:
        </p>

<source><![CDATA[
<project>
  <groupId>commons-betwixt</groupId>
  <artifactId>commons-betwixt</artifactId>
  <name>Betwixt</name>
  ...
</project>
]]></source>

        <p>
          And what you will get is the child's ${pom.artifactId} value substituted into
          the parent template. So for projects like the commons where you have
          many builds that are basically set up the same way you can use a master
          template and leave very little in the child's project.xml file.
        </p>
        <p>
          This should also make it easier to deal with a single project producing
          multiple JAR artifacts. I plan to test the inheritance out in the
          commons now as the project.xml won't interfere with the standard Ant
          builds.
        </p>
        <p>
          If you're wondering what the DVSL reports will look like using this
          mechanism then you're on the ball! I have changed the DVSL reporting to
          work on the POM itself i.e. the DVSL transformation is performed on a
          Java object. This was necessary in order for reports to come out
          correctly when interpolation and inheritance are involved. You can't use
          the child template listed above and expect it to work. We need to use
          the fully resolved POM. As far as I can tell this is working. The
          process I'm using is probably not the most efficient but it can be
          improved and we'll probably break even because the POM is processed only
          once now (that's the theory anyway, I might missed a few bits) and can
          be used everywhere, or at least that's what I tried to do in this pass.
        </p>
        <p>
          If you don't use inheritance or interpolation then everything should
          work as per usual. The maven site itself is looking ok and the last few
          sites deployed have used what I'm going to commit later tonight.
        </p>
      </subsection>
    </section>

    <section name="Using Plug-ins">
      <p>
        Maven is in essence a small core that works with a satellite of
        plug-ins. All functionality provided by Maven is done so in the form
        of plug-ins.
      </p>
    </section>

    <section name="maven.xml">
      <p>
        The file <code>maven.xml</code> in your project is a 'special' file
        that Maven looks for during processing.
      </p>
      <p>
        This file is the place that you can add extra processing to the Maven
        build, or attach your own code before or after a Maven 'goal', such as
        <code>jar</code> or <code>test</code> is executed.
      </p>
      <p>
        Maven uses <a href="http://jakarta.apache.org/commons/sandbox/jelly">Jelly</a>
        as it's scripting language, and any valid jelly tags can be placed in
        the maven.xml.
      </p>
      <p>
        The <code>goal</code> functionality Maven uses is provided by the
        <code>werkz</code> tag library that is built into werkz. For more information, see this 
        <a href="http://wiki.codehaus.org/maven/WerkzTagDocumentation">wiki page</a>.
      </p>
      <subsection name="Sample maven.xml">
        <p>
          <strong>Note</strong> the sample file below is expected to fail, as
          Maven doesn't define a 'compile' goal by default.
        </p>
        <p>
          Here's the sample maven.xml
        </p>
<source><![CDATA[
<project
  default="nightly-build"
  xmlns:j="jelly:core"
  xmlns:u="jelly:util">

  <goal name="nightly-build">
    <!-- Any ant task, or jelly tags can go here thanks to jeez -->
    <j:set var="goals" value="compile,test" />
    <mkdir dir="${maven.build.dir}" />
    <u:tokenize var="goals" delim=",">${goals}</u:tokenize>
    <j:forEach items="${goals}" var="goal" indexVar="goalNumber">
      Now attaining goal number ${goalNumber}, which is ${goal}
      <attainGoal name="${goal}" />
    </j:forEach>
  </goal>

</project>
]]></source>
        <p>
          You'll notice that there are a few items here and we'll explain
          them in order of appearance.
        </p>
      </subsection>
      <subsection name="The project element">
        <p>
          The project element, &amp;lt;project&amp;gt;, is the root element for
          any <code>maven.xml</code> file.
        </p>
        <p>
          The project element specifies a <code>default</code> attribute,
          default="nightly-build", that tells Maven to attain the
          <code>nightly-build</code> goal if the user simply executes
          <code>maven</code> with no arguments
        </p>
        <p>
          The default attribute is followed by several XML namespace declarations,
          e.g.
          <ol>
            <li>
              <code>xmlns:j="jelly:core"</code>
              <p>
                This tells Jelly that all XML elements prefixed with <code>j:</code>
                are part of the predefined tag library registered with jelly
                under the identifier <code>core</code>
              </p>
            </li>
            <li>
              <code>xmlns:u="jelly:util"</code>
              <p>
                This tells Jelly that all XML elements prefixed with <code>u:</code>
                are part of the predefined tag library registered with jelly
                under the identifier <code>util</code>.
              </p>
            </li>
          </ol>
        </p>
        <p>
          Any Jelly tag library you want to use in your <code>maven.xml</code>
          <strong>must</strong> be declared in the project element and given
          a namespace prefix
        </p>
        <p>
          Maven pre-registers the <code>jeez</code> tag library with an empty prefix.
          This tag library groups the <code>ant</code> and <code>werkz</code> tag
          libraries into one namespace. This allows Maven scripts to use any werkz
          or ant tag with no XML namespace, and makes migrating from ant a simple
          process.
        </p>
      </subsection>
      <subsection name="Goals">
        <p>
          A goal is a
          <a href="http://jakarta.apache.org/commons/jelly/tags.html#jelly:werkz">werkz tag</a>
          similar in nature to an Ant <code>target</code>; it's a named container for
          a set of tags to be executed.
        </p>
        <p>
          Since the <code>jeez</code> tag library is pre-registered by maven, a goal
          may include any valid <code>Ant</code> tag in it's body.
        </p>
        <p>
          To execute a goal defined in your <code>maven.xml</code>, you simply provide
          the goal name to Maven from the command prompt. To execute the
          <code>nightly-build</code> defined in our sample, you would use:
          <source>maven nightly-build</source>
        </p>
        <p>
          Maven plugins prefix the goals they define with the plugin name, so that
          they wont clash with your goals, e.g. <code>jar:jar</code> is the
          goal defined by the <code>jar</code> plugin to create a jar file
          from your project
        </p>
      </subsection>
      <subsection name="Jelly coding">
        <p>
          Inside of each goal, there are Jelly tags that you provide
          to perform functionality. Let's look at the code from our sample
        </p>
        <h5>set</h5>
        <source><![CDATA[<j:set var="goals" value="compile,test" />]]></source>
        <p>
          This line is a jelly core tag, as it is using the <code>j:</code>
          prefix defined in the project element, called <code>set</code>.
        </p>
        <p>
          The <code>set</code> tag sets the jelly variable named by the
          <code>var</code> attribute to the value given by the <code>value</code>
          attribute. Unlike Ant properties, Jelly variables can be changed once
          they have been given a value.
        </p>
        <h5>mkdir</h5>
        <source><![CDATA[<mkdir dir="${maven.build.dir}" />]]></source>
        <p>
          This executes the Ant task <code>mkdir</code>, which simply creates a directory.
          The directory is specified using a variable, <code>${maven.build.dir}</code>
        </p>
        <h5>tokenize</h5>
        <source><![CDATA[<u:tokenize var="goals" delim=",">${goals}</u:tokenize>]]></source>
        <p>
          This executes the Jelly <code>tokenize</code> tag. The tag is found in the
          Jelly predefined <code>util</code> tag library as per the <code>u:</code>
          prefix defined on the project element.
        </p>
        <p>
          The tokenize tag will tokenize the contents of it's body into a list for
          later processing.
            <ul>
              <li>
                The <code>var</code> attribute is the variable that will
                be assigned the new list.
              </li>
              <li>
                The <code>delim</code> attribute is the delimiter used to separate
                items in the string
              </li>
              <li>
                The body of the <code>tokenize</code> tag in this case is a variable,
                <code>goals</code>, set a couple of lines previously, which contains
                compile and test separated by commas
              </li>
            </ul>
        </p>
        <h5>forEach</h5>
<source><![CDATA[
<j:forEach items="${goals}" var="goal" indexVar="goalNumber">
  Now attaining goal number ${goalNumber}, which is ${goal}
  <attainGoal name="${goal}" />
</j:forEach>]]></source>
        <p>
          The forEach tag provides a simple loop facility. It executes it's body
          each time through the loop.
          <ul>
            <li>
              The <code>items</code> attribute is an expression that is evaluated to get the
              the collection to be iterated through
            </li>
            <li>
              The <code>var</code> attribute specifies the variable to place
              each item in, as the collection is processed. The variable is available
              to the <code>forEach</code> body.
            </li>
            <li>
              The <code>indexVar</code> attribute specifies the variable to place
              a counter of the number of elements (zero-based) processed
            </li>
          </ul>
        </p>
        <p>
          The body of the <code>forEach</code> tag outputs some text about the goal
          and the number being processed and attempts to attain that goal using the
          <code>attainGoal</code> werkz tag.
        </p>
      </subsection>
    </section>

    <section name="Maven Setup">

      <subsection name="Properties Processing">
        <p>
          The properties files in Maven are processed in the following order:
        </p>

        <p>
          <ul>
            <li>${project.home}/project.properties</li>
            <li>${project.home}/build.properties</li>
            <li>${user.home}/build.properties</li>
          </ul>
        </p>

        <p>
          Where the last definition wins. So, Maven moves through this sequence
          of properties files overridding any previously defined properties with
          newer definitions. In this sequence your <code>${user.home}/build.properties</code>
          has the final say in the list of properties files processed. We will call the
          list of properties files that Maven processes the standard properties file set.
        </p>

        <p>
          In addition, System properties are processed after the above chain of
          properties files are processed. So, a property specified on the CLI
          using the <code>-Dproperty=value</code> convention will override any
          previous definition of that property.
        </p>

      </subsection>

      <subsection name="Plug-in Properties">
        <p>
          Plug-ins are loaded after the above sequence of properties files
          are processed but the <code>PluginManager</code> is instructed not
          to override values that have been previously set. This works in
          the opposite way of Maven's normal properties processing because
          the Plug-ins can only be processed after the rest of Maven's internals
          are initialized but we want it to appear like:
        </p>

        <p>
          <ul>
            <li>Plug-in default properties are processed</li>
            <li>${project.home}/project.properties are processed</li>
            <li>${project.home}/build.properties are processed</li>
            <li>${user.home}/build.properties are processed</li>
          </ul>
       </p>

       <p>
         So even though Plug-ins are processed later in the initialization
         cycle you can override a plug-in's default properties as you can with
         any other property. For example, the Checkstyle plug-in defines the
         following default property:
       </p>

<source><![CDATA[
maven.checkstyle.format = sun
]]></source>

       <p>
         Which, as you might guess, tells the Checkstyle plug-in to use
         Sun's coding conventions as the default format. But you can override
         this value in any of the files in standard properties fileset. So if
         in your <code>${project.home}/project.properties</code> you place the
         following value:
       </p>

<source><![CDATA[
maven.checkstyle.format = turbine
]]></source>

       <p>
         Then the Checkstyle plug-in will use Turbine's coding conventions.
       </p>

      </subsection>

      <subsection name="Behavioural Properties">
        <p>
          The following is a list of properties that change the way Maven works.
        </p>

        <p>
          <table>
            <tr>
              <th>Property</th>
              <th>Description</th>
              <th>Default Value</th>
            </tr>

            <tr>
              <td>maven.build.dest</td>
              <td>
                The directory where generated classes go.
              </td>
              <td>${maven.build.dir}/classes</td>
            </tr>

            <tr>
              <td>maven.build.dir</td>
              <td>
                The directory where generated output, e.g. class files, documentation,
                unit test reports etc goes
                <p>
                  <strong>CAUTION:</strong>
                  Changing default maven.build.dir value in your ${user.home}/build.properties
                  might allow one some control of individual project directory layouts.
                  However this practice will interfere with the bootstrap of Maven from source
                  code, as it expects the jar created to be in <code>${basedir}/target/</code>
                </p>
              </td>
              <td>${basedir}/target</td>
            </tr>

            <tr>
              <td>maven.build.src</td>
              <td>
                The directory where generated source goes.
              </td>
              <td>${maven.build.dir}/src</td>
            </tr>

            <tr>
              <td>maven.conf.dir</td>
              <td>
                The directory that holds configuration files
              </td>
              <td>${basedir}/conf</td>
            </tr>

            <tr>
              <td>maven.docs.dest</td>
              <td>
                The output directory for the generated html from reports.
              </td>
              <td>${maven.build.dir}/docs</td>
            </tr>

            <tr>
              <td>maven.docs.omitXmlDeclaration</td>
              <td>
                Whether generated documentation should have an xml declaration, e.g.
                <source>&lt;?xml version="1.0"?&gt;</source>
              </td>
              <td>false</td>
            </tr>

            <tr>
              <td>maven.docs.outputencoding</td>
              <td>
                The character encoding for generated documentation
              </td>
              <td>ISO-8859-1</td>
            </tr>

            <tr>
              <td>maven.docs.src</td>
              <td>
                The directory for user supplied documentation.
              </td>
              <td>${basedir}/xdocs</td>
            </tr>

            <tr>
              <td>maven.gen.docs</td>
              <td>
                The directory where generated xdocs that need to be transformed to html
                are placed.
              </td>
              <td>${maven.build.dir}/generated-xdocs</td>
            </tr>

            <tr>
              <td>maven.home.local</td>
              <td>
                The directory on the local machine maven uses to write user specific details
                to such as expanded plugins and cache data.
              </td>
              <td>${user.home}/.maven</td>
            </tr>

            <tr>
              <td>maven.jar.&lt;id&gt;</td>
              <td>
                Specifies the jar override path for the specified artifact id.  The path is
                relative to the current directory.
              </td>
            </tr>

            <tr>
              <td>maven.mode.online</td>
              <td>
                Whether you are connected to the internet or not.
              </td>
              <td>true</td>
            </tr>

            <tr>
              <td>maven.plugin.dir</td>
              <td>
                Where maven can find it's plugins
              </td>
              <td>${maven.home}/plugins</td>
            </tr>

            <tr>
              <td>maven.plugin.unpacked.dir</td>
              <td>
                Where maven expands installed plugins for processing.
              </td>
              <td>${maven.home.local}/plugins</td>
            </tr>

            <tr>
              <td>maven.repo.central</td>
              <td>
                This is the host that Maven will attempt to
                deploy the distribution to during a
                dist:deploy.
              </td>
              <td>login.ibiblio.org</td>
            </tr>

            <tr>
              <td>maven.repo.central.directory</td>   
              <td>
                This is the directory that Maven will copy the
                distribution to during a dist:deploy.
              </td>
              <td>/public/html/maven</td>
            </tr>

            <tr>
              <td>maven.repo.local</td>
              <td>
                The repository on the local machine maven should use to store
                downloaded artifacts (jars etc).
              </td>
              <td>${maven.home.local}/repository</td>
            </tr>

            <tr>
              <td>maven.repo.remote</td>
              <td>
                The repository maven should use to download artifacts
                (jars etc) that it can't find in the local repository
              </td>
              <td>http://www.ibiblio.org/maven</td>
            </tr>

            <tr>
              <td>maven.repo.remote.enabled</td>
              <td>
                Whether or not a remote repository should be used.
              </td>
              <td>true</td>
            </tr>

            <tr>
              <td>maven.scp.executable</td>
              <td>
                The executable to use for secure copies
              </td>
              <td>scp</td>
            </tr>

            <tr>
              <td>maven.src.dir</td>
              <td>
                The base directory for source code.
              </td>
              <td>${basedir}/src</td>
            </tr>

            <tr>
              <td>maven.ssh.executable</td>
              <td>
                The executable to use for executing commands remotely
              </td>
              <td>ssh</td>
            </tr>

          </table>
        </p>

      </subsection>

      <subsection name="Using Proxies">
        <p>
          If you only have access via a proxy then Maven obeys the following
          properties.
        </p>

        <table>
          <tr>
            <th>Proxy Properties</th>
            <th>Description</th>
          </tr>
          <tr>
            <td>maven.proxy.host</td>
            <td>
              The IP or address of your proxy.
            </td>
          </tr>
          <tr>
            <td>maven.proxy.port</td>
            <td>
              The port number of your proxy.
            </td>
          </tr>
          <tr>
            <td>maven.proxy.username</td>
            <td>
              User name if your proxy requires authentication.
            </td>
          </tr>
          <tr>
            <td>maven.proxy.password</td>
            <td>
              Password if your proxy requires authentication.
            </td>
          </tr>
        </table>

        <p>
          If you do require a proxy, the most appropriate place to set these
          values would be in your <code>${user.home}/build.properties</code>
          file.
        </p>

<source><![CDATA[
## ----------------------------------------------------------
## ${user.home}/build.properties
## ----------------------------------------------------------
.
.
maven.proxy.host = my.proxyserver.com
maven.proxy.port = 8080
maven.proxy.username = username
maven.proxy.password = password
.
.
]]></source>

      </subsection>

      <subsection name="Using Multiple Remote Repositories">
        <p>
          You can specify the use of multiple remote repositories in any of
          the properties files processed by Maven by using something like
          the following:
        </p>

<source><![CDATA[
maven.repo.remote = http://www.ibiblio.org/maven/,http://www.mycompany.com/maven/
]]></source>

      </subsection>

    </section>

    <section name="Project Setup">
        <subsection name="Starting a New Project">
          <p>
            If you using Maven for the first time or starting a new project you
            can use the GenApp plugin to automate the creation of a Maven
            project tree.
          </p>
<source><![CDATA[
maven -Dpackage=com.mycompany.app genapp
]]></source>

          <p>
            When you execute this command you will see something like the
            following:
          </p>
<source><![CDATA[
 __  __
|  \/  |__ Jakarta _ ___
| |\/| / _ \ V / -_) ' \  ~ intelligent projects ~
|_|  |_\__,_|\_/\___|_||_|   v. 1.0


    [mkdir] Created dir: <target-directory>/genapp/src/java/com/mycompany/app
    [copy] Copying 1 file to <target-directory>/genapp/src/java/com/mycompany/app
    [mkdir] Created dir: <target-directory>/genapp/src/test/com/mycompany/app
    [copy] Copying 3 files to <target-directory>/genapp/src/test/com/mycompany/app
    [copy] Copying 2 files to <target-directory>/genapp
    [copy] Copying 1 file to <target-directory>/genapp/src/conf
    BUILD SUCCESSFUL
    Total time:  3 seconds
]]></source>

          <p>
            When the command finishes executing you should have a complete
            project tree that looks something like the following:
          </p>
<source><![CDATA[
.
|-- project.properties
|-- project.xml
`-- src
    |-- conf
    |   `-- app.properties
    |-- java
    |   `-- com
    |       `-- mycompany
    |           `-- app
    |               `-- App.java
    `-- test
        `-- com
            `-- mycompany
                `-- app
                    |-- AbstractTestCase.java
                    |-- AppTest.java
                    `-- NaughtyTest.java

]]></source>
        </subsection>

    </section>

    <section name="Building">
      <p>
        Maven works using the notion of a central repository. All artifacts
        required for building are drawn from the central repository. Currently
        our central repository is housed
        <a href="http://www.ibiblio.org/maven">here</a> at
        <a href="http://www.ibiblio.org">Ibiblio</a>. In a typical Maven project,
        the JARs required to build a are pulled from the central
        repository. Maven will only retrieve dependencies which are not
        satisfied. If you are using Maven to build several projects it is
        likely that those projects share a few dependencies: Maven will let
        you share one JAR file between any number of projects that require
        that JAR to build. No multiple copies of the same JAR on your
        system!
      </p>

      <subsection name="Build Lifecycle">
        <p>
        </p>
      </subsection>

      <subsection name="Storing JARs in CVS">
        <p>
          It is not recommended that you store your JARs in CVS. Maven tries to
          promote the notion of a user local repository where JARs, or any
          project artifacts, can be stored and used for any number of builds.
          Many projects have dependencies such as XML parsers and standard utilities that
          are often replicated in typical Ant builds. With Maven these standard utilities
          can be stored in your local repository and shared by any number of builds.
        </p>
      </subsection>


      <subsection name="Overriding Stated Dependencies">
        <p>
          You may find it convenient, or necessary, at times to override the
          dependencies stated in a given POM. You may wish to use JAR artifacts
          somewhere in the filesystem or you may wish simply to override the stated
          version of a given JAR artifact. For this Maven provides the a
          an easy way for you to select which artifacts you want to use for
          building. It is highly recommended that you set up your own local
          repository: but in cases where expediency is a concern, or you are
          migrating from an Ant build the JAR override feature may come
          in handy.
        </p>

        <p>
          In order to use the JAR override feature, you must set the
          <code>maven.jar.override</code> property on. Once this property is
          set you can specify JAR override directives in any of the properties
          files that maven processes.
        </p>

        <p>
          There are two type of JAR override directives. The first form allows
          you to specify a specific JAR artifact path for a given artifactId; the
          second allows you to specify a specific version of a JAR artfact that
          exists in your local repository. The two forms are as follows:
        </p>

<source><![CDATA[

maven.jar.artifactId = [path]

maven.jar.artifactId = [version]

]]></source>

        <p>
          Below is an example of what a properties file might look like that
          contains JAR override directives:
        </p>

<source><![CDATA[
# ------------------------------------------------------------------------
# M A V E N  J A R  O V E R R I D E
# ------------------------------------------------------------------------
maven.jar.override = on

# ------------------------------------------------------------------------
# Jars set explicity by path.
# ------------------------------------------------------------------------
maven.jar.a = ${basedir}/lib/a.jar
maven.jar.b = ${basedir}/lib/b.jar

# ------------------------------------------------------------------------
# Jars set explicity by version.
# ------------------------------------------------------------------------
maven.jar.classworlds = 1.0-beta-1
]]></source>
      </subsection>

      <subsection name="Using SNAPSHOT Dependencies">
        <p>
          In Maven SNAPSHOTs are artifacts aproximate the latest build of a particular
          project. If a project that you depend on is changing frequently you can state
          in your POM that you wish to try and keep up with that project by declaring
          it a SNAPSHOT dependency. So, for example, you may be trying to stay abreast
          of changes in <a href="http://jakarta.apache.org/commons/jelly/">Jelly</a> so
          you might put the following in your POM:
        </p>
<source><![CDATA[
<project>
  ...
  <dependencies>

   <dependency>
     <groupId>commons-jelly</groupId>
     <artifactId>commons-jelly</groupId>
     <version>SNAPSHOT</version>
   </dependency>

  </dependencies>
 ...
</project>
]]></source>

        <p>
          This tells Maven that you are always looking to use the latest build of
          Jelly that is available in the Maven repository. Internally to Maven
          SNAPSHOT dependencies are always considered failed dependencies. That
          being the case Maven will always try to retrieve a copy of SNAPSHOT
          dependency from the Maven repository. If you are working offline Maven
          will warn you that your SNAPSHOT dependencies may be out of date.
        </p>

      </subsection>

      <subsection name="Multi Project Builds and the Reactor">
        <p>
          With Maven the Reactor is the tool that is used to control multi
          project builds. The Reactor uses the Werkz package to
          determine the correct build order from the dependencies stated
          by each project in their respective POMs. The Reactor was created to
          encourage the creation, or refactoring, of projects into smaller,
          discrete, more coherent units. The Reactor is ideal for Component
          Oriented Programming (COP) where the overall system is comprised
          of many discrete entities that need to be aggregated to form a whole
          for deployment.
        </p>

        <p>
          The Reactor can execute an arbitrary list of goals for any set of
          specified projects. So while the Reactor was created for building, it can be
          used for things like site generation, or any sort of artifact generation.
        </p>

        <p>
          Currently the <a href="http://db.apache.org/">db.apache.org</a> site is
          generated by collecting project information from all its subprojects
          and injecting the harvested information into a set of
          <a href="http://jakarta.apache.org/velocity/">Velocity</a> templates
          which are processed by the <a href="http://jakarta.apache.org/commons/jelly/">Jelly</a>
          Velocity Tag Library. You can browse the mechanism used
          <a href="http://cvs.apache.org/viewcvs.cgi/db-site/">here</a>.
        </p>

        <p>
          In Plexus, an Avalon-based container, the component manifest which tracks all
          Plexus components is generated by walking over all of the components, harvesting
          the information and aggregating it into a single manifest. Again we use Velocity
          templates and the Jelly Velocity Tag Library. You can browse the mechanism used
          <a href="http://cvs.werken.com/viewcvs.cgi/plexus-components/?cvsroot=plexus">here</a>.
        </p>

        <p>
          Here is an example of how you might use the Reactor Tag to process a
          set of components where the site is generated

        </p>
  <source><![CDATA[
  <goal
    name="project-site"
    description="Generate the site for the entire project">

    <!-- Generate the site for each of the components. -->

    <maven:reactor
      basedir="${basedir}/components"
      postProcessing="true"
      includes="*/project.xml"
      excludes="bad-component/*"
      goals="site"
      banner="Generating Site"
      ignoreFailures="true"/>

    <!--
     |
     | At this point because 'postProcessing' was turned on we have all
     | the processed POMs available to us in the ${reactorProjects} variable.
     |
     -->

    <j:forEach var="reactorProject" items="${reactorProjects}">

      ... Do whatever you want with the harvested information ...

    </j:forEach>
  </goal>
  ]]></source>

        <p>
          If you have to generate documentation for N projects with an overall
          front-end do look at the <a href="http://db.apache.org/">db.apache.org</a>
          site as the navigation, mailing lists, committer lists and source repository
          lists are all harvested from sub-projects to produce the overall site. This
          means that the redundant, error prone process of moving sub-project specific
          information to the overall site is removed. Sub-projects at db.apache.org
          take care of their own information and it finds its way to the top-level
          site automatically.
        </p>

      </subsection>

      <subsection name="Building Offline">
        <p>
          If you find you need to build your projects offline you can either
          use the offline switch on the CLI:
        </p>
        <source><![CDATA[
maven -o jar:jar
        ]]></source>
        <p>
          which is equivalent to 
        </p>
        <source><![CDATA[
maven -Dmaven.mode.online=false jar:jar
        ]]></source>
        <p>
          Or you can set <code>maven.mode.online</code> to
          <code>false</code> in a <a href="#Properties Processing">property file</a>.
        </p>
        <p>
          In online mode, maven always downloads SNAPSHOT dependencies, see
          <a href="#Using SNAPSHOT Dependencies">Using SNAPSHOT Dependencies</a>.
          If the snapshots in your local repository are younger than the ones
          on the server, you propably don't want that maven overwrites you local
          snapshot jars.
          To avoid downloading, set property  
        </p>
        <source><![CDATA[
maven.repo.remote.enabled=false
        ]]></source>
        <p>
          In maven beta 9, this property does not work (but it's fixed in newer releases).
          Clearing the property <code>maven.repo.remote</code> by setting 
        </p>
        <source><![CDATA[
maven.repo.remote.enabled=
        ]]></source>
        <p>
          via CLI or property file has the same effect.  
        </p>
        <p>
          Using <code>maven.repo.remote.enabled=false</code> and
          <code>maven.mode.online=true</code> is the combination to use if one needs a working
          "-link" option for the javadoc plugin plus no download of snapshot/any jars.
        </p>
        
      </subsection>

      <subsection name="Summary of CLI Options">
        <p>
          If you are using the commandline (CLI) to build, here is a quick summary of the
          options available:
        </p>

<source><![CDATA[
Options:
 -D,--define arg   Define a system property
 -E,--emacs        Produce logging information without adornments
 -X,--debug        Produce execution debug output
 -b,--nobanner     Suppress logo banner
 -d,--dir arg      Set effective working directory
 -e,--exception    Produce exception stack traces
 -f,--find arg     Set project file and effective working directory by 
                   finding the project file
 -g,--goals        Display available goals
 -h,--help         Display help information
 -i,--info         Display system information
 -o,--offline      Build is happening offline
 -p,--pom arg      Set project file
 -v,--version      Display version information
]]></source>

      </subsection>

    </section>

    <section name="Testing">

      <!-- Change this section into a demonstratino of the resources element in general -->

      <subsection name="Test Resources">
        <p>
          It is a fairly common occurrence that you want to include some resources in your
          test classpath for testing purposes. Maven allows you include any arbitrary set of
          resources for testing by utilizing the project/build/unitTest/resources element in your POMs.
        </p>

        <p>
          The following example demonstrates how to recursively include all files with an 'xml'
          or 'properties' extension within the ${basedir}/src/test directory:
        </p>

<source><![CDATA[
<project>
  ...
  <build>
    ...
    <unitTest>
      ...
      <resources>
        <resource>
          <directory>${basedir}/src/test</directory>
          <includes>
            <include>**/*.xml</include>
            <include>**/*.properties</include>
          </includes>
        </resource>
      </resources>
    </unitTest>
  </build>
</project>
]]></source>

        <p>
          The following example demonstrates how to recursively include all files with an 'xml'
          or 'properties' extension within the ${basedir}/src/test directory and exclude the
          naughty.properties file. Note the addition of the project/build/unitTest/resources/excludes
          element:
        </p>

<source><![CDATA[
  <project>
    ...
    <build>
      ...
      <unitTest>
        ...
        <resources>
          <resource>
            <directory>${basedir}/src/test</directory>
            <includes>
              <include>**/*.xml</include>
              <include>**/*.properties</include>
            </includes>
            <excludes>
              <exclude>naughty.properties</exclude>
            </excludes>
          </resource>
        </resources>
      </unitTest>
    </build>
  </project>
]]></source>

      </subsection>

      <subsection name="Running a Single Test">
        <p>
          To run a single test use something like the following:
        </p>
<source><![CDATA[
maven -Dtestcase=org.foo.bar.MyTest test:single-test
]]></source>

      </subsection>
    </section>

    <section name="Packaging">

      <subsection name="JAR Resources">

        <p>

        </p>

<source><![CDATA[
<project>
  ...
  <build>
    <resources>
      <!-- A -->
      <resource>
        <directory>${basedir}/src/conf</directory>
        <includes>
          <include>*.xml</include>
          <include>*.properties</include>
        </includes>
      </resource>
      <!-- B -->
      <resource>
        <directory>${basedir}/src/messages</directory>
        <targetPath>org/apache/maven/messages</targetPath>
        <includes>
          <include>messages*.properties</include>
        </includes>
      </resource>
    </resources>
  </build>
</project>
]]></source>
      </subsection>

    </section>

    <section name="Deploying">
      <p>
      </p>

      <subsection name="Resolving SNAPSHOT Dependencies">
        <p>
          It is convenient to use SNAPSHOT dependencies while developing but when you
          deploy you need to resolve all your SNAPSHOT dependencies so that your
          releases consist of all immutable artifacts. If you release a project with
          SNAPSHOT dependencies and some of the SNAPSHOTs change after your release
          you could wind up very quickly with a release that doesn't work.
        </p>

        <p>
          When SNAPSHOTs are deployed in Maven a timestamped version for the
          artifact being deployed is created. So Maven would know that foo-SNAPSHOT.jar
          actually refers to foo-20030101.010101.jar in the Maven Repository. When it
          comes time to deploy you can ask Maven to convert your SNAPSHOT versions
          into timestamped versions using the following command:
        </p>

<source><![CDATA[
maven convert-snapshots
]]></source>

        <p>
          You will be presented with an interactive console where you can choose which
          SNAPSHOT dependencies you want to resolve. When this process is complete Maven
          will write out your POM with your modified dependency entries.
        </p>

        <p>
          If you wish Maven just to simply do its best at resolving SNAPSHOT dependencies
          you can use the following command:
        </p>

<source><![CDATA[
maven convert-snapshots-auto
]]></source>

      </subsection>

      <subsection name="Copying Dependency JARs">
        <p>
          The easiest way to copy your project' dependency JARs is to
          use something like the following sample <code>maven.xml</code> file as a
          guide:
        </p>

<source><![CDATA[
<project
  xmlns:deploy="deploy">

  <goal name="deploy-my-project">
    ...
    <deploy:copy-deps todir="/path"/>
    ...
  </goal>

</project>
]]></source>

        <p>
          Using the <code>deploy:copy-deps</code> tag you can easily place your
          project's dependency JARs where you wish. If you wish to exclude
          certain dependency JARs you can provide a list of dependency ids and
          each dependency listed will be excluded from the copy:
        </p>

<source><![CDATA[
<project
  xmlns:deploy="deploy">

  <goal name="deploy-my-project">
    ...
    <deploy:copy-deps todir="/path" excludes="servletapi,commons-util"/>
    ...
  </goal>
</project>
]]></source>
      </subsection>

    </section>

    <section name="Naming Conventions">
      <p>
        This section outlines the naming conventions used in the Maven
        project object model (POM). This document is an attempt to try and
        unify the many various ways projects name the artifacts that they
        publish for general consumption by the Java developer community.
      </p>
    </section>

    <section name="Rules and Guidelines">

      <subsection name="Projects">
        <p>
          A project must have a unique identifier that is comprised of
          lowercase letters [a-z] where hyphens can be used. The unique id
          must also start with a lowercase letter [a-z]:
        </p>

<source><![CDATA[
<project>
  <groupId>bar</groupId>
  <artifactId>foo</artifactId>
  ...
</project>
]]></source>

        <p>
          All references from one project to another are to be made in terms of the
          unique group id and artifact id. At the moment the only place in the POM where
          this is relevant is the declaration of project dependencies which is
          discussed below.
        </p>

        <p>
          A project should have a human readable name that can be used in
          documentation.
        </p>

<source><![CDATA[
<project>
  <groupId>bar</groupId>
  <artifactId>foo</artifactId>
  <name>The Grand Master Foo</name>
  ...
</project>
]]></source>

        <p>
          A project should have a group identifier. This group identifier
          is the basis for the name
        </p>

<source><![CDATA[
<project>
  <groupId>bar</groupId>
  <artifactId>foo</artifactId>
  <name>The Grand Master Foo</name>
  ...
</project>
]]></source>

        <p>
          All artifacts published by a project should be based on the
          project's unique identifier and placed in a directory based
          on the project's group identifier. So for the above entry, assuming
          an artifact type of <code>jar</code>, we might have something
          that looks like the following:
        </p>

<source><![CDATA[
repository
 |
 +-- bar
     |-- distribution
     `-- jar
         |-- foo-1.0.jar
         `-- foo-2.0.jar
]]></source>

      </subsection>

      <subsection name="Dependencies">
        <p>
          An example of an ideal, the hopefully typical, dependency declaration looks like the
          following:
        </p>

<source><![CDATA[
<project>
  <groupId>yourProject</groupId>
  <artifactId>yourArtifact</artifactId>
  <name>Your Groovey Machine</name>
  ...

  <dependencies>

   <dependency>
     <groupId>bar</groupId>
     <artifactId>foo</artifactId>
     <version>1.0</version>
   </dependency>

 </dependencies>

</project>
]]></source>

        <p>
          So, the project <code>bar</code> which depends on version
          <code>1.0</code> of the artifact with an id of <code>foo</code>
          which belongs to the group with an id of <code>org.foo.bar</code>.
          This dependency resolves to a JAR file that is stored in the local repository.
          The above entry assumes that the published artifact name is based
          on the artifactId. So for the above dependency entry Maven will
          assume a JAR name of <code>foo-1.0.jar</code>.
        </p>

        <p>
          As user's have noticed, this ideal situation doesn't work in all
          cases for all projects. There are several situations that have to
          be accounted for which require modifications of the ideal dependency
          declaration:
        </p>

        <p>
          <ul>
            <li>
              The project id is not used as the base name of the published
              JAR e.g. the Xerces products where xercesImpl is the base name
              of the published JAR. It neither matches the gump id or the
              maven id.
            </li>
            <li>
              The published JAR name has no version declaration e.g. many of
              the commons components do not declare a version as part of
              published JAR names.
            </li>
            <li>
              The project id is not used as the base name of the published JAR and
              the published JAR name has no version declaration e.g. the worst
              case scenerio which is the Java Activation Framework JAR which
              doesn't even vaguely follow other Sun naming conventions and there is no
              version declaration in the published JAR name. There isn't
              even any version information in the manifest.
            </li>
          </ul>
        </p>

        <p>
          In most cases, any of these limitations can be overcome using the
          optional &amp;lt;jar&amp;gt; element or the JAR can be renamed. To date many
          of the Jakarta products have been renamed in the repository as it
          is likely in the near future that most Jakarta projects will choose
          to use Maven to build. But there isn't a firm policy about what to
          do in all cases which needs to be resolved.
        </p>

      </subsection>

      <subsection name="Projects with multiple artifacts">
        <p>
          Maven's dependency mechanism completely supports multiple project
          artifacts of any given type.
        </p>

        <p>
          So here is what the entries look like for the ant 1.4.1 primary JAR and
          the optional JAR plus a bonus hypothetical:
        </p>

<source><![CDATA[

<dependencies>

  <!-- A -->
  <dependency>
    <groupId>ant</groupId>
    <artifactId>ant</artifactId>
    <version>1.4.1</version>
  </dependency>

  <!-- B -->
  <dependency>
    <groupId>ant</groupId>
    <artifactId>ant-optional</artifactId>
    <version>1.4.1</version>
  </dependency>

  <!-- C -->
  <dependency>
    <groupId>ant</groupId>
    <artifactId>poorly-named</artifactId>
    <version>1.4.1</version>
  </dependency>

</dependencies>
]]></source>

        <p>
          So A), B) and C) are actually pointers to single artifacts in a group.
          So a single dependency is a reference to a single artifact in a group.
          Currently the type of an artifact defaults to a JAR if not specified. But a
          dependency might be a WAR file or a distribution. We tried to provide flexibility while
          providing a default for the type most used: The case where the artifact is a JAR required
          for building a project.
        </p>

      </subsection>
    </section>

    <section name="Remote Repository Layout">
      <p>
        This document outlines the layout of Maven's remote repositories.
        Currently, the primary repository is house at
        <a href="http://www.ibiblio.org/maven/">here</a> at Ibiblio, but you
        may create an use your own remote repositories provided they adhere
        to the structure outlined in this document.
      </p>

      <p>
        Every separate project has its own directory in the repository where
        artifacts for that project can be stored. Each project has a unique
        project id and directory where a project stores its artifacts is named
        after the project id.
      </p>

      <p>
        Within a project's directory various types of artifacts may be stored.
        Currently, the two most common types are JARs and distributions.
        Below is a little snapshot of what the remote repository looks like:
      </p>

<source><![CDATA[
repository
 |
 |-- ant
 |   |-- distribution
 |   `-- jars
 |       |-- ant-1.4.1.jar
 |       `-- ant-optional-1.4.1.jar
 +-- jsse
 |-- distribution
 `-- jars
     |-- jsse.jar
     |-- jcert.jar
     `-- jnet.jar
]]></source>

    </section>

    <section name="Local Repository Layout">
      <p>
        There is a very minimally implemented set of interfaces that allow the
        structuring of the local repository in an arbitrary fashion. This has
        barely been fleshed and I am only using one class in the package
        directly at the moment. I still think the local and remote repositories
        should be structured the same, but in an attempt to make users happy I
        started a set of interfaces that will allow someone to layout their
        local side anyway they like and still interface with the remote repos in
        a consistent way. Though currently it is still required to have your
        local repository structured in the same way as the remote repository.
        I'm hoping that more user feedback will drive the completion of the
        interfaces or allow them to be dropped all together.
      </p>
    </section>

  <section name="Site Generation">
    <p>
      Maven can be used to generate an entire web site for your
      project.  This web site will contain various reports generated
      by the numerous plugins included in Maven such as javadocs,
      metrics, unit test results, changelogs, and many more.  The rest
      of this section talks about the various site customization
      options available in Maven.
    </p>
    <subsection name="Colors">
      <p>
        By default, all Maven-generated sites use the same look and
        feel for consistency.  This enables users to easily recognize
        a Maven-generated site and immediately feel comfortable
        searching for information on the site.  Of course, the Maven
        development team understands that users might want to
        customize their own sites.  The easiest method to alter the
        appearance of the Maven-generated site is to specify your own
        color scheme to use.  This is as simple as setting the
        appropriate properties in your project's
        <code>project.properties</code> file.  All of the available
        properties are described in the <a
          href="plugins/xdoc/properties.html">xdoc plugin</a>.
      </p>
    </subsection>
    <subsection name="Stylesheets">
      <p>
        If you feel that colors are simply not enough to distinguish
        your site, you can specify your own stylesheet that will be
        used.  To override the Maven-supplied stylesheet, copy your
        own and override the <code>maven.css</code> stylesheet in your
        <code>${basedir}/xdocs/stylesheets/</code> directory.  You can
        also specify your own javadoc stylesheet by setting the
        <code>maven.javadoc.stylesheet</code> property.
      </p>
    </subsection>
    <subsection name="Reports">
      <p>
        Finally, if you want to customize which reports are
        automatically generated for your site, you need to include the
        <a href="project-descriptor.html#reports"><code>reports</code></a> tag
        in your project descriptor.  As of this writing, if you do not
        utilize the <code>reports</code> tag, all of the plugin
        reports will be generated.  This tag enables you to
        selectively choose which reports to include and exclude as
        well as the order of the reports.
      </p>
      <p>
        The <code>standard</code> set of reports is currently hard coded into
        the <code>xdoc</code> plugin. These are
      </p>
      <source>
maven-changelog-plugin
maven-changes-plugin
maven-checkstyle-plugin
maven-developer-activity-plugin
maven-file-activity-plugin
maven-javadoc-plugin
maven-jdepend-plugin
maven-junit-report-plugin
maven-jxr-plugin
maven-license-plugin
maven-linkcheck-plugin
maven-pmd-plugin
maven-tasklist-plugin
      </source>
        <p>If you wish to use the default reports but remove one or add one, the 
          preferred method is to use a postGoal for xdoc:register-reports
        </p>  
        
        <source><![CDATA[
<postGoal name="xdoc:register-reports">
  <attainGoal name="maven-changelog-plugin:deregister"/>  
  <attainGoal name="maven-myown-plugin:register"/>  
</postGoal>
        ]]></source>
      
    </subsection>
    <subsection name="Exclusion of All Maven-Generated Content">
      <p>
        Users building documentation-only sites or sites that
        aggregate a lot of sub-projects might want to prevent the
        inclusion of the entire "Project Documentation" section of the
        navigation bar on their sites.  This can be done by setting
        the <code>maven.xdoc.includeProjectDocumentation</code>
        property to the value of <code>no</code>.  By default, Maven
        will include the "Project Documentation" section of the
        navigation bar which includes information about the project as
        well as links to the numerous Maven-generated reports.
      </p>
    </subsection>
    
  </section>
 </body>
</document>

