You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hive.apache.org by ha...@apache.org on 2014/06/06 21:53:40 UTC
svn commit: r1600992 - in /hive/trunk: jdbc/pom.xml packaging/pom.xml pom.xml
Author: hashutosh
Date: Fri Jun 6 19:53:40 2014
New Revision: 1600992
URL: http://svn.apache.org/r1600992
Log:
HIVE-538 : make hive_jdbc.jar self-containing (Nick White via Ashutosh Chauhan)
Modified:
hive/trunk/jdbc/pom.xml
hive/trunk/packaging/pom.xml
hive/trunk/pom.xml
Modified: hive/trunk/jdbc/pom.xml
URL: http://svn.apache.org/viewvc/hive/trunk/jdbc/pom.xml?rev=1600992&r1=1600991&r2=1600992&view=diff
==============================================================================
--- hive/trunk/jdbc/pom.xml (original)
+++ hive/trunk/jdbc/pom.xml Fri Jun 6 19:53:40 2014
@@ -110,6 +110,43 @@
<build>
<sourceDirectory>${basedir}/src/java</sourceDirectory>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-shade-plugin</artifactId>
+ <executions>
+ <execution>
+ <phase>package</phase>
+ <goals>
+ <goal>shade</goal>
+ </goals>
+ <configuration>
+ <shadedArtifactAttached>true</shadedArtifactAttached>
+ <shadedClassifierName>${hive.jdbc.driver.classifier}</shadedClassifierName>
+ <artifactSet>
+ <excludes>
+ <exclude>org.apache.hadoop:*</exclude>
+ <exclude>org.apache.hive:hive-ant</exclude>
+ <exclude>org.apache.ant:*</exclude>
+ <exclude>junit:*</exclude>
+ <exclude>org.hamcrest:*</exclude>
+ <exclude>org.mortbay.jetty:*</exclude>
+ <exclude>org.ow2.asm:*</exclude>
+ <exclude>javax.jms:*</exclude>
+ <exclude>com.sun.jersey:*</exclude>
+ <exclude>com.sun.jersey.contribs:*</exclude>
+ <exclude>org.eclipse.jetty.aggregate:*</exclude>
+ <exclude>org.eclipse.jetty.orbit:*</exclude>
+ <exclude>org.tukaani:*</exclude>
+ <exclude>org.iq80.snappy:*</exclude>
+ <exclude>org.apache.velocity:*</exclude>
+ </excludes>
+ </artifactSet>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
</build>
</project>
Modified: hive/trunk/packaging/pom.xml
URL: http://svn.apache.org/viewvc/hive/trunk/packaging/pom.xml?rev=1600992&r1=1600991&r2=1600992&view=diff
==============================================================================
--- hive/trunk/packaging/pom.xml (original)
+++ hive/trunk/packaging/pom.xml Fri Jun 6 19:53:40 2014
@@ -29,6 +29,7 @@
<properties>
<hive.path.to.root>..</hive.path.to.root>
+ <hive.jdbc.driver.jar>apache-hive-${project.version}-jdbc.jar</hive.jdbc.driver.jar>
</properties>
<profiles>
@@ -58,6 +59,55 @@
</execution>
</executions>
</plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-dependency-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>copy</id>
+ <phase>package</phase>
+ <goals>
+ <goal>copy</goal>
+ </goals>
+ <configuration>
+ <artifactItems>
+ <artifactItem>
+ <groupId>${project.groupId}</groupId>
+ <artifactId>hive-jdbc</artifactId>
+ <version>${project.version}</version>
+ <type>jar</type>
+ <classifier>${hive.jdbc.driver.classifier}</classifier>
+ <overWrite>true</overWrite>
+ <outputDirectory>${project.build.directory}</outputDirectory>
+ <destFileName>${hive.jdbc.driver.jar}</destFileName>
+ </artifactItem>
+ </artifactItems>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>build-helper-maven-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>attach-jdbc-driver</id>
+ <phase>package</phase>
+ <goals>
+ <goal>attach-artifact</goal>
+ </goals>
+ <configuration>
+ <artifacts>
+ <artifact>
+ <file>${project.build.directory}/${hive.jdbc.driver.jar}</file>
+ <type>jar</type>
+ <classifier>${hive.jdbc.driver.classifier}</classifier>
+ </artifact>
+ </artifacts>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
</plugins>
</build>
</profile>
Modified: hive/trunk/pom.xml
URL: http://svn.apache.org/viewvc/hive/trunk/pom.xml?rev=1600992&r1=1600991&r2=1600992&view=diff
==============================================================================
--- hive/trunk/pom.xml (original)
+++ hive/trunk/pom.xml Fri Jun 6 19:53:40 2014
@@ -58,6 +58,7 @@
<maven.compiler.useIncrementalCompilation>false</maven.compiler.useIncrementalCompilation>
<maven.repo.local>${settings.localRepository}</maven.repo.local>
<hive.path.to.root>.</hive.path.to.root>
+ <hive.jdbc.driver.classifier>standalone</hive.jdbc.driver.classifier>
<!-- Test Properties -->
<test.extra.path></test.extra.path>
@@ -79,9 +80,11 @@
<maven.install.plugin.version>2.4</maven.install.plugin.version>
<maven.jar.plugin.version>2.2</maven.jar.plugin.version>
<maven.javadoc.plugin.version>2.4</maven.javadoc.plugin.version>
- <maven.shade.plugin.version>2.1</maven.shade.plugin.version>
+ <maven.shade.plugin.version>2.2</maven.shade.plugin.version>
<maven.surefire.plugin.version>2.16</maven.surefire.plugin.version>
<maven.war.plugin.version>2.4</maven.war.plugin.version>
+ <maven.dependency.plugin.version>2.8</maven.dependency.plugin.version>
+ <maven.build-helper.plugin.version>1.8</maven.build-helper.plugin.version>
<!-- Library Dependency Versions -->
<activemq.version>5.5.0</activemq.version>
@@ -640,6 +643,16 @@
<artifactId>maven-bundle-plugin</artifactId>
<version>${felix.version}</version>
</plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-dependency-plugin</artifactId>
+ <version>${maven.dependency.plugin.version}</version>
+ </plugin>
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>build-helper-maven-plugin</artifactId>
+ <version>${maven.build-helper.plugin.version}</version>
+ </plugin>
</plugins>
</pluginManagement>