Usage

To use the plugin, you've got two options: First of all, it can create a simple text file, called target/rat.txt, with the plugin's output. This is done by invoking the apache-rat:check goal.

You may also add a report to the generated site. This is your second option.

Writing the report to a text file

To create a text file with the report, you need to run the apache-rat:check goal. Add a section like the following to your POM:

  <build>
    <plugins>
      ...
      <plugin>
        <groupId>org.apache.rat</groupId>
        <artifactId>apache-rat-plugin</artifactId>
        <version>0.16.1</version>
      </plugin>
      ...
    </plugins>
  </build>

Once you have done that, the plugin can be run from the command line by simply typing

  mvn apache-rat:check

An example for running the plugin automatically can be found here.

Adding the report to the generated site

A section like the following must be added to your POM:

  <reporting>
    <plugins>
      ...
      <plugin>
        <groupId>org.apache.rat</groupId>
        <artifactId>apache-rat-plugin</artifactId>
        <version>0.16.1</version>
      </plugin>
      ...
    </plugins>
  </reporting>

The report will be created automatically when you generate the site:

  mvn site