Revapi Maven Plugin

Maven integration for Revapi.

By default Revapi checks the currently built artifact against the latest released version of it. This actually is equivalent to running the maven plugin with the following set up:

<plugin>
  <groupId>org.revapi</groupId>
  <artifactId>revapi-maven-plugin</artifactId>
  <version>...</version>
  <configuration>
    <oldArtifacts>
        <artifact>${project.groupId}:${project.artifactId}:RELEASE</artifact>
    </oldArtifacts>
    <newArtifacts>
        <artifact>${project.groupId}:${project.artifactId}:${project.version}</artifact>
    </newArtifacts>
  </configuration>
  <executions>
    <execution>
      <goals><goal>check</goal></goals>
    </execution>
  </executions>

I.e. the oldArtifacts are set up to include the current project with the RELEASE version, which is Maven’s way of saying "this project in the latest released version". The newArtifacts specifies the currently built project.

The above example implies a couple of things:

  • you can include more than one artifact to be included in the analysis

  • you don’t have to specify the "supplementary archives" - the dependencies of the artifacts are automatically obtained from Maven and used during the analysis so that the complete classpath is used

  • you’re not constrained to check the artifacts of the current project - in fact you could have a separate "check" module that would perform API checks completely separately from other modules in the project.

Back to top

Msb3 Maven skin by Marek Romanowski.