Getting Started

Revapi can be used in 4 ways. Either as a standalone java program, using its maven plugin or ant task during build or as an embedded library.


You can read more about the maven plugin in its dedicated section.
You can find the latest versions of the various Revapi components in the downloads section.

Revapi’s main purpose is to track API changes between releases. This is ideally done during build and so the maven integration is essential.

The basic usage of the Revapi’s maven plugin is quite simple. In your pom.xml, do:


By default, Revapi only bundles the basic features so in order to check your java code, you need to add the Revapi’s java extension as a dependency to the maven plugin.

For more detailed info, check the maven plugin’s site.


There is an externally developed Gradle plugin contributed by Palantir, the gradle-revapi plugin. Please consult the home page of the project for usage guidelines and documentation.

Standalone Usage

More information about the Revapi’s CLI tool, can be obtained from its dedicated section.

First you need to download the standalone distribution of Revapi, say Now you have to:

$ unzip
$ cd revapi-standalone-0.12.0

Your installation is now ready. To start using it, you can simply invoke

$ ./

(or if you’re unfortunate enough to be on windows)

> revapi.bat

and you will be presented with the usual usage information.

An invocation of Revapi could look like this:

./ \
  --extensions=org.revapi:revapi-java:0.28.1,org.revapi:revapi-reporter-text:0.15.0 \
  --old=my-lib-0.1.0.jar --new=my-lib-0.2.0.jar -D revapi.reporter.text.minSeverity=BREAKING

Different extensions might define different configuration options that you might supply to them using either the -D command line parameter or they can be read from configuration file(s) specified by the -c option.


You can read more about the Revapi’s Ant task in its dedicated section.

There is also an Ant task to invoke Revapi analysis on arbitrary archives. The task implicitly supports the basic features but other extensions need to be added.

The following attributes are supported:


The FileSet of archives of the old version of the API


The FileSet of archives that support the old API (i.e. dependencies)


The FileSet of archives of the new version of the API


The FileSet of archives that support the new API (i.e. dependencies)


A Path to additional extensions to use with Revapi


A JSON string with the Revapi configuration


The minimal severity of differences that will be reported

An example for checking Java code:

<target name="api-check">
  <taskdef name="revapi" classname="org.revapi.ant.RevapiTask" classpath="lib/revapi-ant-task-0.13.0.jar"/>
    <oldArchives file="mylib-1.0.jar"/>
    <newArchives file="mylib-1.1.jar"/>
      <pathelement location="lib/revapi-java-0.28.1-uber.jar"/>

Notice the use of the "uber" jar for the java extension. The uber jar of the java extension contains its dependencies (excluding the revapi API itself which is considered provided).


Revapi revapi = Revapi.builder().withAllExtensionsFromThreadContextClassLoader().build();

AnalysisContext analysisContext = AnalysisContext.builder()


For more details, see dedicated section.