1.20. Customizing Site Reports Site generation creates a number of useful reports, but depending on your style, you may want to deactivate some of these reports. 1.20.1. How do I do that? 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. 1.20.2. What just happened? 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 |
---|
maven-changelog-plugin | Changelog is a plug-in that uses the repository element to create a report of recent changes in source control. | maven-changes-plugin | Formats a changes.xml document in xdocs. | maven-checkstyle-plugin | Reports on the style of your Java code. | maven-clover-plugin | Uses a commercial test coverage tool to generate an HTML of you project's unit test coverage. | maven-cruisecontrol-plugin | This plug-in is discussed in Section 4.1. | maven-developer-activity-plugin | Creates a report of recent source control activity, by developer. | maven-faq-plugin | Formats project FAQ documents from xdocs. | maven-file-activity-plugin | Creates a report of recent source control activity, by file. | maven-findbugs-plugin | Finds common bug patterns in Java code. | maven-license-plugin | Includes a link to the project's license in the project reports. | maven-linkcheck-plugin | Tests all links in the generated site and creates a report listing 404s. | maven-javadoc-plugin | Adds JavaDoc to the generate Maven site. | maven-jcoverage-plugin | Generates reports and graphs about unit test coverage. | maven-jdepend-plugin | Creates a report which lists dependencies between packages. | maven-jira-plugin | Reads open issues from a commercial issue-tracking system known as Jira, and creates a report. | maven-junit-report-plugin | Creates a report that aggregates JUnit results. | maven-jxr-plugin | Creates an annotated cross-reference of Java Source. | maven-pmd-plugin | Generates a report of potential coding issues such as unused local variables and complicated expressions. | maven-simian-plugin | Finds duplicative source code throughout the source tree. | maven-statcvs-plugin | Generates statistics and graphs of CVS activity. | maven-tasklist-plugin | Scans for @todo tags in source. |
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 |