In a hurry? Jump to quick start
Apache Rat is a release audit tool, focused on licenses.
Use Rat to improve accuracy and efficiency when checking releases for licenses.
Reviewing releases in the Apache Incubator by hand was error-prone and time-consuming. Rat arises from the Apache style, but is used more widely.
Apache Rat is part of the Apache Creadur language- and build-agnostic suite of tools for auditing and comprehending software distributions. Our community develops open source software the Apache way.
Please feel free to contribute a patch, demonstrate a bug, or just talk to us. All welcome :-)
Apache Rat 0.17-SNAPSHOT ships with tooling for
Rat is extensible. If your build tool isn't supported, please contribute a patch or talk to us.
Rat aspires to be self documenting. Please contribute a patch or talk to us whenever Rat falls short.
There are several standard ways to extend Rat.
There are three user interfaces for Rat: from the command line, from Ant, and from Maven. All three of the interfaces support standard options.
To run from the command line enter the following command:
java -jar apache-rat-0.17-SNAPSHOT.jar [options] [Directory or Archive]
Where "[options]" are one or more of the options listed in the table above (for CLI), and "[Directory or Archive]" is the directory or archive you want to process. There is more detailed information in the CLI documentation.
Ant support is provided via a task library. This requires Apache Ant 1.7 or later. The Ant library documentation provides detailed information concerning how to load the library and how to use the custom elements and properties for the Rat tasks.
Within the Maven ecosystem the Rat Maven plugin can be used. The plugin supports Apache Maven 3.9.9 or later.
ATTENTION! Maven4 is based on Java 17 and thus cannot be used with RAT, that relies on Java 8.
To use the plugin add the following information to your pom file.
<plugin> <groupId>org.apache.rat</groupId> <artifactId>apache-rat-plugin</artifactId> <version>0.17-SNAPSHOT</version> </plugin>
Detailed information about the Maven plugin is available.
Rat allows you to style the output as you see fit. Three stylesheets are included in the rat package.
These stylesheets can be specified using options in the command line, Maven or Ant clients.
In addition, new stylesheets may be developed and applied to create new reports.
Rat ships with a number of licenses, license families, and matcher definitions. Additional definitions/implementations of these objects may be added to the system as noted in the license definition document. A list of default licenses is also available.
Rat uses a Git repository. You can clone it using:
git clone https://gitbox.apache.org/repos/asf/creadur-rat.git
For more information about how to access our repository please read our source code management documentation.
Build Rat with Apache Maven preferably version 3.9.9 or later.
There are two methods for building the Rat suite:
cd creadur-rat mvn clean install
or with the included Maven wrapper
cd creadur-rat ./mvnw