O'Reilly logo

Apache Maven Cookbook by Raghuram Bharathan

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Generating source cross-reference for a site

In the previous chapter, we saw how the Maven JXR plugin generates source cross-reference. When publishing a project, it is useful to provide a way to refer to sources in addition to Javadocs. Let us see how to make that part of the site report.

How to do it...

Use the following steps to generate source cross-reference for a site:

  1. Open the Maven project project with documentation.
  2. Add the following code to the reporting section of the pom.xml file:
    <plugin>
      <groupId>org.apache.maven.plugins</groupId>
      <artifactId>maven-jxr-plugin</artifactId>
      <version>2.5</version>
    </plugin>
  3. Run the following command:
    mvn site
    
  4. Open the generated site report:

How it works...

Adding the Maven JXR plugin to the reporting section ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required