Integrating Animal Sniffer with OpenDaylight projects ===================================================== This section provides information required to setup OpenDaylight projects with the Maven's `Animal Sniffer plugin`_ for testing API compatibility with OpenJDK. Steps to setup up animal sniffer plugin with your project --------------------------------------------------------- 1. Clone odlparent and checkout the required branch. The example below uses the branch 'origin/master/2.0.x' .. code:: shell git clone https://git.opendaylight.org/gerrit/odlparent cd odlparent git checkout origin/master/2.0.x 2. Modify the file `odlparent/pom.xml` to install the `Animal Sniffer plugin`_ as shown in the below example or refer to the change `odlparent gerrit patch`_. .. code:: xml org.codehaus.mojo animal-sniffer-maven-plugin 1.16 org.codehaus.mojo.signature java18 1.0 animal-sniffer verify check check-java-version package build org.codehaus.mojo.signature java18 1.0 3. Run a `mvn clean install` in odlparent. .. code:: shell mvn clean install 4. Clone the respective project to be tested with the plugin. As shown in the example in `yangtools gerrit patch`_, modify the relevant pom.xml files to reference the version of odlparent which is checked-out. As shown in the example below change the version to `2.0.6-SNAPSHOT` or the version of the `2.0.x-SNAPSHOT` odlparent is checked out. .. code:: org.opendaylight.odlparent odlparent 2.0.6-SNAPSHOT 5. Run a `mvn clean install` in your project. .. code:: shell mvn clean install 6. Run `mvn animal-sniffer:check` on your project and fix any relevant issues. .. code:: shell mvn animal-sniffer:check .. _odlparent gerrit patch: https://git.opendaylight.org/gerrit/c/odlparent/+/64688/ .. _yangtools gerrit patch: https://git.opendaylight.org/gerrit/c/yangtools/+/64781/ .. _Animal Sniffer plugin: https://www.mojohaus.org/animal-sniffer/animal-sniffer-maven-plugin/examples/checking-signatures.html