1 Integrating Animal Sniffer with OpenDaylight projects
2 =====================================================
4 This section provides information required to setup OpenDaylight projects with
5 the Maven's `Animal Sniffer plugin`_ for testing API compatibility with OpenJDK.
8 Steps to setup up animal sniffer plugin with your project
9 ---------------------------------------------------------
11 1. Clone odlparent and checkout the required branch. The example below uses
12 the branch 'origin/master/2.0.x'
16 git clone https://git.opendaylight.org/gerrit/odlparent
18 git checkout origin/master/2.0.x
20 2. Modify the file `odlparent/pom.xml` to install the `Animal Sniffer plugin`_ as
21 shown in the below example or refer to the change `odlparent gerrit patch`_.
26 <groupId>org.codehaus.mojo</groupId>
27 <artifactId>animal-sniffer-maven-plugin</artifactId>
28 <version>1.16</version>
31 <groupId>org.codehaus.mojo.signature</groupId>
32 <artifactId>java18</artifactId>
33 <version>1.0</version>
38 <id>animal-sniffer</id>
45 <id>check-java-version</id>
46 <phase>package</phase>
52 <groupId>org.codehaus.mojo.signature</groupId>
53 <artifactId>java18</artifactId>
54 <version>1.0</version>
61 3. Run a `mvn clean install` in odlparent.
67 4. Clone the respective project to be tested with the plugin. As shown in the
68 example in `yangtools gerrit patch`_, modify the relevant pom.xml files to
69 reference the version of odlparent which is checked-out. As shown in the example
70 below change the version to `2.0.6-SNAPSHOT` or the version of the
71 `2.0.x-SNAPSHOT` odlparent is checked out.
76 <groupId>org.opendaylight.odlparent</groupId>
77 <artifactId>odlparent</artifactId>
78 <version>2.0.6-SNAPSHOT</version>
82 5. Run a `mvn clean install` in your project.
88 6. Run `mvn animal-sniffer:check` on your project and fix any relevant issues.
92 mvn animal-sniffer:check
94 .. _odlparent gerrit patch: https://git.opendaylight.org/gerrit/64688/
95 .. _yangtools gerrit patch: https://git.opendaylight.org/gerrit/64781
96 .. _Animal Sniffer plugin: https://www.mojohaus.org/animal-sniffer/animal-sniffer-maven-plugin/examples/checking-signatures.html