aboutsummaryrefslogtreecommitdiff
path: root/contrib/storage-hive/hive-exec-shade/pom.xml
blob: 3d4dcebc34643046d4fb3ff0d5ddc2124e5f9310 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
<?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">
  <modelVersion>4.0.0</modelVersion>

  <parent>
    <groupId>org.apache.drill.contrib.storage-hive</groupId>
    <artifactId>drill-contrib-storage-hive-parent</artifactId>
    <version>1.14.0-SNAPSHOT</version>
  </parent>

  <artifactId>drill-hive-exec-shaded</artifactId>
  <packaging>jar</packaging>
  <name>contrib/hive-storage-plugin/hive-exec-shaded</name>

  <dependencies>
    <dependency>
      <groupId>org.apache.hive</groupId>
      <artifactId>hive-exec</artifactId>
      <scope>compile</scope>
      <exclusions>
        <!--Hive Calcite libraries are not required. When user submits query in Drill via Hive plugin, the query
        is validated and planned via Drill Calcite. Hive Calcite can be used only to setup Hive store for Drill unit
        testing, where a lot of Hive specific queries are performed. But Drill Calcite and Avatica versions have
        conflicts with Hive old Calcite and Avatica versions. That's why Calcite cost based optimizator
        (ConfVars.HIVE_CBO_ENABLED) is disabled for Drill Hive JUnit test cases. It can be enabled again once Hive
        will leverage the newest Calcite version. To do that check whether Drill Calcite and Avatica versions are
        suitable for hive-exec. If no, use Hive Calcite and Avatica versions.
        Note: Versions of Calcite libraries are controlled by "DependencyManagement" block in Drill's
        root POM file now-->
        <exclusion>
          <groupId>org.apache.calcite</groupId>
          <artifactId>calcite-core</artifactId>
        </exclusion>
        <exclusion>
          <groupId>org.apache.calcite</groupId>
          <artifactId>calcite-avatica</artifactId>
        </exclusion>
        <exclusion>
          <groupId>org.apache.calcite</groupId>
          <artifactId>calcite-linq4j</artifactId>
        </exclusion>
        <exclusion>
          <groupId>org.apache.calcite</groupId>
          <artifactId>calcite-druid</artifactId>
        </exclusion>
        <exclusion>
          <groupId>com.github.joshelser</groupId>
          <artifactId>dropwizard-metrics-hadoop-metrics2-reporter</artifactId>
        </exclusion>
      </exclusions>
    </dependency>
    <!--Once newer hive-exec version leverages parquet-column 1.9.0, this dependency can be deleted -->
    <dependency>
      <groupId>org.apache.parquet</groupId>
      <artifactId>parquet-column</artifactId>
    </dependency>
  </dependencies>

  <build>
    <plugins>
      <plugin>
        <artifactId>maven-shade-plugin</artifactId>
        <configuration>
          <artifactSet>
            <includes>
              <include>org.apache.hive:hive-exec</include>
              <include>org.apache.parquet:parquet-column</include>
              <include>commons-codec:commons-codec</include>
              <include>com.fasterxml.jackson.core:jackson-databind</include>
              <include>com.fasterxml.jackson.core:jackson-annotations</include>
              <include>com.fasterxml.jackson.core:jackson-core</include>
            </includes>
          </artifactSet>
          <createDependencyReducedPom>false</createDependencyReducedPom>
          <promoteTransitiveDependencies>true</promoteTransitiveDependencies>
          <relocations>
            <relocation>
              <pattern>com.google.</pattern>
              <shadedPattern>hive.com.google.</shadedPattern>
            </relocation>
            <relocation>
              <pattern>org.apache.commons.codec.</pattern>
              <shadedPattern>hive.org.apache.commons.codec.</shadedPattern>
            </relocation>
            <relocation>
              <pattern>net.hydromatic.</pattern>
              <shadedPattern>hive.net.hydromatic.</shadedPattern>
            </relocation>
            <relocation>
              <pattern>org.eigenbase.</pattern>
              <shadedPattern>hive.org.eigenbase.</shadedPattern>
            </relocation>
            <relocation>
              <pattern>com.fasterxml.jackson.</pattern>
              <shadedPattern>hive.com.fasterxml.jackson.</shadedPattern>
            </relocation>
            <relocation>
              <pattern>org.apache.parquet.</pattern>
              <shadedPattern>hive.org.apache.parquet.</shadedPattern>
            </relocation>
          </relocations>
          <filters>
            <filter>
              <artifact>org.apache.hive:hive-exec</artifact>
              <excludes>
                <exclude>org/apache/parquet/schema/*</exclude>
              </excludes>
            </filter>
          </filters>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-dependency-plugin</artifactId>
        <executions>
          <execution>
            <id>unpack</id>
            <phase>package</phase>
            <goals>
              <goal>unpack</goal>
            </goals>
            <configuration>
              <artifactItems>
                <artifactItem>
                  <groupId>org.apache.drill.contrib.storage-hive</groupId>
                  <artifactId>drill-hive-exec-shaded</artifactId>
                  <version>${project.version}</version>
                  <type>jar</type>
                  <overWrite>true</overWrite>
                  <outputDirectory>${project.build.directory}/classes</outputDirectory>
                  <includes>**/**</includes>
                </artifactItem>
              </artifactItems>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>findbugs-maven-plugin</artifactId>
        <configuration>
          <skip>true</skip>
        </configuration>
      </plugin>
    </plugins>
  </build>
  <profiles>
    <profile>
      <id>mapr</id>
      <properties>
        <!-- TODO: MapR Hive 2.1 client version libraries use older jackson libraries than Hive 2.3 client.
        It can be removed after updating onto 2.3 version -->
        <jackson.databind.mapr.hive.version>2.4.2</jackson.databind.mapr.hive.version>
      </properties>
      <dependencyManagement>
        <dependencies>
          <dependency>
            <groupId>com.fasterxml.jackson.core</groupId>
            <artifactId>jackson-databind</artifactId>
            <version>${jackson.databind.mapr.hive.version}</version>
          </dependency>
        </dependencies>
      </dependencyManagement>
    </profile>
  </profiles>
</project>