| <?xml version='1.0'?> |
| <!-- |
| |
| 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"> |
| <parent> |
| <groupId>org.apache.phoenix</groupId> |
| <artifactId>phoenix-connectors</artifactId> |
| <version>6.0.0-SNAPSHOT</version> |
| </parent> |
| <modelVersion>4.0.0</modelVersion> |
| |
| <artifactId>phoenix5-hive-shaded</artifactId> |
| <name>Shaded Phoenix Hive Connector for Phoenix 5</name> |
| |
| <properties> |
| <top.dir>${project.basedir}/..</top.dir> |
| <test.tmp.dir>${project.build.directory}/tmp</test.tmp.dir> |
| <hive.version>${hive3.version}</hive.version> |
| </properties> |
| |
| <dependencies> |
| <dependency> |
| <groupId>org.apache.phoenix</groupId> |
| <artifactId>phoenix5-hive</artifactId> |
| </dependency> |
| <dependency> |
| <groupId>org.apache.phoenix</groupId> |
| <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.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> |
| <!-- Dependencies below should be the same for Hive, Spark and Spark3 shading config --> |
| <!-- Phoenix excludes commons-beanutils from the Omid dependency, but that's basically a bug. |
| We need to add it back, so that we don't depend on hadoop's common-beanutils, which may or |
| may not be shaded. |
| This can be removed once we use a Phoenix version that doesn't have this problem --> |
| <dependency> |
| <groupId>commons-beanutils</groupId> |
| <artifactId>commons-beanutils</artifactId> |
| <scope>compile</scope> |
| </dependency> |
| |
| <!-- Mark every Hadoop jar as provided --> |
| <dependency> |
| <groupId>org.apache.hadoop</groupId> |
| <artifactId>hadoop-common</artifactId> |
| <exclusions> |
| <exclusion> |
| <groupId>commons-beanutils</groupId> |
| <artifactId>commons-beanutils</artifactId> |
| </exclusion> |
| </exclusions> |
| <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> |
| <!-- We want to take the implementation from Hive --> |
| <dependency> |
| <groupId>org.slf4j</groupId> |
| <artifactId>slf4j-log4j12</artifactId> |
| <scope>provided</scope> |
| </dependency> |
| <dependency> |
| <groupId>log4j</groupId> |
| <artifactId>log4j</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-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> |
| <scope>provided</scope> |
| </dependency> |
| <dependency> |
| <groupId>org.apache.hbase.thirdparty</groupId> |
| <artifactId>hbase-shaded-miscellaneous</artifactId> |
| <scope>provided</scope> |
| </dependency> |
| <dependency> |
| <groupId>org.apache.hbase.thirdparty</groupId> |
| <artifactId>hbase-shaded-protobuf</artifactId> |
| <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>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> |
| <!-- random version, for exclusion only --> |
| <version>1.3.9-1</version> |
| <scope>provided</scope> |
| </dependency> |
| </dependencies> |
| |
| <build> |
| <plugins> |
| <plugin> |
| <groupId>org.apache.maven.plugins</groupId> |
| <artifactId>maven-shade-plugin</artifactId> |
| <configuration> |
| <shadedArtifactAttached>false</shadedArtifactAttached> |
| <promoteTransitiveDependencies>true</promoteTransitiveDependencies> |
| <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> |
| <!-- Coming from Omid, should be fixed there --> |
| <exclude>log4j.properties</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> |
| <!-- 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> |
| <!-- Keep phoenix-client-byo-shaded-hadoop in sync with this --> |
| <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> |
| <!-- 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> |
| <!-- Extras compared to Hadoop --> |
| <!-- Hbase classes - Maybe these could be shaded as well ? --> |
| <exclude>org/apache/hbase/**</exclude> |
| <!-- We use the spark classpath directly --> |
| <exclude>org/apache/spark/**</exclude> |
| <!-- Phoenix classes --> |
| <exclude>org/apache/phoenix/**</exclude> |
| <exclude>org/apache/omid/**</exclude> |
| <!-- Do want/need to expose Tephra as well ? --> |
| <!-- See PHOENIX-7118 |
| Depending on the Spark classpath we may need to leave this unshaded, relocate |
| it under org/apache/hadoop/shaded/ or under org/apache/hadoop/hbase/shaded/. |
| The only thing that is guaranteed not to work is relocating it under |
| ${shaded.package} --> |
| <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-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-client, |
| 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/</pattern> |
| <shadedPattern>${shaded.package}.javax.servlet.</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>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> |
| <!-- Tephra --> |
| <pattern>co/</pattern> |
| <shadedPattern>${shaded.package}.co.</shadedPattern> |
| </relocation> |
| <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> |
| <executions> |
| <execution> |
| <phase>package</phase> |
| <goals> |
| <goal>shade</goal> |
| </goals> |
| </execution> |
| </executions> |
| </plugin> |
| <!-- TODO consider not enabling these globally instead --> |
| <plugin> |
| <groupId>org.apache.maven.plugins</groupId> |
| <artifactId>maven-compiler-plugin</artifactId> |
| <executions> |
| <execution> |
| <id>default-compile</id> |
| <phase>none</phase> |
| </execution> |
| </executions> |
| </plugin> |
| <plugin> |
| <groupId>org.apache.maven.plugins</groupId> |
| <artifactId>maven-dependency-plugin</artifactId> |
| <configuration> |
| <skip>true</skip> |
| </configuration> |
| </plugin> |
| </plugins> |
| </build> |
| </project> |