You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@phoenix.apache.org by ri...@apache.org on 2021/06/08 15:27:14 UTC
[phoenix-connectors] branch master updated: PHOENIX-6490 Fix shaded
phoenix hive connector jar name and reduce the size
This is an automated email from the ASF dual-hosted git repository.
richardantal pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/phoenix-connectors.git
The following commit(s) were added to refs/heads/master by this push:
new a883279 PHOENIX-6490 Fix shaded phoenix hive connector jar name and reduce the size
a883279 is described below
commit a8832798c185e9bc295be1a05bfde5ee10aecf92
Author: Richard Antal <an...@gmail.com>
AuthorDate: Tue Jun 8 12:50:12 2021 +0200
PHOENIX-6490 Fix shaded phoenix hive connector jar name and reduce the size
Change-Id: I59fc910134f9a6401036bdcf8345f79d5b68d9ec
---
phoenix-hive-base/phoenix4-hive-shaded/pom.xml | 56 ++++++++++
phoenix-hive-base/phoenix5-hive-shaded/pom.xml | 118 +++++++++++++++++++++
phoenix-hive-base/pom.xml | 2 +-
.../src/build/components/phoenix4-jars.xml | 2 +-
4 files changed, 176 insertions(+), 2 deletions(-)
diff --git a/phoenix-hive-base/phoenix4-hive-shaded/pom.xml b/phoenix-hive-base/phoenix4-hive-shaded/pom.xml
index 31d24b4..08e95f7 100644
--- a/phoenix-hive-base/phoenix4-hive-shaded/pom.xml
+++ b/phoenix-hive-base/phoenix4-hive-shaded/pom.xml
@@ -48,6 +48,62 @@
<artifactId>phoenix-hbase-compat-${hbase.compat.version}</artifactId>
<scope>runtime</scope>
</dependency>
+ <!-- maven-shade-plugin doesn't inherit dependency settings, we must duplicate them to avoid
+adding the provided dependencies -->
+ <dependency>
+ <groupId>org.apache.hive</groupId>
+ <artifactId>hive-cli</artifactId>
+ <version>${hive.version}</version>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.hive</groupId>
+ <artifactId>hive-common</artifactId>
+ <version>${hive.version}</version>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.hive</groupId>
+ <artifactId>hive-exec</artifactId>
+ <version>${hive.version}</version>
+ <scope>provided</scope>
+ </dependency>
+ <!-- These three dependencies are falsely flagged by dependency plugin -->
+ <dependency>
+ <groupId> org.apache.hive</groupId>
+ <artifactId>hive-serde</artifactId>
+ <version>${hive.version}</version>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId> org.apache.hive</groupId>
+ <artifactId>hive-storage-api</artifactId>
+ <version>${hive-storage.version}</version>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId> org.apache.hive.shims</groupId>
+ <artifactId>hive-shims-common</artifactId>
+ <version>${hive.version}</version>
+ <scope>provided</scope>
+ </dependency>
+ <!-- These are actually different between phoenix 5 and phoenix 4 -->
+ <dependency>
+ <groupId> org.apache.hive</groupId>
+ <artifactId>hive-metastore</artifactId>
+ <version>${hive.version}</version>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.hbase</groupId>
+ <artifactId>hbase-server</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.zookeeper</groupId>
+ <artifactId>zookeeper</artifactId>
+ <version>${zookeeper.version}</version>
+ <scope>provided</scope>
+ </dependency>
</dependencies>
<build>
diff --git a/phoenix-hive-base/phoenix5-hive-shaded/pom.xml b/phoenix-hive-base/phoenix5-hive-shaded/pom.xml
index f649031..3f995b5 100644
--- a/phoenix-hive-base/phoenix5-hive-shaded/pom.xml
+++ b/phoenix-hive-base/phoenix5-hive-shaded/pom.xml
@@ -60,6 +60,124 @@
<version>${zookeeper.version}</version>
<scope>provided</scope>
</dependency>
+ <!-- maven-shade-plugin doesn't inherit dependency settings, we must duplicate them to avoid
+ adding the provided dependencies -->
+ <dependency>
+ <groupId>org.apache.phoenix</groupId>
+ <artifactId>phoenix-connectors-phoenix5-compat</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.phoenix</groupId>
+ <artifactId>phoenix-hbase-compat-${hbase.compat.version}</artifactId>
+ <scope>runtime</scope>
+ <optional>true</optional>
+ </dependency>
+ <!-- Hive dependencies cannot be specified in the phoenix-hive-common, because of
+ hbase transitive dependency version conflicts -->
+ <dependency>
+ <groupId>org.apache.hive</groupId>
+ <artifactId>hive-cli</artifactId>
+ <version>${hive.version}</version>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.hive</groupId>
+ <artifactId>hive-common</artifactId>
+ <version>${hive.version}</version>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.hive</groupId>
+ <artifactId>hive-exec</artifactId>
+ <version>${hive.version}</version>
+ <scope>provided</scope>
+ </dependency>
+ <!-- These three dependencies are falsely flagged by dependency plugin -->
+ <dependency>
+ <groupId> org.apache.hive</groupId>
+ <artifactId>hive-serde</artifactId>
+ <version>${hive.version}</version>
+ <exclusions>
+ <!-- Fix conflict with Minicluster -->
+ <exclusion>
+ <groupId>io.netty</groupId>
+ <artifactId>*</artifactId>
+ </exclusion>
+ </exclusions>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId> org.apache.hive</groupId>
+ <artifactId>hive-storage-api</artifactId>
+ <version>${hive-storage.version}</version>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId> org.apache.hive.shims</groupId>
+ <artifactId>hive-shims-common</artifactId>
+ <version>${hive.version}</version>
+ <scope>provided</scope>
+ </dependency>
+ <!-- These are actually different between phoenix 5 and phoenix 4 -->
+ <dependency>
+ <groupId> org.apache.hive</groupId>
+ <artifactId>hive-standalone-metastore</artifactId>
+ <version>${hive.version}</version>
+ <scope>provided</scope>
+ <exclusions>
+ <exclusion>
+ <groupId>com.google.guava</groupId>
+ <artifactId>guava</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.hbase</groupId>
+ <artifactId>hbase-mapreduce</artifactId>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.hbase</groupId>
+ <artifactId>hbase-zookeeper</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.hbase</groupId>
+ <artifactId>hbase-protocol-shaded</artifactId>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.hbase</groupId>
+ <artifactId>hbase-endpoint</artifactId>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.hadoop</groupId>
+ <artifactId>hadoop-hdfs-client</artifactId>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.logging.log4j</groupId>
+ <artifactId>log4j-core</artifactId>
+ <version>${log4j2.version}</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.hadoop</groupId>
+ <artifactId>hadoop-minicluster</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.zookeeper</groupId>
+ <artifactId>zookeeper</artifactId>
+ <version>${zookeeper.version}</version>
+ <scope>provided</scope>
+ </dependency>
</dependencies>
<build>
diff --git a/phoenix-hive-base/pom.xml b/phoenix-hive-base/pom.xml
index f1652dd..5acb4f0 100644
--- a/phoenix-hive-base/pom.xml
+++ b/phoenix-hive-base/pom.xml
@@ -372,7 +372,7 @@
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<configuration>
- <shadedArtifactAttached>true</shadedArtifactAttached>
+ <shadedArtifactAttached>false</shadedArtifactAttached>
<promoteTransitiveDependencies>true</promoteTransitiveDependencies>
<filters>
<filter>
diff --git a/phoenix4-connectors-assembly/src/build/components/phoenix4-jars.xml b/phoenix4-connectors-assembly/src/build/components/phoenix4-jars.xml
index b29b380..7a8eb81 100644
--- a/phoenix4-connectors-assembly/src/build/components/phoenix4-jars.xml
+++ b/phoenix4-connectors-assembly/src/build/components/phoenix4-jars.xml
@@ -59,7 +59,7 @@
<directory>${project.basedir}/../phoenix-hive-base/phoenix4-hive-shaded/target</directory>
<outputDirectory>/</outputDirectory>
<includes>
- <include>phoenix4-hive-shaded-${project.version}-shaded.jar</include>
+ <include>phoenix4-hive-shaded-${project.version}.jar</include>
<include>phoenix4-hive-shaded.jar</include>
</includes>
</fileSet>