This is an automated email from the ASF dual-hosted git repository.

nihaljain pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/hbase-thirdparty.git


The following commit(s) were added to refs/heads/master by this push:
     new 6016e75  HBASE-29225 Add module for Jetty 12 with EE8 to 
hbase-thirdparty (#131)
6016e75 is described below

commit 6016e75d38312c9e78a4594d363c29ce24b82bc4
Author: Nihal Jain <[email protected]>
AuthorDate: Fri May 9 18:49:19 2025 +0530

    HBASE-29225 Add module for Jetty 12 with EE8 to hbase-thirdparty (#131)
    
    This change adds a new set of modules which we will need for Jetty 12 
migration. The code has been modularised into following modules:
    
    - `hbase-shaded-jetty-12-plus-core`: Contains shaded jetty 12 core jars
    - `hbase-shaded-jetty-12-plus-ee8`: Contains shaded jetty EE8 specific jars
    
    So basically:
    - Branches which want to consume EE8 may need to add 
`hbase-shaded-jetty-12-plus-core` and `hbase-shaded-jetty-12-plus-ee8` in their 
dependency replacing the former `hbase-shaded-jetty`
    - Branches which want to consume EE9/EE10 may need to add a new module for 
same in `hbase-thirdparty` in future
    
    Signed-off-by: Istvan Toth <[email protected]>
---
 hbase-shaded-jetty-12-plus-core/pom.xml | 223 ++++++++++++++++++++++++++++
 hbase-shaded-jetty-12-plus-ee8/pom.xml  | 252 ++++++++++++++++++++++++++++++++
 pom.xml                                 |   3 +
 3 files changed, 478 insertions(+)

diff --git a/hbase-shaded-jetty-12-plus-core/pom.xml 
b/hbase-shaded-jetty-12-plus-core/pom.xml
new file mode 100644
index 0000000..70c70fd
--- /dev/null
+++ b/hbase-shaded-jetty-12-plus-core/pom.xml
@@ -0,0 +1,223 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0"; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; 
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 
http://maven.apache.org/maven-v4_0_0.xsd";>
+  <!--
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+
+  ON MVN COMPILE NOT WORKING
+
+  If you wondering why 'mvn compile' does not work building HBase
+  (in particular, if you are doing it for the first time), instead do
+  'mvn package'.  If you are interested in the full story, see
+  https://issues.apache.org/jira/browse/HBASE-6795.
+
+-->
+  <modelVersion>4.0.0</modelVersion>
+  <parent>
+    <groupId>org.apache.hbase.thirdparty</groupId>
+    <artifactId>hbase-thirdparty</artifactId>
+    <version>${revision}</version>
+    <relativePath>..</relativePath>
+  </parent>
+  <artifactId>hbase-shaded-jetty-12-plus-core</artifactId>
+  <name>Apache HBase Relocated (Shaded) Jetty 12+ Libs: Core</name>
+  <description>Pulls down Jetty core, relocates it and makes a far 
jar.</description>
+  <dependencies>
+    <dependency>
+      <groupId>org.eclipse.jetty</groupId>
+      <artifactId>jetty-server</artifactId>
+      <version>${jetty-12-plus.version}</version>
+      <exclusions>
+        <exclusion>
+          <groupId>org.slf4j</groupId>
+          <artifactId>slf4j-api</artifactId>
+        </exclusion>
+      </exclusions>
+    </dependency>
+    <dependency>
+      <groupId>org.eclipse.jetty</groupId>
+      <artifactId>jetty-http</artifactId>
+      <version>${jetty-12-plus.version}</version>
+      <exclusions>
+        <exclusion>
+          <groupId>org.slf4j</groupId>
+          <artifactId>slf4j-api</artifactId>
+        </exclusion>
+      </exclusions>
+    </dependency>
+    <dependency>
+      <groupId>org.eclipse.jetty</groupId>
+      <artifactId>jetty-util</artifactId>
+      <version>${jetty-12-plus.version}</version>
+      <exclusions>
+        <exclusion>
+          <groupId>org.slf4j</groupId>
+          <artifactId>slf4j-api</artifactId>
+        </exclusion>
+      </exclusions>
+    </dependency>
+    <dependency>
+      <groupId>org.eclipse.jetty</groupId>
+      <artifactId>jetty-io</artifactId>
+      <version>${jetty-12-plus.version}</version>
+      <exclusions>
+        <exclusion>
+          <groupId>org.slf4j</groupId>
+          <artifactId>slf4j-api</artifactId>
+        </exclusion>
+      </exclusions>
+    </dependency>
+    <dependency>
+      <groupId>org.eclipse.jetty</groupId>
+      <artifactId>jetty-jmx</artifactId>
+      <version>${jetty-12-plus.version}</version>
+      <exclusions>
+        <exclusion>
+          <groupId>org.slf4j</groupId>
+          <artifactId>slf4j-api</artifactId>
+        </exclusion>
+      </exclusions>
+    </dependency>
+    <dependency>
+      <groupId>org.eclipse.jetty</groupId>
+      <artifactId>jetty-util-ajax</artifactId>
+      <version>${jetty-12-plus.version}</version>
+      <exclusions>
+        <exclusion>
+          <groupId>org.slf4j</groupId>
+          <artifactId>slf4j-api</artifactId>
+        </exclusion>
+      </exclusions>
+    </dependency>
+    <dependency>
+      <groupId>org.eclipse.jetty</groupId>
+      <artifactId>jetty-security</artifactId>
+      <version>${jetty-12-plus.version}</version>
+      <exclusions>
+        <exclusion>
+          <groupId>org.slf4j</groupId>
+          <artifactId>slf4j-api</artifactId>
+        </exclusion>
+      </exclusions>
+    </dependency>
+    <dependency>
+      <groupId>org.eclipse.jetty</groupId>
+      <artifactId>jetty-session</artifactId>
+      <version>${jetty-12-plus.version}</version>
+      <exclusions>
+        <exclusion>
+          <groupId>org.slf4j</groupId>
+          <artifactId>slf4j-api</artifactId>
+        </exclusion>
+      </exclusions>
+    </dependency>
+  <dependency>
+    <groupId>org.eclipse.jetty</groupId>
+    <artifactId>jetty-ee</artifactId>
+    <version>${jetty-12-plus.version}</version>
+    <exclusions>
+      <exclusion>
+        <groupId>org.slf4j</groupId>
+        <artifactId>slf4j-api</artifactId>
+      </exclusion>
+    </exclusions>
+  </dependency>
+    <dependency>
+    <groupId>org.eclipse.jetty</groupId>
+    <artifactId>jetty-xml</artifactId>
+    <version>${jetty-12-plus.version}</version>
+      <exclusions>
+        <exclusion>
+          <groupId>org.slf4j</groupId>
+          <artifactId>slf4j-api</artifactId>
+        </exclusion>
+      </exclusions>
+    </dependency>
+  </dependencies>
+  <build>
+    <plugins>
+      <plugin>
+        <artifactId>maven-clean-plugin</artifactId>
+        <configuration>
+          <filesets>
+            <fileset>
+              <directory>${basedir}</directory>
+              <includes>
+                <include>dependency-reduced-pom.xml</include>
+              </includes>
+            </fileset>
+          </filesets>
+        </configuration>
+      </plugin>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-shade-plugin</artifactId>
+        <executions>
+          <execution>
+            <goals>
+              <goal>shade</goal>
+            </goals>
+            <phase>package</phase>
+            <configuration>
+              <shadeSourcesContent>true</shadeSourcesContent>
+              <createSourcesJar>true</createSourcesJar>
+              <relocations>
+                <relocation>
+                  <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>
+                  <!--
+                     Anything added here needs to be excluded from the jar 
that pulls it in
+                     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>org.slf4j:slf4j-api</exclude>
+                 <!-- On the "next" build, exclude a lingering shaded jar if 
it exists (user did not `clean`).
+                   Maven will happily pick up the previous shaded jar and try 
to include that in the N+1th build
+                   if we don't exclude it. This will result in a failure in 
the ServicesResourceTransformer claiming
+                   that we've already packaged a services file once. -->
+                  
<exclude>org.apache.hbase.thirdparty:hbase-shaded-jetty-12-plus-core</exclude>
+                </excludes>
+              </artifactSet>
+              <transformers>
+                <transformer 
implementation="org.apache.maven.plugins.shade.resource.ApacheLicenseResourceTransformer"/>
+                <transformer 
implementation="org.apache.maven.plugins.shade.resource.ApacheNoticeResourceTransformer">
+                  <addHeader>false</addHeader>
+                </transformer>
+                <transformer 
implementation="org.apache.maven.plugins.shade.resource.ServicesResourceTransformer"/>
+              </transformers>
+            </configuration>
+          </execution>
+        </executions>
+      </plugin>
+    </plugins>
+  </build>
+</project>
diff --git a/hbase-shaded-jetty-12-plus-ee8/pom.xml 
b/hbase-shaded-jetty-12-plus-ee8/pom.xml
new file mode 100644
index 0000000..e6cf5e6
--- /dev/null
+++ b/hbase-shaded-jetty-12-plus-ee8/pom.xml
@@ -0,0 +1,252 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0"; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; 
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 
http://maven.apache.org/maven-v4_0_0.xsd";>
+  <!--
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+
+  ON MVN COMPILE NOT WORKING
+
+  If you wondering why 'mvn compile' does not work building HBase
+  (in particular, if you are doing it for the first time), instead do
+  'mvn package'.  If you are interested in the full story, see
+  https://issues.apache.org/jira/browse/HBASE-6795.
+
+-->
+  <modelVersion>4.0.0</modelVersion>
+  <parent>
+    <groupId>org.apache.hbase.thirdparty</groupId>
+    <artifactId>hbase-thirdparty</artifactId>
+    <version>${revision}</version>
+    <relativePath>..</relativePath>
+  </parent>
+  <artifactId>hbase-shaded-jetty-12-plus-ee8</artifactId>
+  <name>Apache HBase Relocated (Shaded) Jetty 12+ Libs: EE8</name>
+  <description>Pulls down Jetty EE8, relocates it and makes a far 
jar.</description>
+  <dependencies>
+    <dependency>
+      <groupId>org.eclipse.jetty.ee8</groupId>
+      <artifactId>jetty-ee8-servlet</artifactId>
+      <version>${jetty-12-plus.version}</version>
+      <exclusions>
+        <exclusion>
+          <groupId>org.eclipse.jetty</groupId>
+          <artifactId>servlet-api</artifactId>
+        </exclusion>
+        <exclusion>
+          <groupId>org.slf4j</groupId>
+          <artifactId>slf4j-api</artifactId>
+        </exclusion>
+      </exclusions>
+    </dependency>
+    <dependency>
+      <groupId>org.eclipse.jetty.ee8</groupId>
+      <artifactId>jetty-ee8-security</artifactId>
+      <version>${jetty-12-plus.version}</version>
+      <exclusions>
+        <exclusion>
+          <groupId>org.slf4j</groupId>
+          <artifactId>slf4j-api</artifactId>
+        </exclusion>
+      </exclusions>
+    </dependency>
+    <dependency>
+      <groupId>org.eclipse.jetty.ee8</groupId>
+      <artifactId>jetty-ee8-nested</artifactId>
+      <version>${jetty-12-plus.version}</version>
+      <exclusions>
+        <exclusion>
+          <groupId>org.slf4j</groupId>
+          <artifactId>slf4j-api</artifactId>
+        </exclusion>
+      </exclusions>
+    </dependency>
+    <dependency>
+      <groupId>org.eclipse.jetty.ee8</groupId>
+      <artifactId>jetty-ee8-webapp</artifactId>
+      <version>${jetty-12-plus.version}</version>
+      <exclusions>
+        <exclusion>
+          <groupId>org.slf4j</groupId>
+          <artifactId>slf4j-api</artifactId>
+        </exclusion>
+      </exclusions>
+    </dependency>
+    <!-- List to dependencies which are part of core and we want to avoid 
bundling,
+    hence keeping as provided here -->
+    <dependency>
+      <groupId>org.eclipse.jetty</groupId>
+      <artifactId>jetty-server</artifactId>
+      <version>${jetty-12-plus.version}</version>
+      <scope>provided</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.eclipse.jetty</groupId>
+      <artifactId>jetty-http</artifactId>
+      <version>${jetty-12-plus.version}</version>
+      <scope>provided</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.eclipse.jetty</groupId>
+      <artifactId>jetty-util</artifactId>
+      <version>${jetty-12-plus.version}</version>
+      <scope>provided</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.eclipse.jetty</groupId>
+      <artifactId>jetty-io</artifactId>
+      <version>${jetty-12-plus.version}</version>
+      <scope>provided</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.eclipse.jetty</groupId>
+      <artifactId>jetty-jmx</artifactId>
+      <version>${jetty-12-plus.version}</version>
+      <scope>provided</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.eclipse.jetty</groupId>
+      <artifactId>jetty-util-ajax</artifactId>
+      <version>${jetty-12-plus.version}</version>
+      <scope>provided</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.eclipse.jetty</groupId>
+      <artifactId>jetty-security</artifactId>
+      <version>${jetty-12-plus.version}</version>
+      <scope>provided</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.eclipse.jetty</groupId>
+      <artifactId>jetty-session</artifactId>
+      <version>${jetty-12-plus.version}</version>
+      <scope>provided</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.eclipse.jetty</groupId>
+      <artifactId>jetty-ee</artifactId>
+      <version>${jetty-12-plus.version}</version>
+      <scope>provided</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.eclipse.jetty</groupId>
+      <artifactId>jetty-xml</artifactId>
+      <version>${jetty-12-plus.version}</version>
+      <scope>provided</scope>
+    </dependency>
+  </dependencies>
+  <build>
+    <plugins>
+      <plugin>
+        <artifactId>maven-clean-plugin</artifactId>
+        <configuration>
+          <filesets>
+            <fileset>
+              <directory>${basedir}</directory>
+              <includes>
+                <include>dependency-reduced-pom.xml</include>
+              </includes>
+            </fileset>
+          </filesets>
+        </configuration>
+      </plugin>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-shade-plugin</artifactId>
+        <executions>
+          <execution>
+            <goals>
+              <goal>shade</goal>
+            </goals>
+            <phase>package</phase>
+            <configuration>
+              <shadeSourcesContent>true</shadeSourcesContent>
+              <createSourcesJar>true</createSourcesJar>
+              <relocations>
+                <relocation>
+                  <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>
+                  <!--
+                     Anything added here needs to be excluded from the jar 
that pulls it in
+                     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>org.slf4j:slf4j-api</exclude>
+                  <!-- On the "next" build, exclude a lingering shaded jar if 
it exists (user did not `clean`).
+                    Maven will happily pick up the previous shaded jar and try 
to include that in the N+1th build
+                    if we don't exclude it. This will result in a failure in 
the ServicesResourceTransformer claiming
+                    that we've already packaged a services file once. -->
+                  
<exclude>org.apache.hbase.thirdparty:hbase-shaded-jetty-12-plus-ee8</exclude>
+                </excludes>
+              </artifactSet>
+              <transformers>
+                <transformer 
implementation="org.apache.maven.plugins.shade.resource.ApacheLicenseResourceTransformer"/>
+                <transformer 
implementation="org.apache.maven.plugins.shade.resource.ApacheNoticeResourceTransformer">
+                  <addHeader>false</addHeader>
+                </transformer>
+                <transformer 
implementation="org.apache.maven.plugins.shade.resource.ServicesResourceTransformer"/>
+              </transformers>
+            </configuration>
+          </execution>
+        </executions>
+      </plugin>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-antrun-plugin</artifactId>
+        <executions>
+          <!--
+          The webdefault-ee8.xml contains some jetty servlet classes which 
should also be relocated
+          -->
+          <execution>
+            <id>relocate-web-xml</id>
+            <goals>
+              <goal>run</goal>
+            </goals>
+            <phase>package</phase>
+            <configuration>
+              <target>
+                <echo message="unjar"/>
+                <unzip dest="${project.build.directory}/unpacked/" 
src="${project.build.directory}/${project.artifactId}-${project.version}.jar"/>
+                <echo message="Replace content in webdefault-ee8.xml"/>
+                <replace 
file="${project.build.directory}/unpacked/${rename.offset.dir}/org/eclipse/jetty/ee8/webapp/webdefault-ee8.xml">
+                  <replacetoken>org.eclipse.jetty</replacetoken>
+                  
<replacevalue>${rename.offset}.org.eclipse.jetty</replacevalue>
+                </replace>
+                <echo message="Redo jar"/>
+                <jar basedir="${project.build.directory}/unpacked" 
destfile="${project.build.directory}/${project.artifactId}-${project.version}.jar"/>
+              </target>
+            </configuration>
+          </execution>
+        </executions>
+      </plugin>
+    </plugins>
+  </build>
+</project>
diff --git a/pom.xml b/pom.xml
index 89fe06d..ccbf515 100644
--- a/pom.xml
+++ b/pom.xml
@@ -100,6 +100,8 @@
     <module>hbase-shaded-gson</module>
     <module>hbase-shaded-miscellaneous</module>
     <module>hbase-shaded-jetty</module>
+    <module>hbase-shaded-jetty-12-plus-core</module>
+    <module>hbase-shaded-jetty-12-plus-ee8</module>
     <module>hbase-shaded-jersey</module>
     <module>hbase-shaded-jackson-jaxrs-json-provider</module>
     <module>hbase-noop-htrace</module>
@@ -139,6 +141,7 @@
     <error_prone_annotations.version>2.36.0</error_prone_annotations.version>
     <gson.version>2.11.0</gson.version>
     <jetty.version>9.4.56.v20240826</jetty.version>
+    <jetty-12-plus.version>12.0.20</jetty-12-plus.version>
     <servlet-api.version>3.1.0</servlet-api.version>
     <jersey.version>2.46</jersey.version>
     <jakarta.inject.version>2.6.1</jakarta.inject.version>

Reply via email to