Site generation creates a number of useful reports, but depending on your style, you may want to deactivate some of these reports.
To change the reports generated by Maven's site generation,
alter the contents of the reports
element in project.xml. Here is a
reports
element with several
available reports activated:
<reports> <report>maven-changelog-plugin</report> <report>maven-changes-plugin</report> <report>maven-checkstyle-plugin</report> <report>maven-clover-plugin</report> <report>maven-cruisecontrol-plugin</report> <report>maven-developer-activity-plugin</report> <report>maven-faq-plugin</report> <report>maven-file-activity-plugin</report> <report>maven-license-plugin</report> <report>maven-linkcheck-plugin</report> <report>maven-javadoc-plugin</report> <report>maven-jdepend-plugin</report> <report>maven-jira-plugin</report> <report>maven-junit-report-plugin</report> <report>maven-jxr-plugin</report> <report>maven-pmd-plugin</report> <report>maven-simian-plugin</report> <report>maven-tasklist-plugin</report> </reports>
To exclude a report from Maven's site generation, just remove
the report's plug-in element from the reports
element. A Maven project that does
not specify the reports
element
generates a set of default reports: jdepend, Checkstyle, changes,
changelog, developer-activity, file-activity, license, javadoc, jxr,
junit, linkcheck, and tasklist. When you add a reports
element to your project's project.xml file, you must list all reports
you wish to have generated.
The reports
element lists
all these fancy reports, but you probably want to know
what all of these reports provide. Table 1-1 provides a brief
description of some of these reports.
Table 1-1. Report plug-ins
Report plug-in | Description |
---|---|
| Changelog is a plug-in that uses the repository element to create a report of recent changes in source control. |
| Formats a changes.xml document in xdocs. |
| Reports on the style of your Java code. |
| Uses a commercial test coverage tool to generate an HTML of you project's unit test coverage. |
| This plug-in is discussed in Section 4.1. |
| Creates a report of recent source control activity, by developer. |
| Formats project FAQ documents from xdocs. |
| Creates a report of recent source control activity, by file. |
| Finds common bug patterns in Java code. |
| Includes a link to the project's license in the project reports. |
| Tests all links in the generated site and creates a report listing 404s. |
| Adds JavaDoc to the generate Maven site. |
| Generates reports and graphs about unit test coverage. |
| Creates a report which lists dependencies between packages. |
| Reads open issues from a commercial issue-tracking system known as Jira, and creates a report. |
| Creates a report that aggregates JUnit results. |
| Creates an annotated cross-reference of Java Source. |
| Generates a report of potential coding issues such as unused local variables and complicated expressions. |
| Finds duplicative source code throughout the source tree. |
| Generates statistics and graphs of CVS activity. |
| Scans for |
For a more comprehensive list of plug-ins and reports, see:
Maven plug-ins: http://maven.apache.org/reference/plugins/index.html
Maven plug-in Sandbox: http://maven.apache.org/plugins-sandbox/index.html
Maven plug-ins hosted at SourceForge: http://maven-plugins.sourceforge.net/
Third-party Maven plug-ins: http://maven.apache.org/reference/3rdparty.html
Get Maven: A Developer's Notebook now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.