A Release Audit Tool (RAT)
Apache RAT™ audits software distributions, with a special interest in headers. If this isn't quite what you're looking for then take a look at the other products developed by Apache Creadur™, including Apache Whisker™ which audits and generates legal (for example LICENSE
) documents for complex software distributions.
There are several things to keep in mind when running RAT
- RAT highlights possible issues.
- RAT reports require interpretation.
- RAT often requires some tuning before it runs well against a project.
- RAT relies on heuristics: it may miss issues
Apache RAT™
In a hurry? Jump to quick start
About RAT
What Is RAT?
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 :-)
How Do I Use RAT?
Apache RAT 0.17-SNAPSHOT ships with
- A command line client.
- An Apache Ant task library ,
- An Apache Maven plugin.
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.
How do I extend RAT
There are several standard ways to extend RAT.
- Add a license definition via an XML file.
- Add a new Matcher definition. Requires Java expertise.
- Add a new definition format. Requires Java expertise as well as expertise with the format.
- Write a new output report. Requires XSLT knowledge.
- Write a new user interface. Requires Java expertise, but there are tools to help.
Quick Start: Running RAT
There are three user interfaces for RAT: from the command line, from Ant, and from Maven.
Please see the specific documentation in one of the links above.
Building RAT from source
Checkout the code
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.
Building RAT
Build RAT with Apache Maven preferably version 3.9.10 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
Hints and Tips
The project creates several jars that are used later in the build process. This means that the jars for the version being build should be accessible or a error concerning a missing jar will be displayed. There are several ways to avoid this problem.
1. Include the Apache snapshot repository (https://repository.apache.org/content/repositories/snapshotsurlhttps://repository.apache.org/content/repositories/snapshots) in your Maven build.
2. Execute the maven install noted above. This will place the current jars in your local repository.
3. Run "mvn package" and use the resulting jar in the apache-rat sub-module for testing.
If you modify code in one sub-module you need to run "mvn install" in that module to get it into your repository so that you can use it in later repository builds. Alternatively, you can run "mvn package", or "mvn install" on the entire project.