Skip to content
Permalink
Browse files
HBASE-24820 [hbase-thirdparty] Add jersey-hk2 when shading jersey and…
… bump jetty to 9.4.31 (#29)

Signed-off-by: Peter Somogyi <psomogyi@apache.org>
  • Loading branch information
Apache9 committed Aug 8, 2020
1 parent 058f326 commit d361fbae38c7fda39049b9478d9c44784f0cb4c1
Showing 3 changed files with 61 additions and 2 deletions.
@@ -80,6 +80,14 @@
<pattern>com.sun.research</pattern>
<shadedPattern>${rename.offset}.com.sun.research</shadedPattern>
</relocation>
<relocation>
<pattern>org.aopalliance</pattern>
<shadedPattern>${rename.offset}.org.aopalliance</shadedPattern>
</relocation>
<relocation>
<pattern>org.jvnet.hk2</pattern>
<shadedPattern>${rename.offset}.org.jvnet.hk2</shadedPattern>
</relocation>
</relocations>
<artifactSet>
<excludes>
@@ -92,6 +100,7 @@
<exclude>jakarta.annotation:jakarta.annotation-api</exclude>
<exclude>jakarta.validation:jakarta.validation-api</exclude>
<exclude>org.glassfish.hk2.external:jakarta.inject</exclude>
<exclude>org.javassist:javassist</exclude>
</excludes>
</artifactSet>
<transformers>
@@ -155,6 +164,11 @@
<artifactId>jersey-server</artifactId>
<version>${jersey.version}</version>
</dependency>
<dependency>
<groupId>org.glassfish.jersey.inject</groupId>
<artifactId>jersey-hk2</artifactId>
<version>${jersey.version}</version>
</dependency>
<dependency>
<groupId>jakarta.ws.rs</groupId>
<artifactId>jakarta.ws.rs-api</artifactId>
@@ -175,5 +189,10 @@
<artifactId>jakarta.inject</artifactId>
<version>${jakarta.inject.version}</version>
</dependency>
<dependency>
<groupId>org.javassist</groupId>
<artifactId>javassist</artifactId>
<version>${javassist.version}</version>
</dependency>
</dependencies>
</project>
@@ -72,6 +72,15 @@
<pattern>org.eclipse.jetty</pattern>
<shadedPattern>${rename.offset}.org.eclipse.jetty</shadedPattern>
</relocation>
<!--
This is for relocating the blacklist in
org.eclipse.jetty.webapp.WebAppContext.__dftServerClasses,
where we have a '-' in front of the class name
-->
<relocation>
<pattern>-org.eclipse.jetty</pattern>
<shadedPattern>-${rename.offset}.org.eclipse.jetty</shadedPattern>
</relocation>
</relocations>
<artifactSet>
<excludes>
@@ -95,6 +104,36 @@
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
<version>3.0.0</version>
<executions>
<!--
The webdefault.xml contains some jetty servlet classes which should also be relocated
-->
<execution>
<id>relocate-web-xml</id>
<phase>package</phase>
<configuration>
<target>
<echo message="unjar" />
<unzip src="${project.build.directory}/${project.artifactId}-${project.version}.jar" dest="${project.build.directory}/unpacked/" />
<echo message="Replace content in webdefault.xml" />
<replace file="${project.build.directory}/unpacked/${rename.offset.dir}/org/eclipse/jetty/webapp/webdefault.xml">
<replacetoken>org.eclipse.jetty</replacetoken>
<replacevalue>${rename.offset}.org.eclipse.jetty</replacevalue>
</replace>
<echo message="Redo jar" />
<jar destfile="${project.build.directory}/${project.artifactId}-${project.version}.jar" basedir="${project.build.directory}/unpacked" />
</target>
</configuration>
<goals>
<goal>run</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
<dependencies>
@@ -136,13 +136,14 @@
<commons-collections.version>4.4</commons-collections.version>
<error_prone_annotations.version>2.3.4</error_prone_annotations.version>
<gson.version>2.8.5</gson.version>
<jetty.version>9.4.30.v20200611</jetty.version>
<jetty.version>9.4.31.v20200723</jetty.version>
<servlet-api.version>3.1.0</servlet-api.version>
<jersey.version>2.31</jersey.version>
<jakarta.inject.version>2.6.1</jakarta.inject.version>
<jakarta.ws.rs-api.version>2.1.6</jakarta.ws.rs-api.version>
<jakarta.annotation-api.version>1.3.5</jakarta.annotation-api.version>
<jakarta.validation-api.version>2.0.2</jakarta.validation-api.version>
<javassist.version>3.25.0-GA</javassist.version>
</properties>
<build>
<pluginManagement>
@@ -230,7 +231,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>3.2.1</version>
<version>3.2.4</version>
</plugin>
</plugins>
</pluginManagement>

0 comments on commit d361fba

Please sign in to comment.