Last active
August 29, 2015 14:22
-
-
Save AzimUddin/ab79f43f7ee7dbd9428b to your computer and use it in GitHub Desktop.
POM.xml for using JDBC to access HiveServer2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<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/maven-v4_0_0.xsd"> | |
<modelVersion>4.0.0</modelVersion> | |
<groupId>com.microsoft.css</groupId> | |
<artifactId>HiveJdbcTest</artifactId> | |
<packaging>jar</packaging> | |
<version>1.0-SNAPSHOT</version> | |
<name>HiveJdbcTest</name> | |
<url>http://maven.apache.org</url> | |
<dependencies> | |
<dependency> | |
<groupId>junit</groupId> | |
<artifactId>junit</artifactId> | |
<version>3.8.1</version> | |
<scope>test</scope> | |
</dependency> | |
<!-- I am using Hive 0.13.0 JARs for this example - see example for Hive 0.14 below --> | |
<dependency> | |
<groupId>org.apache.hive</groupId> | |
<artifactId>hive-exec</artifactId> | |
<version>0.13.0</version> | |
</dependency> | |
<dependency> | |
<groupId>org.apache.hive</groupId> | |
<artifactId>hive-jdbc</artifactId> | |
<version>0.13.0</version> | |
</dependency> | |
<dependency> | |
<groupId>org.apache.hadoop</groupId> | |
<artifactId>hadoop-common</artifactId> | |
<version>2.2.0</version> | |
</dependency> | |
<!-- Hive 0.14 dependencies. If you have questions about org.apache.calcite exclusions, please review- | |
http://stackoverflow.com/questions/27710049/hive-0-14-udf-maven-project-missing-dependencies | |
https://issues.apache.org/jira/browse/HIVE-8906 | |
<dependency> | |
<groupId>org.apache.hive</groupId> | |
<artifactId>hive-exec</artifactId> | |
<version>0.14.0</version> | |
<exclusions> | |
<exclusion> | |
<groupId>org.apache.calcite</groupId> | |
<artifactId>*</artifactId> | |
</exclusion> | |
</exclusions> | |
</dependency> | |
<dependency> | |
<groupId>org.apache.hive</groupId> | |
<artifactId>hive-jdbc</artifactId> | |
<version>0.14.0</version> | |
</dependency> | |
--> | |
<!-- I didn't need these dependencies for my sample, uncomment if you need it. | |
<dependency> | |
<groupId>org.apache.hive</groupId> | |
<artifactId>hive-metastore</artifactId> | |
<version>0.14.0</version> | |
</dependency> | |
<dependency> | |
<groupId>org.apache.hive</groupId> | |
<artifactId>hive-service</artifactId> | |
<version>0.14.0</version> | |
</dependency> | |
--> | |
</dependencies> | |
<build> | |
<sourceDirectory>src/main/java</sourceDirectory> | |
<plugins> | |
<plugin> | |
<groupId>org.apache.maven.plugins</groupId> | |
<artifactId>maven-shade-plugin</artifactId> | |
<version>2.3</version> | |
<configuration> | |
<transformers> | |
<transformer implementation="org.apache.maven.plugins.shade.resource.ApacheLicenseResourceTransformer"> | |
</transformer> | |
</transformers> | |
</configuration> | |
<executions> | |
<execution> | |
<phase>package</phase> | |
<goals> | |
<goal>shade</goal> | |
</goals> | |
</execution> | |
</executions> | |
</plugin> | |
</plugins> | |
</build> | |
</project> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment