You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@phoenix.apache.org by st...@apache.org on 2024/01/08 07:12:43 UTC

(phoenix) branch master updated: PHOENIX-7139 Create phoenix-mapreduce-byo-shaded-hbase artifact

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 fec83cc3c6 PHOENIX-7139 Create phoenix-mapreduce-byo-shaded-hbase artifact
fec83cc3c6 is described below

commit fec83cc3c66d633c8a47144b9e1a479e6d052b7c
Author: Istvan Toth <st...@apache.org>
AuthorDate: Wed Jan 3 13:03:23 2024 +0100

    PHOENIX-7139 Create phoenix-mapreduce-byo-shaded-hbase artifact
---
 phoenix-assembly/pom.xml                           |  25 +
 .../src/build/components/all-common-jars.xml       |   8 +
 phoenix-client-parent/pom.xml                      |   2 -
 phoenix-mapreduce-byo-shaded-hbase/pom.xml         | 604 +++++++++++++++++++++
 phoenix-pherf/pom.xml                              |   2 -
 phoenix-server/pom.xml                             |   1 -
 pom.xml                                            |  44 +-
 7 files changed, 680 insertions(+), 6 deletions(-)

diff --git a/phoenix-assembly/pom.xml b/phoenix-assembly/pom.xml
index 7f929c118c..2d941765f1 100644
--- a/phoenix-assembly/pom.xml
+++ b/phoenix-assembly/pom.xml
@@ -105,6 +105,27 @@
               </arguments>
             </configuration>
           </execution>
+          <execution>
+            <id>mapreduce without version</id>
+            <phase>compile</phase>
+            <goals>
+              <goal>exec</goal>
+            </goals>
+            <configuration>
+              <executable>ln</executable>
+              <workingDirectory>${project.basedir}/../phoenix-mapreduce-byo-shaded-hbase/target</workingDirectory>
+              <arguments>
+                <argument>-fnsv</argument>
+                <argument>
+                  phoenix-mapreduce-byo-shaded-hbase-${hbase.suffix}-${project.version}.jar
+                </argument>
+                <argument>
+                  <!-- We are overwriting the unshaded  JAR, but we don't care -->
+                  phoenix-mapreduce-byo-shaded-hbase-${hbase.suffix}.jar
+                </argument>
+              </arguments>
+            </configuration>
+          </execution>
           <execution>
             <id>pherf without version</id>
             <phase>compile</phase>
@@ -170,6 +191,10 @@
       <groupId>org.apache.phoenix</groupId>
       <artifactId>phoenix-server-${hbase.suffix}</artifactId>
     </dependency>
+    <dependency>
+      <groupId>org.apache.phoenix</groupId>
+      <artifactId>phoenix-mapreduce-byo-shaded-hbase-${hbase.suffix}</artifactId>
+    </dependency>
     <dependency>
       <groupId>org.apache.phoenix</groupId>
       <artifactId>phoenix-client-embedded-${hbase.suffix}</artifactId>
diff --git a/phoenix-assembly/src/build/components/all-common-jars.xml b/phoenix-assembly/src/build/components/all-common-jars.xml
index c51ff9c98e..c2f943fc39 100644
--- a/phoenix-assembly/src/build/components/all-common-jars.xml
+++ b/phoenix-assembly/src/build/components/all-common-jars.xml
@@ -47,6 +47,14 @@
         <include>phoenix-server-${hbase.suffix}.jar</include>
       </includes>
     </fileSet>
+    <fileSet>
+      <directory>${project.basedir}/../phoenix-mapreduce-byo-shaded-hbase/target</directory>
+      <outputDirectory>/</outputDirectory>
+      <includes>
+        <include>phoenix-mapreduce-byo-shaded-hbase-${hbase.suffix}-${project.version}.jar</include>
+        <include>phoenix-mapreduce-byo-shaded-hbase-${hbase.suffix}.jar</include>
+      </includes>
+    </fileSet>
     <fileSet>
       <directory>${project.basedir}/../phoenix-pherf/target</directory>
       <outputDirectory>/</outputDirectory>
diff --git a/phoenix-client-parent/pom.xml b/phoenix-client-parent/pom.xml
index 42bee5c047..49c4b6869d 100644
--- a/phoenix-client-parent/pom.xml
+++ b/phoenix-client-parent/pom.xml
@@ -34,8 +34,6 @@
     <!-- Don't make a source-jar -->
     <source.skip>true</source.skip>
     <license.bundles.dependencies>true</license.bundles.dependencies>
-    <shaded.package>org.apache.phoenix.shaded</shaded.package>
-
   </properties>
 
   <build>
diff --git a/phoenix-mapreduce-byo-shaded-hbase/pom.xml b/phoenix-mapreduce-byo-shaded-hbase/pom.xml
new file mode 100644
index 0000000000..7cf6a98ea8
--- /dev/null
+++ b/phoenix-mapreduce-byo-shaded-hbase/pom.xml
@@ -0,0 +1,604 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  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.
+-->
+<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/xsd/maven-4.0.0.xsd">
+  <modelVersion>4.0.0</modelVersion>
+  <parent>
+    <groupId>org.apache.phoenix</groupId>
+    <artifactId>phoenix</artifactId>
+    <version>5.2.0-SNAPSHOT</version>
+  </parent>
+  <artifactId>phoenix-mapreduce-byo-shaded-hbase-${hbase.suffix}</artifactId>
+  <name>Phoenix Mapreduce</name>
+  <description>Phoenix Mapreduce JAR for use with the "hbase mapredcp" classpath</description>
+  <packaging>jar</packaging>
+  <properties>
+    <!-- Don't make a test-jar -->
+    <maven.test.skip>true</maven.test.skip>
+    <!-- Don't make a source-jar -->
+    <source.skip>true</source.skip>
+    <license.bundles.dependencies>true</license.bundles.dependencies>
+  </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 - Maybe these could be shaded as well ? -->
+                  <exclude>org/apache/hbase/**</exclude>
+                  <!-- Phoenix classes -->
+                  <exclude>org/apache/phoenix/**</exclude>
+                  <exclude>org/apache/omid/**</exclude>
+                  <!-- See PHOENIX-7118
+                 We expect this to come from the unshaded hadoop on the classpath.
+                 This won't work if hadoop-shaded-client is used. -->
+                <exclude>org/apache/commons/configuration2/**</exclude>
+                </excludes>
+              </relocation>
+
+              <!-- We cannot use the more elegant shading rules in -client
+              and -server for com packages, but it SHOULD be equivalent, except for the
+              protobuf change for hbase-shaded-mapreduce / client compatibility -->
+              <relocation>
+                <pattern>com/beust/</pattern>
+                <shadedPattern>${shaded.package}.com.beust.</shadedPattern>
+              </relocation>
+              <relocation>
+                <pattern>com/clearspring/</pattern>
+                <shadedPattern>${shaded.package}.com.clearspring.</shadedPattern>
+              </relocation>
+              <relocation>
+                <pattern>com/codahale/</pattern>
+                <shadedPattern>${shaded.package}.come.codahale.</shadedPattern>
+              </relocation>
+              <relocation>
+                <pattern>com/fasterxml/</pattern>
+                <shadedPattern>${shaded.package}.com.fasterxml.</shadedPattern>
+              </relocation>
+              <relocation>
+                <pattern>com/force/</pattern>
+                <shadedPattern>${shaded.package}.com.force.</shadedPattern>
+              </relocation>
+              <relocation>
+                <pattern>com/google/gson/</pattern>
+                <shadedPattern>${shaded.package}.com.google.gson.</shadedPattern>
+              </relocation>
+              <relocation>
+                <pattern>com/google/inject/</pattern>
+                <shadedPattern>${shaded.package}.com.google.inject.</shadedPattern>
+              </relocation>
+              <!-- This is protobuf 2.5.0 which is shaded to this package in hbase-shaded-mapreduce,
+               not the modified protobuf 3.x from hbase-thirdparty -->
+              <relocation>
+                <pattern>com/google/protobuf/</pattern>
+                <shadedPattern>${hbase.shaded.package}.com.google.protobuf.</shadedPattern>
+              </relocation>
+              <relocation>
+                <pattern>com/ibm/</pattern>
+                <shadedPattern>${shaded.package}.com.ibm.</shadedPattern>
+              </relocation>
+              <relocation>
+                <pattern>com/lmax/</pattern>
+                <shadedPattern>${shaded.package}.com.lmax.</shadedPattern>
+              </relocation>
+              <relocation>
+                <pattern>com/sun/jna/</pattern>
+                <shadedPattern>${shaded.package}.com.sun.jna.</shadedPattern>
+              </relocation>
+              <relocation>
+                <pattern>com/squareup</pattern>
+                <shadedPattern>${shaded.package}.com.squareup.</shadedPattern>
+              </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-shade-plugin</artifactId>
+        <executions>
+          <execution>
+            <id>lite-shaded</id>
+            <phase>package</phase>
+            <goals>
+              <goal>shade</goal>
+            </goals>
+            <configuration>
+              <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-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>
+
+    <!-- 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-client</artifactId>
+      <scope>provided</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.hbase</groupId>
+      <artifactId>hbase-common</artifactId>
+      <scope>provided</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.hbase</groupId>
+      <artifactId>hbase-mapreduce</artifactId>
+      <scope>provided</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.hbase</groupId>
+      <artifactId>hbase-replication</artifactId>
+      <scope>provided</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.hbase</groupId>
+      <artifactId>hbase-endpoint</artifactId>
+      <scope>provided</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.hbase</groupId>
+      <artifactId>hbase-metrics-api</artifactId>
+      <scope>provided</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.hbase</groupId>
+      <artifactId>hbase-metrics</artifactId>
+      <scope>provided</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.hbase</groupId>
+      <artifactId>hbase-protocol</artifactId>
+      <scope>provided</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.hbase</groupId>
+      <artifactId>hbase-protocol-shaded</artifactId>
+      <scope>provided</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.hbase</groupId>
+      <artifactId>hbase-server</artifactId>
+      <scope>provided</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.hbase</groupId>
+      <artifactId>hbase-hadoop-compat</artifactId>
+      <scope>provided</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.hbase</groupId>
+      <artifactId>hbase-hadoop2-compat</artifactId>
+      <scope>provided</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.hbase</groupId>
+      <artifactId>hbase-zookeeper</artifactId>
+      <scope>provided</scope>
+    </dependency>
+    <dependency>
+      <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.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.hbase.thirdparty</groupId>
+      <artifactId>hbase-shaded-protobuf</artifactId>
+      <!-- random version, for exclusion only -->
+      <version>4.0.0</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>
+      <!-- HBase-shaded already provides this -->
+      <groupId>org.slf4j</groupId>
+      <artifactId>slf4j-api</artifactId>
+      <scope>provided</scope>
+    </dependency>
+    <dependency>
+      <groupId>com.google.guava</groupId>
+      <artifactId>guava</artifactId>
+      <!-- random version, for exclusion only -->
+      <version>11.0.2</version>
+      <scope>provided</scope>
+    </dependency>
+    <dependency>
+      <groupId>com.github.stephenc.findbugs</groupId>
+      <artifactId>findbugs-annotations</artifactId>
+      <scope>provided</scope>
+    </dependency>
+    <dependency>
+      <groupId>com.google.protobuf</groupId>
+      <artifactId>protobuf-java</artifactId>
+      <scope>provided</scope>
+    </dependency>
+  </dependencies>
+</project>
diff --git a/phoenix-pherf/pom.xml b/phoenix-pherf/pom.xml
index 773b443901..2b3a22b6f6 100644
--- a/phoenix-pherf/pom.xml
+++ b/phoenix-pherf/pom.xml
@@ -30,8 +30,6 @@
   <name>Phoenix - Pherf</name>
 
   <properties>
-    <shaded.package>org.apache.phoenix.shaded</shaded.package>
-
     <!-- Versions for pherf-only dependencies -->
     <diffutils.version>1.2.1</diffutils.version>
     <gson.version>2.9.1</gson.version>
diff --git a/phoenix-server/pom.xml b/phoenix-server/pom.xml
index ff47520a8e..e61af7d963 100644
--- a/phoenix-server/pom.xml
+++ b/phoenix-server/pom.xml
@@ -36,7 +36,6 @@
     <!-- Don't make a source-jar -->
     <source.skip>true</source.skip>
     <license.bundles.dependencies>true</license.bundles.dependencies>
-    <shaded.package>org.apache.phoenix.shaded</shaded.package>
   </properties>
 
   <build>
diff --git a/pom.xml b/pom.xml
index c57df453f0..fdeafd55fa 100644
--- a/pom.xml
+++ b/pom.xml
@@ -72,7 +72,6 @@
   </scm>
 
   <properties>
-
     <!-- Hadoop and Hbase-thirdparty version -->
     <!-- These are expected to be overridden to conform to cluster versions
     along with hbase.version (defined in profiles) -->
@@ -215,6 +214,8 @@
     <protoc.arch>${os.detected.classifier}</protoc.arch>
     <!-- Keeping the version in sync with hbase javax.el version -->
     <glassfish.el.version>3.0.1-b08</glassfish.el.version>
+    <shaded.package>org.apache.phoenix.shaded</shaded.package>
+    <hbase.shaded.package>org.apache.hadoop.hbase.shaded</hbase.shaded.package>
   </properties>
 
   <build>
@@ -749,6 +750,26 @@
         <artifactId>phoenix-server-hbase-2.5</artifactId>
         <version>${project.version}</version>
       </dependency>
+      <dependency>
+        <groupId>org.apache.phoenix</groupId>
+        <artifactId>phoenix-mapreduce-byo-shaded-hbase-hbase-2.4.0</artifactId>
+        <version>${project.version}</version>
+      </dependency>
+      <dependency>
+        <groupId>org.apache.phoenix</groupId>
+        <artifactId>phoenix-mapreduce-byo-shaded-hbase-hbase-2.4</artifactId>
+        <version>${project.version}</version>
+      </dependency>
+      <dependency>
+        <groupId>org.apache.phoenix</groupId>
+        <artifactId>phoenix-mapreduce-byo-shaded-hbase-hbase-2.5.0</artifactId>
+        <version>${project.version}</version>
+      </dependency>
+      <dependency>
+        <groupId>org.apache.phoenix</groupId>
+        <artifactId>phoenix-mapreduce-byo-shaded-hbase-hbase-2.5</artifactId>
+        <version>${project.version}</version>
+      </dependency>
       <dependency>
         <groupId>org.apache.phoenix</groupId>
         <artifactId>phoenix-pherf</artifactId>
@@ -858,6 +879,21 @@
           </exclusion>
         </exclusions>
       </dependency>
+      <dependency>
+        <groupId>org.apache.hadoop</groupId>
+        <artifactId>hadoop-mapreduce-client-common</artifactId>
+        <version>${hadoop.version}</version>
+        <exclusions>
+          <exclusion>
+            <groupId>log4j</groupId>
+            <artifactId>log4j</artifactId>
+          </exclusion>
+          <exclusion>
+            <groupId>org.slf4j</groupId>
+            <artifactId>slf4j-log4j12</artifactId>
+          </exclusion>
+        </exclusions>
+      </dependency>
       <dependency>
         <groupId>org.apache.hadoop</groupId>
         <artifactId>hadoop-hdfs-client</artifactId>
@@ -1087,6 +1123,11 @@
           </exclusion>
         </exclusions>
       </dependency>
+      <dependency>
+        <groupId>org.apache.hbase</groupId>
+        <artifactId>hbase-replication</artifactId>
+        <version>${hbase.version}</version>
+      </dependency>
       <dependency>
         <groupId>org.apache.hbase</groupId>
         <artifactId>hbase-hadoop-compat</artifactId>
@@ -1594,6 +1635,7 @@
         <module>phoenix-client-parent/phoenix-client-embedded</module>
         <module>phoenix-client-parent/phoenix-client-lite</module>
         <module>phoenix-server</module>
+        <module>phoenix-mapreduce-byo-shaded-hbase</module>
         <module>phoenix-assembly</module>
       </modules>
     </profile>