How do I generate a JXR report for a site?
Author: Deron Eriksson
Description: This maven tutorial describes how to generate a JXR report for a site using the Maven JXR Plugin.
Tutorial created using: Windows Vista || JDK 1.6.0_04 || Eclipse Web Tools Platform 2.0.1 (Eclipse 3.3.1)
(Continued from page 1)
Now, let's examine the reports that were generated. Two reports were generated by the JXR plugin: Source Xref and Test Source Xref. The Source Xref report is for our regular source code while the Test Source Xref report shows our test source code. The Javadoc plugin generated two other reports: JavaDocs and Test JavaDocs. JavaDocs links to the javadocs for our regular code while Test JavaDocs links to the javadocs for our test code.
As an example of the XHTML generated by the JXR plugin, I'll examine the Source Xref link. This brings up the JXR-generated view of the project. We can see that the results look similar to Javadocs and are very easy to navigate. I examined the "Howdy" class. We can see the source code displayed with line numbers. In addition, we can see that the top of the page has a link to the javadocs for the Howdy class. Also, notice the App link on line 14, which links to the Xref for the App class. This was all done automatically by the JXR plugin.