FindBugs' full :annotation instead of :jsr305 artifact sub-set 37/47337/7
authorMichael Vorburger <vorburger@redhat.com>
Fri, 21 Oct 2016 12:19:53 +0000 (14:19 +0200)
committerStephen Kitt <skitt@redhat.com>
Tue, 7 Feb 2017 17:24:24 +0000 (17:24 +0000)
This will require that all downstream projects first switch their
<dependency><groupId>com.google.code.findbugs from <artifactId>jsr305 to
<artifactId>annotations in all pom.xml.  They will NOT have to adapt any
code, because the actual Java types are exactly the same (just from a
different Maven artefact).

see also discussion in https://git.opendaylight.org/gerrit/#/c/46914/

Change-Id: Idedc9203f99dd012f10945f2f8f69c88e5f541a2
Signed-off-by: Michael Vorburger <vorburger@redhat.com>
odlparent/pom.xml

index e876571ff30353d12995aad6eb807e7a6f989224..83f211d3f19fdf1f06ee3ad4172eff573f0b1a43 100644 (file)
         <artifactId>java-concurrent-hash-trie-map</artifactId>
         <version>0.2.23-ODL</version>
       </dependency>
-      <dependency>
-        <groupId>com.google.code.findbugs</groupId>
-        <artifactId>jsr305</artifactId>
-        <version>3.0.0</version>
-      </dependency>
       <dependency>
         <groupId>com.google.code.findbugs</groupId>
         <artifactId>annotations</artifactId>
-        <version>3.0.0</version>
+        <version>3.0.1</version>
+        <scope>provided</scope>
         <exclusions>
-          <!-- We'd like (have) to eventually exclude :jsr305 here as well, because
-               the types of this artifact are already shaded inside the :annotations artifact.
-               This state is a temporary solution to allow all projects to gradually switch over
-               switch their <dependency><groupId>com.google.code.findbugs from
-               <artifactId>jsr305 to <artifactId>annotations in all pom.xml.
-               The target solution is https://git.opendaylight.org/gerrit/#/c/47337/
-            -->
+          <!-- The following exclusions are also enforced by our maven-enforcer-plugin configuration in odlparent-lite -->
+          <exclusion>
+            <groupId>com.google.code.findbugs</groupId>
+            <!-- The types of this artifact are already shaded inside the :annotations artifact -->
+            <artifactId>jsr305</artifactId>
+          </exclusion>
           <exclusion>
             <groupId>net.jcip</groupId>
             <!-- The types of this artifact are already shaded inside the :annotations artifact -->
       <scope>test</scope>
     </dependency>
 
-    <!-- Enable JSR-305 annotations everywhere -->
+    <!-- Enable FindBugs & JSR-305 annotations everywhere -->
     <dependency>
       <groupId>com.google.code.findbugs</groupId>
       <artifactId>annotations</artifactId>
       <scope>provided</scope>
     </dependency>
-    <!-- See note above; having both :jsr305 and :annotations here is an intermediate step -->
-    <dependency>
-      <groupId>com.google.code.findbugs</groupId>
-      <artifactId>jsr305</artifactId>
-      <scope>provided</scope>
-    </dependency>
     <dependency>
       <groupId>org.eclipse.jdt</groupId>
       <artifactId>org.eclipse.jdt.annotation</artifactId>