HBASE-24798 [hbase-thirdparty] Ignore module-info and SubmissionPublisher in enforceBytecodeVersion rule (#26)
Signed-off-by: Sean Busbey <busbey@apache.org>
diff --git a/hbase-shaded-jersey/pom.xml b/hbase-shaded-jersey/pom.xml
index 767a910..007f2d7 100644
--- a/hbase-shaded-jersey/pom.xml
+++ b/hbase-shaded-jersey/pom.xml
@@ -106,6 +106,37 @@
</execution>
</executions>
</plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-antrun-plugin</artifactId>
+ <version>3.0.0</version>
+ <executions>
+ <!--
+ There are some classes under META-INF in jersey-common jar, for supporting multiple jdks,
+ we should also relocate them.
+ -->
+ <execution>
+ <id>relocate-jersey-jdk11-support</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="Rename jersey versions in META-INF" />
+ <mkdir dir="${project.build.directory}/unpacked/META-INF/versions/11/${rename.offset.dir}" />
+ <move todir="${project.build.directory}/unpacked/META-INF/versions/11/${rename.offset.dir}">
+ <fileset dir="${project.build.directory}/unpacked/META-INF/versions/11" />
+ </move>
+ <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>
diff --git a/hbase-shaded-netty/pom.xml b/hbase-shaded-netty/pom.xml
index 27b5457..b27318c 100644
--- a/hbase-shaded-netty/pom.xml
+++ b/hbase-shaded-netty/pom.xml
@@ -111,7 +111,7 @@
-->
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
- <version>1.8</version>
+ <version>3.0.0</version>
<executions>
<execution>
<id>unpack</id>
diff --git a/pom.xml b/pom.xml
index 776133e..5a27a7a 100644
--- a/pom.xml
+++ b/pom.xml
@@ -249,6 +249,26 @@
</configuration>
</plugin>
<plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>build-helper-maven-plugin</artifactId>
+ <version>3.2.0</version>
+ <executions>
+ <execution>
+ <id>regex-property</id>
+ <goals>
+ <goal>regex-property</goal>
+ </goals>
+ <configuration>
+ <name>rename.offset.dir</name>
+ <value>${rename.offset}</value>
+ <regex>\.</regex>
+ <replacement>/</replacement>
+ <failIfNoMatch>false</failIfNoMatch>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-enforcer-plugin</artifactId>
<version>1.4.1</version>
@@ -326,6 +346,10 @@
<rules>
<enforceBytecodeVersion>
<maxJdkVersion>${compileSource}</maxJdkVersion>
+ <ignoreClasses>
+ <ignoreClass>module-info</ignoreClass>
+ <ignoreClass>**.glassfish.jersey.internal.jsr166.SubmissionPublisher*</ignoreClass>
+ </ignoreClasses>
<message>HBase has unsupported dependencies.
HBase requires that all dependencies be compiled with version ${compileSource} or earlier
of the JDK to properly build from source. You appear to be using a newer dependency. You can use