Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
<dependency>
    <groupId>org.apache.maven.reporting</groupId>
    <artifactId>maven-reporting-api</artifactId>
    <version>2.0.8</version>
</dependency>

<dependency>
    <groupId>org.apache.maven.reporting</groupId>
    <artifactId>maven-reporting-impl</artifactId>
    <version>2.0.4.3</version>
</dependency>

<dependency>
    <groupId>org.codehaus.plexus</groupId>
    <artifactId>plexus-utils</artifactId>
    <version>2.0.1</version>
</dependency>

AbstractMavenReportRenderer

For a relatively straightforward report, you can take advantage of AbstractMavenReportRenderer.

This class will handle the basic negotiations with the Doxia sink, setting up the head, title, and body. You implement a renderBody method to fill in the middle. it provides utilities for sections and tables.

Doxia Sink

You also need to use the Doxia Sink API to have complete decoration (ie. menus). That is quite straightforward. You simply import org.apache.maven.doxia.sink.Sink and get an instance by simply calling the class method getSink() (you don't even have to implement it). Then you can do things like that:

...