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

stoty pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/phoenix.git


The following commit(s) were added to refs/heads/master by this push:
     new d0ed96f2aa PHOENIX-7141 Use relocate by default for phoenix-server 
shading
d0ed96f2aa is described below

commit d0ed96f2aa23c487f60207062835183e35cabfb4
Author: Istvan Toth <st...@apache.org>
AuthorDate: Fri Jan 5 08:28:36 2024 +0100

    PHOENIX-7141 Use relocate by default for phoenix-server shading
---
 phoenix-server/pom.xml | 672 +++++++++++++++++++++++++++++++------------------
 1 file changed, 429 insertions(+), 243 deletions(-)

diff --git a/phoenix-server/pom.xml b/phoenix-server/pom.xml
index e61af7d963..6c48589fad 100644
--- a/phoenix-server/pom.xml
+++ b/phoenix-server/pom.xml
@@ -39,294 +39,470 @@
   </properties>
 
   <build>
+    <pluginManagement>
+      <plugins>
+        <plugin>
+          <groupId>org.apache.maven.plugins</groupId>
+          <artifactId>maven-site-plugin</artifactId>
+          <configuration>
+            <skip>true</skip>
+          </configuration>
+        </plugin>
+        <plugin>
+          <!-- RAT gets really confused on the shaded subprojects,
+          and there is nothing to audit here -->
+          <groupId>org.apache.rat</groupId>
+          <artifactId>apache-rat-plugin</artifactId>
+          <configuration>
+            <skip>true</skip>
+          </configuration>
+        </plugin>
+        <plugin>
+          <groupId>org.apache.maven.plugins</groupId>
+          <artifactId>maven-jar-plugin</artifactId>
+        </plugin>
+        <plugin>
+          <groupId>org.apache.maven.plugins</groupId>
+          <artifactId>maven-dependency-plugin</artifactId>
+          <configuration>
+            <ignoredDependencies>
+              <ignoredDependency>*</ignoredDependency>
+            </ignoredDependencies>
+           </configuration>
+        </plugin>
+        <plugin>
+          <groupId>org.apache.maven.plugins</groupId>
+          <artifactId>maven-shade-plugin</artifactId>
+          <configuration>
+            <filters>
+              <filter>
+                <artifact>*:*</artifact>
+                <excludes>
+                  <exclude>META-INF/*.SF</exclude>
+                  <exclude>META-INF/*.DSA</exclude>
+                  <exclude>META-INF/*.RSA</exclude>
+                  <exclude>META-INF/license/*</exclude>
+                  <exclude>META-INF/NOTICE</exclude>
+                  <exclude>LICENSE.*</exclude>
+                  <exclude>NOTICE.*</exclude>
+                  <exclude>NOTICE</exclude>
+                  <exclude>README*</exclude>
+                </excludes>
+              </filter>
+             <filter>
+                <artifact>org.apache.hadoop:hadoop-yarn-common</artifact>
+                <excludes>
+                  
<exclude>org/apache/hadoop/yarn/factories/package-info.class</exclude>
+                  
<exclude>org/apache/hadoop/yarn/util/package-info.class</exclude>
+                  
<exclude>org/apache/hadoop/yarn/factory/providers/package-info.class</exclude>
+                  
<exclude>org/apache/hadoop/yarn/client/api/impl/package-info.class</exclude>
+                  
<exclude>org/apache/hadoop/yarn/client/api/package-info.class</exclude>
+                  <exclude>webapps/**</exclude>
+                </excludes>
+              </filter>
+              <!-- Phoenix specific -->
+              <filter>
+                <artifact>org.apache.commons:commons-math3</artifact>
+                <excludes>
+                  <exclude>assets/**</exclude>
+                </excludes>
+              </filter>
+              <filter>
+                <artifact>org.apache.hbase:hbase-server</artifact>
+                <excludes>
+                  <exclude>hbase-webapps/**</exclude>
+                </excludes>
+              </filter>
+              <filter>
+                <artifact>org.apache.hbase.thirdparty:*</artifact>
+                <excludes>
+                  <exclude>/**</exclude>
+                  <exclude>webapps/**</exclude>
+                </excludes>
+              </filter>
+              <!-- Phoenix specific -->
+            </filters>
+            <transformers>
+              <transformer
+                  
implementation="org.apache.maven.plugins.shade.resource.ServicesResourceTransformer"
 />
+              <transformer
+                  
implementation="org.apache.maven.plugins.shade.resource.IncludeResourceTransformer">
+                <resource>csv-bulk-load-config.properties</resource>
+                <file>
+                  ${project.basedir}/../config/csv-bulk-load-config.properties
+                </file>
+              </transformer>
+              <transformer
+                  
implementation="org.apache.maven.plugins.shade.resource.IncludeResourceTransformer">
+                <resource>README.md</resource>
+                <file>${project.basedir}/../README.md</file>
+              </transformer>
+              <transformer
+                  
implementation="org.apache.maven.plugins.shade.resource.IncludeResourceTransformer">
+                <resource>LICENSE.txt</resource>
+                <file>${project.basedir}/../LICENSE</file>
+              </transformer>
+              <transformer
+                  
implementation="org.apache.maven.plugins.shade.resource.IncludeResourceTransformer">
+                <resource>NOTICE</resource>
+                <file>${project.basedir}/../NOTICE</file>
+              </transformer>
+            </transformers>
+            <relocations>
+              <relocation>
+                <pattern>org/</pattern>
+                <shadedPattern>${shaded.package}.org.</shadedPattern>
+                <excludes>
+                  <exclude>org/apache/hadoop/**</exclude>
+                  <!-- Our non-shaded htrace and logging libraries -->
+                  <exclude>org/apache/htrace/**</exclude>
+                  <exclude>org/slf4j/**</exclude>
+                  <exclude>org/apache/commons/logging/**</exclude>
+                  <exclude>org/apache/log4j/**</exclude>
+                  <exclude>org/apache/logging/log4j/**</exclude>
+                  <!-- Not the org/ packages that are a part of the jdk -->
+                  <exclude>org/ietf/jgss/**</exclude>
+                  <exclude>org/omg/**</exclude>
+                  <exclude>org/w3c/dom/**</exclude>
+                  <exclude>org/xml/sax/**</exclude>
+                  <!-- Not needed for client, we set this to provided -->
+                  <exclude>org/eclipse/jetty/**</exclude>
+                  <!-- Extras compared to Hadoop -->
+                  <!-- Hbase classes  -->
+                  <exclude>org/apache/hbase/**</exclude>
+                  <!-- Phoenix classes -->
+                  <exclude>org/apache/phoenix/**</exclude>
+                  <!-- We are assuming that the Omid coprocessors are not 
added separately -->
+                  <exclude>org/apache/omid/**</exclude>
+                  <!-- See PHOENIX-7118
+                 We expect this to come from the unshaded hadoop on the 
classpath.
+                 That is always true for the HBase server classpath -->
+                <exclude>org/apache/commons/configuration2/**</exclude>
+                </excludes>
+              </relocation>
+              <!-- We use the relocate-by default settings from -client, 
instead of relocating
+              one-by-one as in phoenix-mapreduce, because we have unshaded 
protobuf 2.5.0 on the
+              classpath, and don't need special handling for it -->
+              <relocation>
+                <pattern>com/</pattern>
+                <shadedPattern>${shaded.package}.com.</shadedPattern>
+                <excludes>
+                  <!-- Not the com/ packages that are a part of particular jdk 
implementations -->
+                  <exclude>com/sun/tools/**</exclude>
+                  <exclude>com/sun/javadoc/**</exclude>
+                  <exclude>com/sun/security/**</exclude>
+                  <exclude>com/sun/jndi/**</exclude>
+                  <exclude>com/sun/management/**</exclude>
+                  <exclude>com/sun/management/**</exclude>
+                  <!-- Protobuf 2.5.0 is already on the HBase server classpath 
-->
+                  <groupId>com/google/protobuf/**</groupId>
+                </excludes>
+              </relocation>
+              <relocation>
+                <pattern>io/</pattern>
+                <shadedPattern>${shaded.package}.io.</shadedPattern>
+                <excludes>
+                  <!-- Exclude config keys for Hadoop that look like package 
names -->
+                  <exclude>io/compression/**</exclude>
+                  <exclude>io/mapfile/**</exclude>
+                  <exclude>io/map/index/*</exclude>
+                  <exclude>io/seqfile/**</exclude>
+                  <exclude>io/file/buffer/size</exclude>
+                  <exclude>io/skip/checksum/errors</exclude>
+                  <exclude>io/sort/*</exclude>
+                  <exclude>io/serializations</exclude>
+                </excludes>
+              </relocation>
+              <!-- JSRs that haven't made it to inclusion in J2SE -->
+              <relocation>
+                <pattern>javax/el/</pattern>
+                <shadedPattern>${shaded.package}.javax.el.</shadedPattern>
+              </relocation>
+              <relocation>
+                <pattern>javax/cache/</pattern>
+                <shadedPattern>${shaded.package}.javax.cache.</shadedPattern>
+              </relocation>
+              <relocation>
+                <pattern>javax/servlet/jsp/</pattern>
+                
<shadedPattern>${shaded.package}.javax.servlet.jsp.</shadedPattern>
+              </relocation>
+              <relocation>
+                <pattern>javax/ws/</pattern>
+                <shadedPattern>${shaded.package}.javax.ws.</shadedPattern>
+              </relocation>
+              <relocation>
+                <pattern>javax/annotation/</pattern>
+                
<shadedPattern>${shaded.package}.javax.annotation.</shadedPattern>
+              </relocation>
+              <relocation>
+                <pattern>javax/inject/</pattern>
+                <shadedPattern>${shaded.package}.javax.inject.</shadedPattern>
+              </relocation>
+              <relocation>
+                <pattern>javax/validation/</pattern>
+                
<shadedPattern>${shaded.package}.javax.validation.</shadedPattern>
+              </relocation>
+              <relocation>
+                <pattern>javax/xml/bind/</pattern>
+                
<shadedPattern>${shaded.package}.javax.xml.bind.</shadedPattern>
+              </relocation>
+              <relocation>
+                <pattern>javax/activation/</pattern>
+                
<shadedPattern>${shaded.package}.javax.activation.</shadedPattern>
+              </relocation>
+              <relocation>
+                <pattern>net/</pattern>
+                <shadedPattern>${shaded.package}.net.</shadedPattern>
+                <excludes>
+                  <!-- Exclude config keys for Hadoop that look like package 
names -->
+                  <exclude>net/topology/**</exclude>
+                </excludes>
+              </relocation>
+              <!-- okio declares a top level package instead of nested -->
+              <relocation>
+                <pattern>okio/</pattern>
+                <shadedPattern>${shaded.package}.okio.</shadedPattern>
+              </relocation>
+              <!-- Phoenix specific relocations -->
+              <relocation>
+                <pattern>it/</pattern>
+                <shadedPattern>${shaded.package}.it.</shadedPattern>
+              </relocation>
+              <relocation>
+                <pattern>javassist/</pattern>
+                <shadedPattern>${shaded.package}.javassist.</shadedPattern>
+              </relocation>
+              <relocation>
+                <pattern>jersey/</pattern>
+                <shadedPattern>${shaded.package}.jersey.</shadedPattern>
+              </relocation>
+              <relocation>
+                <pattern>jline/</pattern>
+                <shadedPattern>${shaded.package}.jline.</shadedPattern>
+              </relocation>
+              <relocation>
+                <pattern>mozilla/</pattern>
+                <shadedPattern>${shaded.package}.mozilla.</shadedPattern>
+              </relocation>
+              <relocation>
+                <pattern>tables/</pattern>
+                <shadedPattern>${shaded.package}.tables.</shadedPattern>
+              </relocation>
+              <!-- Phoenix specific relocations end -->
+            </relocations>
+          </configuration>
+        </plugin>
+      </plugins>
+    </pluginManagement>
     <plugins>
-      <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-site-plugin</artifactId>
-        <configuration>
-          <skip>true</skip>
-        </configuration>
-      </plugin>
-      <plugin>
-        <!--Make it so assembly:single does nothing in here-->
-        <artifactId>maven-assembly-plugin</artifactId>
-        <configuration>
-          <skipAssembly>true</skipAssembly>
-        </configuration>
-      </plugin>
-      <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-jar-plugin</artifactId>
-      </plugin>
-      <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-install-plugin</artifactId>
-      </plugin>
-      <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-dependency-plugin</artifactId>
-        <configuration>
-          <ignoredDependencies>
-            <ignoredDependency>*</ignoredDependency>
-          </ignoredDependencies>
-        </configuration>
-      </plugin>
       <plugin>
         <groupId>org.apache.maven.plugins</groupId>
         <artifactId>maven-shade-plugin</artifactId>
         <executions>
           <execution>
+            <id>server-shaded</id>
             <phase>package</phase>
             <goals>
               <goal>shade</goal>
             </goals>
             <configuration>
-                
<dependencyReducedPomLocation>${basedir}/target/pom.xml</dependencyReducedPomLocation>
-                
<promoteTransitiveDependencies>true</promoteTransitiveDependencies>
-                <shadeTestJar>false</shadeTestJar>
-                <transformers>
-                    <transformer
-                            
implementation="org.apache.maven.plugins.shade.resource.ApacheNoticeResourceTransformer">
-                        <addHeader>false</addHeader>
-                    </transformer>
-                    <transformer
-                              
implementation="org.apache.maven.plugins.shade.resource.IncludeResourceTransformer">
-                        <resource>LICENSE.txt</resource>
-                        <file>${project.basedir}/../LICENSE</file>
-                    </transformer>
-                    <transformer
-                              
implementation="org.apache.maven.plugins.shade.resource.IncludeResourceTransformer">
-                        <resource>NOTICE</resource>
-                        <file>${project.basedir}/../NOTICE</file>
-                    </transformer>
-                    <transformer 
implementation="org.apache.maven.plugins.shade.resource.ServicesResourceTransformer"/>
-                </transformers>
-                <artifactSet>
-                    <includes>
-                        <include>*:*</include>
-                    </includes>
-                    <!-- Exclude things that would be available in the 
standard location on the hbase classpath.
-                         This does *not* exclude transitive dependencies for 
these. To exclude an entire "tree"
-                         of dependencies, we need to mark those as "provided" 
dependencies below. -->
-                    <excludes>
-                        <exclude>junit:junit</exclude>
-                        <exclude>org.hamcrest:hamcrest-core</exclude>
-                        <exclude>jline:jline</exclude>
-                        <exclude>org.eclipse.jetty:*</exclude>
-                        <exclude>org.apache.phoenix:phoenix-server</exclude>
-                        <exclude>sqlline:sqlline</exclude>
-                        <exclude>log4j:*</exclude>
-                        <exclude>ch.qos.reload4j:*</exclude>
-                        <exclude>org.slf4j:*</exclude>
-                        <exclude>org.apache.logging.log4j:*</exclude>
-                        <exclude>org.apache.hbase.thirdparty:*</exclude>
-                    </excludes>
-                </artifactSet>
-                <filters>
-                    <filter>
-                        <artifact>*:*</artifact>
-                        <excludes>
-                            <exclude>META-INF/*.SF</exclude>
-                            <exclude>META-INF/*.DSA</exclude>
-                            <exclude>META-INF/*.RSA</exclude>
-                            <exclude>META-INF/license/*</exclude>
-                            <exclude>LICENSE.*</exclude>
-                            <exclude>NOTICE.*</exclude>
-                            <exclude>NOTICE</exclude>
-                        </excludes>
-                    </filter>
-                </filters>
-                <relocations>
-                    <relocation>
-                      <pattern>org.apache.commons</pattern>
-                      
<shadedPattern>${shaded.package}.org.apache.commons</shadedPattern>
-                      <excludes>
-                        <exclude>org.apache.commons.csv.**</exclude>
-                        <exclude>org.apache.commons.logging.**</exclude>
-                        <exclude>org.apache.commons.configuration.**</exclude>
-                        <exclude>org.apache.commons.configuration2.**</exclude>
-                      </excludes>
-                    </relocation>
-                    <relocation>
-                      <pattern>org.apache.htrace</pattern>
-                      
<shadedPattern>${shaded.package}.org.apache.htrace</shadedPattern>
-                    </relocation>
-                    <relocation>
-                      <pattern>org.apache.http</pattern>
-                      
<shadedPattern>${shaded.package}.org.apache.http</shadedPattern>
-                    </relocation>
-                    <relocation>
-                      <pattern>org.antlr</pattern>
-                      
<shadedPattern>${shaded.package}.org.antlr</shadedPattern>
-                    </relocation>
-                    <relocation>
-                      <pattern>org.iq80</pattern>
-                      <shadedPattern>${shaded.package}.org.iq80</shadedPattern>
-                    </relocation>
-                    <relocation>
-                      <pattern>org.jcodings</pattern>
-                      
<shadedPattern>${shaded.package}.org.jcodings</shadedPattern>
-                    </relocation>
-                    <relocation>
-                      <pattern>org.joda</pattern>
-                      <shadedPattern>${shaded.package}.org.joda</shadedPattern>
-                    </relocation>
-                    <relocation>
-                        <pattern>org.apache.omid</pattern>
-                        
<shadedPattern>${shaded.package}.org.apache.omid</shadedPattern>
-                    </relocation>
-                    <relocation>
-                        <pattern>org.apache.commons-collections4</pattern>
-                        
<shadedPattern>${shaded.package}.org.apache.commons-collections4</shadedPattern>
-                    </relocation>
-                    <relocation>
-                        <pattern>org.jboss.netty:netty</pattern>
-                        
<shadedPattern>${shaded.package}.org.jboss.netty:netty</shadedPattern>
-                    </relocation>
-
-                    <relocation>
-                      <!-- This would shade protobuf, but we don't package it 
as hbase provides it
-                           for all CPEPs. Similarly, we need to exclude the 
package so that
-                           Phoenix looks for it in the "standard" package. -->
-                      <pattern>com.google</pattern>
-                      
<shadedPattern>${shaded.package}.com.google</shadedPattern>
-                      <excludes>
-                        <exclude>com.google.protobuf.**</exclude>
-                      </excludes>
-                    </relocation>
-                    <relocation>
-                      <pattern>com.codahale.metrics</pattern>
-                      
<shadedPattern>${shaded.package}.com.codahale.metrics</shadedPattern>
-                    </relocation>
-                    <relocation>
-                      <pattern>it.unimi.dsi.fastutil</pattern>
-                      
<shadedPattern>${shaded.package}.it.unimi.dsi.fastutil</shadedPattern>
-                    </relocation>
-                    <relocation>
-                      <pattern>com.ibm.icu</pattern>
-                      
<shadedPattern>${shaded.package}.com.ibm.icu</shadedPattern>
-                    </relocation>
-                    <relocation>
-                      <pattern>com.force</pattern>
-                      
<shadedPattern>${shaded.package}.com.force</shadedPattern>
-                    </relocation>
-                    <relocation>
-                      <pattern>com.clearspring</pattern>
-                      
<shadedPattern>${shaded.package}.com.clearspring</shadedPattern>
-                    </relocation>
-                    <relocation>
-                      <pattern>org.joni</pattern>
-                      <shadedPattern>${shaded.package}.org.joni</shadedPattern>
-                    </relocation>
-                    <relocation>
-                      <pattern>org.jcodings</pattern>
-                      
<shadedPattern>${shaded.package}.org.jcodings</shadedPattern>
-                    </relocation>
-                    <relocation>
-                      <pattern>org.iq80.snappy</pattern>
-                      
<shadedPattern>${shaded.package}.org.iq80.snappy</shadedPattern>
-                    </relocation>
-                    <relocation>
-                      <pattern>edu.umd.cs.findbugs.annotations</pattern>
-                      
<shadedPattern>${shaded.package}.edu.umd.cs.findbugs.annotations</shadedPattern>
-                    </relocation>
-                    <relocation>
-                      <pattern>net.jcip.annotations</pattern>
-                      
<shadedPattern>${shaded.package}.net.jcip.annotations</shadedPattern>
-                    </relocation>
-                    <relocation>
-                      <pattern>com.fasterxml.jackson</pattern>
-                      
<shadedPattern>${shaded.package}.com.fasterxml.jackson</shadedPattern>
-                    </relocation>
-                    <relocation>
-                      <pattern>javax.annotation</pattern>
-                      
<shadedPattern>${shaded.package}.javax.annotation</shadedPattern>
-                    </relocation>
-                    <relocation>
-                      <pattern>com.lmax.disruptor</pattern>
-                      
<shadedPattern>${shaded.package}.com.lmax.disruptor</shadedPattern>
-                    </relocation>
-                    <relocation>
-                      <pattern>javax.servlet</pattern>
-                      
<shadedPattern>${shaded.package}.javax.servlet</shadedPattern>
-                    </relocation>
-                    <relocation>
-                      <pattern>org.aopalliance</pattern>
-                      
<shadedPattern>${shaded.package}.org.aopalliance</shadedPattern>
-                    </relocation>
-                    <relocation>
-                      <pattern>org.objectweb.asm</pattern>
-                      
<shadedPattern>${shaded.package}.org.objectweb.asm</shadedPattern>
-                    </relocation>
-                </relocations>
+              
<promoteTransitiveDependencies>true</promoteTransitiveDependencies>
+              <shadeTestJar>false</shadeTestJar>
+              <createSourcesJar>true</createSourcesJar>
+              
<dependencyReducedPomLocation>${basedir}/target/pom.xml</dependencyReducedPomLocation>
+              <artifactSet>
+                <includes>
+                  <include>*:*</include>
+                </includes>
+                <excludes>
+                  <exclude>org.apache.phoenix:phoenix-client</exclude>
+                  <exclude>xom:xom</exclude>
+                </excludes>
+              </artifactSet>
             </configuration>
           </execution>
         </executions>
       </plugin>
     </plugins>
   </build>
-
   <dependencies>
+    <!-- These must not be moved to a parent module, see PHOENIX-6377 -->
+    <!-- Depend on all other internal projects -->
     <dependency>
       <groupId>org.apache.phoenix</groupId>
-      <artifactId>phoenix-core</artifactId>
+      <artifactId>phoenix-core-server</artifactId>
+      <exclusions>
+        <!-- 5.2 no longer uses reload4j, but we still exclude in case 
something pulls these
+        transitively -->
+        <exclusion>
+          <groupId>org.slf4j</groupId>
+          <artifactId>slf4j-reload4j</artifactId>
+        </exclusion>
+        <exclusion>
+          <groupId>ch.qos.reload4j</groupId>
+          <artifactId>reload4j</artifactId>
+        </exclusion>
+        <!-- These are coming from transitive dependencies -->
+        <exclusion>
+          <groupId>org.slf4j</groupId>
+          <artifactId>slf4j-log4j12</artifactId>
+        </exclusion>
+        <exclusion>
+          <groupId>log4j</groupId>
+          <artifactId>log4j</artifactId>
+        </exclusion>
+      </exclusions>
     </dependency>
     <dependency>
       <groupId>org.apache.phoenix</groupId>
       <artifactId>phoenix-hbase-compat-${hbase.compat.version}</artifactId>
       <optional>false</optional>
     </dependency>
-    <!-- hbase's classpath will provide these, mark them as provided to prevent
-         them, and their transitive dependencies, from being included in the
-         shaded jar. -->
+
+    <!-- Exclude servlet and Jetty. We don't need it, and it causes problems 
with minicluster -->
+    <dependency>
+      <groupId>org.eclipse.jetty</groupId>
+      <artifactId>jetty-server</artifactId>
+      <scope>provided</scope>
+      <version>${jetty.version}</version>
+    </dependency>
+    <dependency>
+      <groupId>org.eclipse.jetty</groupId>
+      <artifactId>jetty-util</artifactId>
+      <scope>provided</scope>
+      <version>${jetty.version}</version>
+    </dependency>
+    <dependency>
+      <groupId>org.eclipse.jetty</groupId>
+      <artifactId>jetty-util-ajax</artifactId>
+      <scope>provided</scope>
+      <version>${jetty.version}</version>
+    </dependency>
+    <dependency>
+      <groupId>org.eclipse.jetty</groupId>
+      <artifactId>jetty-servlet</artifactId>
+      <scope>provided</scope>
+      <version>${jetty.version}</version>
+    </dependency>
+    <dependency>
+      <groupId>org.eclipse.jetty</groupId>
+      <artifactId>jetty-webapp</artifactId>
+      <scope>provided</scope>
+      <version>${jetty.version}</version>
+    </dependency>
+    <dependency>
+      <groupId>javax.servlet</groupId>
+      <artifactId>javax.servlet-api</artifactId>
+      <scope>provided</scope>
+      <version>${javax.servlet-api.version}</version>
+    </dependency>
+
+     <!-- Mark every Hadoop jar as provided -->
+    <dependency>
+      <groupId>org.apache.hadoop</groupId>
+      <artifactId>hadoop-common</artifactId>
+      <scope>provided</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.hadoop</groupId>
+      <artifactId>hadoop-mapreduce-client-core</artifactId>
+      <scope>provided</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.hadoop</groupId>
+      <artifactId>hadoop-annotations</artifactId>
+      <scope>provided</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.hadoop</groupId>
+      <artifactId>hadoop-auth</artifactId>
+      <scope>provided</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.hadoop</groupId>
+      <artifactId>hadoop-yarn-api</artifactId>
+      <scope>provided</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.hadoop</groupId>
+      <artifactId>hadoop-hdfs</artifactId>
+      <scope>provided</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.hadoop</groupId>
+      <artifactId>hadoop-hdfs-client</artifactId>
+      <scope>provided</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.hadoop</groupId>
+      <artifactId>hadoop-distcp</artifactId>
+      <scope>provided</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.hadoop</groupId>
+      <artifactId>hadoop-client</artifactId>
+      <scope>provided</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.hadoop</groupId>
+      <artifactId>hadoop-mapreduce-client-jobclient</artifactId>
+      <scope>provided</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.hadoop</groupId>
+      <artifactId>hadoop-mapreduce-client-common</artifactId>
+      <scope>provided</scope>
+    </dependency>
+
+    <!-- Mark HBase as provided, too -->
     <dependency>
       <groupId>org.apache.hbase</groupId>
-      <artifactId>hbase-annotations</artifactId>
+      <artifactId>hbase-client</artifactId>
       <scope>provided</scope>
     </dependency>
     <dependency>
       <groupId>org.apache.hbase</groupId>
-      <artifactId>hbase-protocol</artifactId>
+      <artifactId>hbase-common</artifactId>
       <scope>provided</scope>
     </dependency>
     <dependency>
       <groupId>org.apache.hbase</groupId>
-      <artifactId>hbase-protocol-shaded</artifactId>
+      <artifactId>hbase-mapreduce</artifactId>
       <scope>provided</scope>
     </dependency>
     <dependency>
       <groupId>org.apache.hbase</groupId>
-      <artifactId>hbase-common</artifactId>
+      <artifactId>hbase-replication</artifactId>
       <scope>provided</scope>
     </dependency>
     <dependency>
       <groupId>org.apache.hbase</groupId>
-      <artifactId>hbase-metrics-api</artifactId>
+      <artifactId>hbase-endpoint</artifactId>
       <scope>provided</scope>
     </dependency>
     <dependency>
       <groupId>org.apache.hbase</groupId>
-      <artifactId>hbase-metrics</artifactId>
+      <artifactId>hbase-metrics-api</artifactId>
       <scope>provided</scope>
     </dependency>
     <dependency>
       <groupId>org.apache.hbase</groupId>
-      <artifactId>hbase-client</artifactId>
+      <artifactId>hbase-metrics</artifactId>
       <scope>provided</scope>
     </dependency>
     <dependency>
       <groupId>org.apache.hbase</groupId>
-      <artifactId>hbase-endpoint</artifactId>
+      <artifactId>hbase-protocol</artifactId>
       <scope>provided</scope>
     </dependency>
     <dependency>
       <groupId>org.apache.hbase</groupId>
-      <artifactId>hbase-server</artifactId>
+      <artifactId>hbase-protocol-shaded</artifactId>
       <scope>provided</scope>
     </dependency>
     <dependency>
       <groupId>org.apache.hbase</groupId>
-      <artifactId>hbase-mapreduce</artifactId>
+      <artifactId>hbase-server</artifactId>
       <scope>provided</scope>
     </dependency>
     <dependency>
@@ -345,43 +521,53 @@
       <scope>provided</scope>
     </dependency>
     <dependency>
-      <groupId>org.apache.hadoop</groupId>
-      <artifactId>hadoop-common</artifactId>
-      <scope>provided</scope>
-    </dependency>
-    <dependency>
-      <groupId>org.apache.hadoop</groupId>
-      <artifactId>hadoop-annotations</artifactId>
+      <groupId>org.apache.hbase.thirdparty</groupId>
+      <artifactId>hbase-shaded-netty</artifactId>
+      <!-- random version, for exclusion only -->
+      <version>4.0.0</version>
       <scope>provided</scope>
     </dependency>
     <dependency>
-      <groupId>org.apache.hadoop</groupId>
-      <artifactId>hadoop-mapreduce-client-core</artifactId>
+      <groupId>org.apache.hbase.thirdparty</groupId>
+      <artifactId>hbase-shaded-miscellaneous</artifactId>
+      <!-- random version, for exclusion only -->
+      <version>4.0.0</version>
       <scope>provided</scope>
     </dependency>
     <dependency>
-      <groupId>org.apache.hadoop</groupId>
-      <artifactId>hadoop-auth</artifactId>
+      <groupId>org.apache.hbase.thirdparty</groupId>
+      <artifactId>hbase-shaded-protobuf</artifactId>
+      <!-- random version, for exclusion only -->
+      <version>4.0.0</version>
       <scope>provided</scope>
     </dependency>
     <dependency>
-      <groupId>org.apache.hadoop</groupId>
-      <artifactId>hadoop-yarn-api</artifactId>
+      <!-- provided by Hadoop -->
+      <groupId>org.apache.commons</groupId>
+      <artifactId>commons-configuration2</artifactId>
+      <!-- random version, for exclusion only -->
+      <version>2.1.1</version>
       <scope>provided</scope>
     </dependency>
+
+    <!-- Other dependencies we don't want to shade in, but are not 
transitively excluded by the
+    above for some reason -->
     <dependency>
-      <groupId>org.apache.hadoop</groupId>
-      <artifactId>hadoop-hdfs-client</artifactId>
+      <!-- HBase-shaded already provides this -->
+      <groupId>org.slf4j</groupId>
+      <artifactId>slf4j-api</artifactId>
       <scope>provided</scope>
     </dependency>
     <dependency>
-      <groupId>org.apache.zookeeper</groupId>
-      <artifactId>zookeeper</artifactId>
+      <groupId>com.google.guava</groupId>
+      <artifactId>guava</artifactId>
+      <!-- random version, for exclusion only -->
+      <version>11.0.2</version>
       <scope>provided</scope>
     </dependency>
     <dependency>
-      <groupId>org.apache.zookeeper</groupId>
-      <artifactId>zookeeper-jute</artifactId>
+      <groupId>com.github.stephenc.findbugs</groupId>
+      <artifactId>findbugs-annotations</artifactId>
       <scope>provided</scope>
     </dependency>
     <dependency>

Reply via email to