You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@drill.apache.org by ja...@apache.org on 2014/03/11 22:57:32 UTC
[4/5] git commit: DRILL-398: Fix build/packaging issues with
storage-hive jars 1. Remove hive-exec dependencies from root pom.xml and move
hive-hbase dependency to contrib/storage-hive/pom.xml. Idea is to download
all required hive dependencies through s
DRILL-398: Fix build/packaging issues with storage-hive jars
1. Remove hive-exec dependencies from root pom.xml and move hive-hbase dependency to contrib/storage-hive/pom.xml. Idea is to download all required hive dependencies through storage-hive artifact.
2. In distribution/pom.xml exclude hive-exec jar from storage-hive dependency. Storage-hive jar already contains the shaded hive-exec.
3. In contrib/storage-hive/pom.xml add a target to unpack the classes in storage-hive.jar into contrib/storage-hive/target/classes directory. Unpacking is needed because when you run 'mvn test' from root directory, dependencies within the project (such as protocol or storage-hive) are resolved to target/classes directory instead of jar. This is by design in Maven. If we don't unpack, we get class not found errors for classes in storage-hive.jar while running tests only.
Project: http://git-wip-us.apache.org/repos/asf/incubator-drill/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-drill/commit/48146084
Tree: http://git-wip-us.apache.org/repos/asf/incubator-drill/tree/48146084
Diff: http://git-wip-us.apache.org/repos/asf/incubator-drill/diff/48146084
Branch: refs/heads/master
Commit: 481460846a5c22d9c9899f5d93d443190c40061c
Parents: 17ea543
Author: vkorukanti <ve...@gmail.com>
Authored: Fri Mar 7 10:22:11 2014 -0800
Committer: Jacques Nadeau <ja...@apache.org>
Committed: Tue Mar 11 14:30:22 2014 -0700
----------------------------------------------------------------------
contrib/storage-hive/pom.xml | 43 ++++++++++++++++++++++++++++++++++-
distribution/pom.xml | 7 +++++-
pom.xml | 48 ---------------------------------------
3 files changed, 48 insertions(+), 50 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-drill/blob/48146084/contrib/storage-hive/pom.xml
----------------------------------------------------------------------
diff --git a/contrib/storage-hive/pom.xml b/contrib/storage-hive/pom.xml
index 237d6d7..314e016 100644
--- a/contrib/storage-hive/pom.xml
+++ b/contrib/storage-hive/pom.xml
@@ -82,6 +82,21 @@
</exclusion>
</exclusions>
</dependency>
+ <dependency>
+ <groupId>org.apache.hive</groupId>
+ <artifactId>hive-hbase-handler</artifactId>
+ <version>0.12.0</version>
+ <exclusions>
+ <exclusion>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-log4j12</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>org.apache.hbase</groupId>
+ <artifactId>hbase</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
</dependencies>
<build>
@@ -114,7 +129,33 @@
</execution>
</executions>
</plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-dependency-plugin</artifactId>
+ <version>2.8</version>
+ <executions>
+ <execution>
+ <id>unpack</id>
+ <phase>package</phase>
+ <goals>
+ <goal>unpack</goal>
+ </goals>
+ <configuration>
+ <artifactItems>
+ <artifactItem>
+ <groupId>org.apache.drill.contrib</groupId>
+ <artifactId>storage-hive</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>
</plugins>
-
</build>
</project>
http://git-wip-us.apache.org/repos/asf/incubator-drill/blob/48146084/distribution/pom.xml
----------------------------------------------------------------------
diff --git a/distribution/pom.xml b/distribution/pom.xml
index ffbac0f..06065f4 100644
--- a/distribution/pom.xml
+++ b/distribution/pom.xml
@@ -32,6 +32,12 @@
<groupId>org.apache.drill.contrib</groupId>
<artifactId>storage-hive</artifactId>
<version>${project.version}</version>
+ <exclusions>
+ <exclusion>
+ <groupId>org.apache.hive</groupId>
+ <artifactId>hive-exec</artifactId>
+ </exclusion>
+ </exclusions>
</dependency>
<dependency>
<groupId>org.apache.drill</groupId>
@@ -86,7 +92,6 @@
<exclude>**/control</exclude>
<exclude>**/*.json</exclude>
<exclude>**/hadoop-excludes.txt</exclude>
- <exclude>**/drill_hive_db/*</exclude>
</excludes>
</configuration>
</plugin>
http://git-wip-us.apache.org/repos/asf/incubator-drill/blob/48146084/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index 9d8b542..967e1da 100644
--- a/pom.xml
+++ b/pom.xml
@@ -118,8 +118,6 @@
<exclude>**/*.tdd</exclude>
<exclude>**/*.iml</exclude>
<exclude>**/target/**</exclude>
- <exclude>**/drill_hive_db/**</exclude>
- <exclude>**/drill_hive_wh/**</exclude>
</excludes>
</configuration>
</plugin>
@@ -360,52 +358,6 @@
<version>${dep.slf4j.version}</version>
</dependency>
- <dependency>
- <groupId>org.apache.hive</groupId>
- <artifactId>hive-exec</artifactId>
- <version>0.12.0</version>
- <exclusions>
- <exclusion>
- <groupId>commons-logging</groupId>
- <artifactId>commons-logging</artifactId>
- </exclusion>
- <exclusion>
- <groupId>commons-logging</groupId>
- <artifactId>commons-logging-api</artifactId>
- </exclusion>
- <exclusion>
- <groupId>jline</groupId>
- <artifactId>jline</artifactId>
- </exclusion>
- <exclusion>
- <groupId>org.slf4j</groupId>
- <artifactId>slf4j-log4j12</artifactId>
- </exclusion>
- <exclusion>
- <groupId>log4j</groupId>
- <artifactId>log4j</artifactId>
- </exclusion>
- <exclusion>
- <groupId>com.google.guava</groupId>
- <artifactId>guava</artifactId>
- </exclusion>
- </exclusions>
- </dependency>
- <dependency>
- <groupId>org.apache.hive</groupId>
- <artifactId>hive-hbase-handler</artifactId>
- <version>0.12.0</version>
- <exclusions>
- <exclusion>
- <groupId>org.slf4j</groupId>
- <artifactId>slf4j-log4j12</artifactId>
- </exclusion>
- <exclusion>
- <groupId>org.apache.hbase</groupId>
- <artifactId>hbase</artifactId>
- </exclusion>
- </exclusions>
- </dependency>
<!-- Test Dependencies -->
<dependency>
<groupId>com.googlecode.jmockit</groupId>