You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hbase.apache.org by bu...@apache.org on 2019/05/06 03:23:19 UTC

[hbase] 04/06: HBASE-22314 shaded byo-hadoop client should list needed hadoop modules as provided scope to avoid inclusion of unnecessary transitive depednencies

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

busbey pushed a commit to branch branch-2.1
in repository https://gitbox.apache.org/repos/asf/hbase.git

commit f20d76df0c2775cebc236f315723e8e524560751
Author: Sean Busbey <bu...@apache.org>
AuthorDate: Thu Apr 25 11:03:37 2019 -0500

    HBASE-22314 shaded byo-hadoop client should list needed hadoop modules as provided scope to avoid inclusion of unnecessary transitive depednencies
    
    (cherry picked from commit 87550bf963bfb29f114945370656aef554c3c0f8)
---
 .../hbase-shaded-client-byo-hadoop/pom.xml         | 58 ++++++++++++++++++++++
 1 file changed, 58 insertions(+)

diff --git a/hbase-shaded/hbase-shaded-client-byo-hadoop/pom.xml b/hbase-shaded/hbase-shaded-client-byo-hadoop/pom.xml
index 22f4a7f..ea79142 100644
--- a/hbase-shaded/hbase-shaded-client-byo-hadoop/pom.xml
+++ b/hbase-shaded/hbase-shaded-client-byo-hadoop/pom.xml
@@ -58,4 +58,62 @@
         </dependency>
     </dependencies>
 
+    <profiles>
+      <!-- These hadoop profiles should be derived from those in the hbase-client
+           module. Essentially, you must list the same hadoop-* dependencies
+           so provided dependencies will not be transitively included.
+      -->
+      <profile>
+        <id>hadoop-2.0</id>
+        <activation>
+          <property>
+              <!--Below formatting for dev-support/generate-hadoopX-poms.sh-->
+              <!--h2--><name>!hadoop.profile</name>
+          </property>
+        </activation>
+        <dependencies>
+          <dependency>
+             <groupId>com.github.stephenc.findbugs</groupId>
+             <artifactId>findbugs-annotations</artifactId>
+             <optional>true</optional>
+          </dependency>
+          <dependency>
+            <groupId>org.apache.hadoop</groupId>
+            <artifactId>hadoop-auth</artifactId>
+            <scope>provided</scope>
+          </dependency>
+          <dependency>
+            <groupId>org.apache.hadoop</groupId>
+            <artifactId>hadoop-common</artifactId>
+            <scope>provided</scope>
+          </dependency>
+        </dependencies>
+      </profile>
+
+      <!--
+        profile for building against Hadoop 3.0.x. Activate using:
+         mvn -Dhadoop.profile=3.0
+      -->
+      <profile>
+        <id>hadoop-3.0</id>
+        <activation>
+          <property>
+            <name>hadoop.profile</name>
+            <value>3.0</value>
+          </property>
+        </activation>
+        <dependencies>
+          <dependency>
+            <groupId>org.apache.hadoop</groupId>
+            <artifactId>hadoop-auth</artifactId>
+            <scope>provided</scope>
+          </dependency>
+          <dependency>
+            <groupId>org.apache.hadoop</groupId>
+            <artifactId>hadoop-common</artifactId>
+            <scope>provided</scope>
+          </dependency>
+        </dependencies>
+      </profile>
+    </profiles>
 </project>