Exclude jsr250-api from enunciate-core-annotations 84/67184/2
authorMichael Vorburger <vorburger@redhat.com>
Tue, 16 Jan 2018 01:15:38 +0000 (02:15 +0100)
committerRobert Varga <nite@hq.sk>
Tue, 20 Feb 2018 15:51:57 +0000 (15:51 +0000)
to fix this (correct) complaint from ClasspathHellDuplicatesCheckRule:

file:/.../javax/annotation/jsr250-api/1.0/jsr250-api-1.0.jar
overlaps with
file:/.../jre/lib/rt.jar
- total overlapping classes: 6 - different classloaders.

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

index 0ee08be562471a18525e3651f2c1dd135c68c798..d8a6e98ed3a21ec4bd49f2387ab88110d83af051 100644 (file)
         <groupId>org.codehaus.enunciate</groupId>
         <artifactId>enunciate-core-annotations</artifactId>
         <version>${enunciate.version}</version>
+        <exclusions>
+          <exclusion>
+            <!-- JSR 250 API has 6 very old versions of javax.annotation @PreDestroy & Co.
+                 which are in core rt.jar since Java 6; it also has Java EE @DataSourceDefinition
+                 and @RunAs and @PermitAll & Co. which we do not require
+                 (or at least not from jsr250-api via enunciate) -->
+            <groupId>javax.annotation</groupId>
+            <artifactId>jsr250-api</artifactId>
+          </exclusion>
+        </exclusions>
       </dependency>
       <dependency>
         <groupId>com.webcohesion.enunciate</groupId>
         <artifactId>enunciate-core-annotations</artifactId>
         <version>2.10.1</version>
+        <exclusions>
+          <exclusion>
+            <!-- see above -->
+            <groupId>javax.annotation</groupId>
+            <artifactId>jsr250-api</artifactId>
+          </exclusion>
+        </exclusions>
       </dependency>
       <dependency>
         <groupId>org.codehaus.jettison</groupId>