 ------
 Configuring Reports
 ------
 Dennis Lundberg
 Hervé Boutemy
 ------
 2012-12-02
 ------

 ~~ 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


Configuring Reports

  Maven has several reports that you can add to your web site to display the
  current state of the project. These reports take the form of plugin goals, just
  like those used to build the project.

  {{{/plugins/maven-project-info-reports-plugin/}Maven Project Info Reports Plugin}}
  provides many standard reports by extracting information from the POM, for example:

  * Continous Integration

  * Dependencies

  * Issue Tracking

  * License

  * Mailing Lists

  * Project Team

  * Source Repository

  []

  To find out more please see to the
  {{{/plugins/maven-project-info-reports-plugin/}Project Info Reports Plugin}}.

  To add these reports to your site, you must add the plugin to the
  <<<\<reporting\>>>> element in the POM. The following example shows how to
  configure the standard Project Info Reports that display information from the
  POM in a friendly format:

+-----------------+
<project>
  ...
  <reporting>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-project-info-reports-plugin</artifactId>
        <version>2.6</version>
      </plugin>
    </plugins>
  </reporting>
  ...
</project>
+-----------------+

  If you have included the appropriate <<<\<menu ref="reports"/\>>>> tag in your
  {{{./sitedescriptor.html}site descriptor}}, then when you regenerate the site
  those items will appear in a menu called "Project Reports".

  <<Note:>> Many report plugins provide a parameter called <<<outputDirectory>>>
  or similar to specify the destination for their report outputs. This parameter
  is only relevant if the report plugin is run standalone, i.e. by invocation
  directly from the command line. In contrast, when reports are generated as
  part of the site, the configuration of the Maven Site Plugin will determine
  the effective output directory to ensure that all reports end up in a common
  location.

  Check out reporting plugins ("R" value in the "Type" column) in the {{{/plugins/}plugins page}},
  for a list of available reporting plugins from Apache Maven Team.

Selecting Reports from a Plugin: Configuring Report Sets

  By default, when you add a plugin in reporting section, <every> reporting goal available in the
  plugin is rendered once.

  If you want to choose only some reports from a plugin, or if you want to run a report multiple times
  with a different configuration, you need to configure report sets:

+-----------------+
<project>
  ...
  <reporting>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-project-info-reports-plugin</artifactId>
        <version>2.6</version>
        <reportSets>
          <reportSet>
            <reports><!-- select reports -->
              <report>index</report>
            </reports>
          </reportSet>
        </reportSets>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-javadoc-plugin</artifactId>
        <version>2.9</version>
        <reportSets>
          <reportSet><!-- by default, id = "default" -->
            <reports><!-- select non-aggregate reports -->
              <report>javadoc</report>
              <report>test-javadoc</report>
            </reports>
          </reportSet>
          <reportSet><!-- aggregate reportSet, to define in poms having modules -->
            <id>aggregate</id>
            <inherited>false</inherited><!-- don't run aggregate in child modules -->
            <reports>
              <report>aggregate</report>
            </reports>
          </reportSet>
        </reportSets>
      </plugin>
    </plugins>
  </reporting>
  ...
</project>
+-----------------+

  <Notice>: don't forget to define reportSets for plugins which provide aggregator reports, like maven-javadoc-plugin,
  maven-jxr-plugin or maven-checkstyle-plugin or you'll have these aggregate reports run by default in addition
  to non-aggregate reports.

  See the {{{/ref/current/maven-model/maven.html#class_reportSet}reportSet documentation in POM reference}} for complete
  description of available configurations.
