You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hbase.apache.org by nd...@apache.org on 2021/11/29 22:33:03 UTC
[hbase-thirdparty] 01/02: HBASE-25863 [hbase-thirdparty] Shade javax.ws.rs package for use with shaded Jersey
This is an automated email from the ASF dual-hosted git repository.
ndimiduk pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/hbase-thirdparty.git
commit 736bdc441af85fba05e7fd50b2a80749d5dbec02
Author: Nick Dimiduk <nd...@apache.org>
AuthorDate: Fri May 7 11:37:48 2021 -0700
HBASE-25863 [hbase-thirdparty] Shade javax.ws.rs package for use with shaded Jersey
From the [About](https://eclipse-ee4j.github.io/jersey/) text,
> Jersey RESTful Web Services 2.x framework is open source, production quality, framework for
> developing RESTful Web Services in Java that provides support for JAX-RS APIs and serves as a
> JAX-RS (JSR 311 & JSR 339 & JSR 370) Reference Implementation.
`javax.ws.rs` is defined by the JSRs, so it doesn't make sense that we could have multiple
implementations of that JSR on the classpath simultaniously (via jersey-server-1.x and
jersey-server-2.x jars) without them colliding. By shading over the JSR package space in the
jersey-server-2.x implementation jars, we achieve a completely isolated JSR runtime.
Signed-off-by: Sean Busbey <bu...@apache.org>
Signed-off-by: Andrew Purtell <ap...@apache.org>
---
hbase-shaded-jersey/pom.xml | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/hbase-shaded-jersey/pom.xml b/hbase-shaded-jersey/pom.xml
index 92c485c..92b8b7b 100644
--- a/hbase-shaded-jersey/pom.xml
+++ b/hbase-shaded-jersey/pom.xml
@@ -69,6 +69,10 @@
<createSourcesJar>true</createSourcesJar>
<relocations>
<relocation>
+ <pattern>javax.ws.rs</pattern>
+ <shadedPattern>${rename.offset}.javax.ws.rs</shadedPattern>
+ </relocation>
+ <relocation>
<pattern>org.glassfish</pattern>
<shadedPattern>${rename.offset}.org.glassfish</shadedPattern>
</relocation>
@@ -96,7 +100,6 @@
also else we give an odd signal in the META-INF/DEPENDENCIES that we
produce. See below for how to exclusion of transitive dependencies.
-->
- <exclude>jakarta.ws.rs:jakarta.ws.rs-api</exclude>
<exclude>jakarta.annotation:jakarta.annotation-api</exclude>
<exclude>jakarta.validation:jakarta.validation-api</exclude>
<exclude>org.glassfish.hk2.external:jakarta.inject</exclude>