Configuring Reports

Note for Maven 3 users: due to the changes in the reporting API, report inclusion does not work with Maven 3. See MPDF-41.

Since version 1.1, all Maven reports will be included by default in the generated PDF. You should configure the <reporting/> section of your POM similar than the site plugin

For instance, you could have the following:

<project>
  ...
  <reporting>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-project-info-reports-plugin</artifactId>
        <version>2.1.2</version>
        <reportSets>
          <reportSet>
            <reports>
              <report>project-team</report>
              ...
            </reports>
          </reportSet>
        </reportSets>
      </plugin>
      ...
    </plugins>
  </reporting>
  ...
  <project>
Notes:
  1. to exclude the reporting generation inside the PDF, you should add -DincludeReports=false in the command line.
  2. only internal reporting plugins will be added in the PDF, external reporting plugins like Javadoc will be skipped.

Enhancements

Having many reports increases hugely the build time, so it is recommended to select only the wanted reports to be included in the PDF. It is recommended to define a reporting profile in your pom, similar to the following:

<project>
  ...
  <profiles>
    <profile>
      <id>pdf</id>
      <reporting>
        <plugins>
          <plugin>
            <artifactId>maven-project-info-reports-plugin</artifactId>
            <version>2.1.2</version>
            <reportSets>
              <reportSet>
                <reports>
                  <report>cim</report>
                  <!-- take too long time
                  <report>dependencies</report> -->
                  <report>dependency-convergence</report>
                  <report>dependency-management</report>
                  <!-- already present
                  <report>index</report> -->
                  <report>issue-tracking</report>
                  <report>license</report>
                  <report>mailing-list</report>
                  <report>plugin-management</report>
                  <report>plugins</report>
                  <report>project-team</report>
                  <report>scm</report>
                  <report>summary</report>
                </reports>
              </reportSet>
            </reportSets>
          </plugin>
        </plugins>
      </reporting>

      <build>
        <defaultGoal>pdf:pdf</defaultGoal>
        <plugins>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-pdf-plugin</artifactId>
            <version>1.2</version>
          </plugin>
        </plugins>
      </build>
    </profile>
    ...
  </profiles>
  ...
  <project>

Maven Reporting Plugins Issues

The Maven Project supports several reporting plugins. Unfortunately, some releases reporting plugins have known issues with the PDF plugin, mainly due to a wrong use of the Sink object in their implementation.

The following tables show reporting plugins which have been tested with the PDF plugin. The failed plugins have been fixed and deployed on https://repository.apache.org/content/repositories/snapshots, so you will be able to use them.

Note: fixing these reporting plugins is a work in progress. If you used a SNAPSHOT plugin which fails with the PDF plugin, you should fill a bug report in our issue tracker.

maven-changelog-plugin
Reports Release (2.1) Snapshot (2.2-SNAPSHOT)
changelog:changelog No Yes
changelog:dev-activity No Yes
changelog:file-activity No Yes
maven-changes-plugin
Reports Release (2.1) Snapshot (2.2-SNAPSHOT)
changes:changes-report No Yes
changes:jira-report No Yes
changes:trac-report No Yes
maven-checkstyle-plugin

Note: could take a lot of time.

Reports Release (2.3) Snapshot (2.4-SNAPSHOT)
checkstyle:checkstyle No Yes
maven-dependency-plugin
Reports Release (2.1) Snapshot (2.2-SNAPSHOT)
dependency:analyze-report Yes Yes
maven-plugin-plugin
Reports Release (2.5) Snapshot (2.5.1-SNAPSHOT)
plugin:report No Yes
maven-pmd-plugin
Reports Release (2.4) Snapshot (2.5-SNAPSHOT)
pmd:cpd No Yes
pmd:pmd No Yes
maven-project-info-reports-plugin

Note: dependencies report could take a lot of time.

Reports Release (2.1.2) Snapshot (2.2-SNAPSHOT)
project-info-reports:cim Yes Yes
project-info-reports:dependencies No Yes
project-info-reports:dependency-convergence Yes Yes
project-info-reports:dependency-management Yes Yes
project-info-reports:index Yes Yes
project-info-reports:issue-tracking Yes Yes
project-info-reports:license Yes Yes
project-info-reports:mailing-list Yes Yes
project-info-reports:plugin-management Yes Yes
project-info-reports:plugins Yes Yes
project-info-reports:project-team Yes Yes
project-info-reports:scm Yes Yes
project-info-reports:summary Yes Yes
maven-surefire-report-plugin
Reports Release (2.4.3) Snapshot (2.5-SNAPSHOT)
surefire-report:report No Yes

Mojo Reporting Plugins Issues

The Mojo Project proposes several reporting plugins. Like the Maven project, some releases have known issues with the PDF plugin due to the Sink object uses.

The following tables show reporting plugins which have been tested with the PDF plugin. Some of them have been fixed and deployed on http://snapshots.repository.codehaus.org.

Note: these test tables are only for your information. If you find issues, please contact directly the mojo team

clirr-maven-plugin
Reports Release (2.2.2) Snapshot (2.2.3-SNAPSHOT)
clirr:clirr No Yes
cobertura-maven-plugin
Reports Release (2.3) Snapshot (2.4-SNAPSHOT)
cobertura:cobertura Yes Yes
l10n-maven-plugin
Reports Release (1.0-alpha-2) Snapshot (1.0-alpha-3-SNAPSHOT)
l10n:report Yes Yes
javancss-maven-plugin
Reports Release (2.0) Snapshot (2.1-SNAPSHOT)
javancss:report No Yes