HBASE-22345 REST Server must have specific version of javax.annotations available at runtime

Rest Server throws NoClassDefFoundError : javax/annotation/Priority after buiding with JDK8 and running on JDK8

Signed-off-by: Sean Busbey <busbey@apache.org>
This commit is contained in:
Sakthi 2019-05-02 13:37:31 -07:00 committed by Sean Busbey
parent 0c0d59541a
commit 68f14c19ff
6 changed files with 13 additions and 14 deletions

View File

@ -44,7 +44,6 @@
<dependencySet>
<excludes>
<!-- Exclude J2EE libraries that get pulled in when building on JDK11 -->
<exclude>javax.annotation:javax.annotation-api</exclude>
<exclude>com.sun.xml.ws:jaxws-ri</exclude>
<!-- Exclude libraries that we put in their own dirs under lib/ -->
<exclude>org.jruby:jruby-complete</exclude>

View File

@ -67,7 +67,6 @@
<dependencySet>
<excludes>
<!-- Exclude J2EE libraries that get pulled in when building on JDK11 -->
<exclude>javax.annotation:javax.annotation-api</exclude>
<exclude>com.sun.xml.ws:jaxws-ri</exclude>
<!-- Exclude libraries that we put in their own dirs under lib/ -->
<exclude>org.jruby:jruby-complete</exclude>

View File

@ -162,7 +162,8 @@
</relocations>
<artifactSet>
<excludes>
<!-- exclude J2EE modules that come in for JDK11+ -->
<!-- exclude J2EE modules that come in for JDK11+ or modules that come in for
JDK8+ but need not be included -->
<exclude>javax.annotation:javax.annotation-api</exclude>
<!--Exclude protobuf itself. We get a patched version from hbase-thirdparty.
-->

View File

@ -54,9 +54,9 @@
<configuration>
<artifactSet>
<excludes>
<!-- exclude J2EE modules that come in for JDK11+ -->
<exclude>javax.annotation:javax.annotation-api</exclude>
<!-- exclude J2EE modules that come in for JDK11+ (since hadoop-3.2.0) -->
<!-- exclude J2EE modules that come in for JDK11+ (since
hadoop-3.2.0) or modules that come in for JDK8+ but
need not be included -->
<exclude>javax.activation:javax.activation-api</exclude>
<!--
Tell the shade plugin that in this case we want to include hadoop

View File

@ -132,9 +132,9 @@
<shadeTestJar>false</shadeTestJar>
<artifactSet>
<excludes>
<!-- exclude J2EE modules that come in for JDK11+ -->
<exclude>javax.annotation:javax.annotation-api</exclude>
<!-- exclude J2EE modules that come in for JDK11+ (since hadoop-3.2.0) -->
<!-- exclude J2EE modules that come in for JDK11+ (since
hadoop-3.2.0) or modules that come in for JDK8+ but
need not be included -->
<exclude>javax.activation:javax.activation-api</exclude>
<!-- default to excluding Hadoop, have module that want
to include it redefine the exclude list -->

10
pom.xml
View File

@ -1991,6 +1991,11 @@
<artifactId>javax.activation</artifactId>
<version>1.2.0</version>
</dependency>
<dependency>
<groupId>javax.annotation</groupId>
<artifactId>javax.annotation-api</artifactId>
<version>1.2</version>
</dependency>
<dependency>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-server</artifactId>
@ -2304,11 +2309,6 @@
</activation>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>javax.annotation</groupId>
<artifactId>javax.annotation-api</artifactId>
<version>1.3.2</version>
</dependency>
<dependency>
<groupId>com.sun.xml.ws</groupId>
<artifactId>jaxws-ri</artifactId>