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> <dependencySet>
<excludes> <excludes>
<!-- Exclude J2EE libraries that get pulled in when building on JDK11 --> <!-- 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>com.sun.xml.ws:jaxws-ri</exclude>
<!-- Exclude libraries that we put in their own dirs under lib/ --> <!-- Exclude libraries that we put in their own dirs under lib/ -->
<exclude>org.jruby:jruby-complete</exclude> <exclude>org.jruby:jruby-complete</exclude>

View File

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

View File

@ -162,7 +162,8 @@
</relocations> </relocations>
<artifactSet> <artifactSet>
<excludes> <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>javax.annotation:javax.annotation-api</exclude>
<!--Exclude protobuf itself. We get a patched version from hbase-thirdparty. <!--Exclude protobuf itself. We get a patched version from hbase-thirdparty.
--> -->

View File

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

View File

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

10
pom.xml
View File

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