Author: travis
Date: Tue Nov 27 00:05:49 2012
New Revision: 1413950
URL: http://svn.apache.org/viewvc?rev=1413950&view=rev
Log:
HCATALOG-542 Fix 0.23 build and dependencies
Added:
incubator/hcatalog/trunk/build-support/scripts/test.sh (with props)
Modified:
incubator/hcatalog/trunk/CHANGES.txt
incubator/hcatalog/trunk/ant/deploy.xml
incubator/hcatalog/trunk/build-common.xml
incubator/hcatalog/trunk/build.properties
incubator/hcatalog/trunk/build.xml
incubator/hcatalog/trunk/core/build.xml
incubator/hcatalog/trunk/core/pom.xml
incubator/hcatalog/trunk/pom.xml
incubator/hcatalog/trunk/shims/build.xml
incubator/hcatalog/trunk/webhcat/svr/pom.xml
Modified: incubator/hcatalog/trunk/CHANGES.txt
URL:
http://svn.apache.org/viewvc/incubator/hcatalog/trunk/CHANGES.txt?rev=1413950&r1=1413949&r2=1413950&view=diff
==============================================================================
--- incubator/hcatalog/trunk/CHANGES.txt (original)
+++ incubator/hcatalog/trunk/CHANGES.txt Tue Nov 27 00:05:49 2012
@@ -44,6 +44,8 @@ Trunk (unreleased changes)
HCAT-427 Document storage-based authorization (lefty via gates)
IMPROVEMENTS
+ HCAT-542 Fix 0.23 build and dependencies (traviscrawford)
+
HCAT-531 HCatContext should be an enum (traviscrawford)
HCAT-530 HCatBaseLoader.getSizeInBytes NPE when partition path is missing
(traviscrawford)
Modified: incubator/hcatalog/trunk/ant/deploy.xml
URL:
http://svn.apache.org/viewvc/incubator/hcatalog/trunk/ant/deploy.xml?rev=1413950&r1=1413949&r2=1413950&view=diff
==============================================================================
--- incubator/hcatalog/trunk/ant/deploy.xml (original)
+++ incubator/hcatalog/trunk/ant/deploy.xml Tue Nov 27 00:05:49 2012
@@ -45,6 +45,9 @@
<taskdef resource="org/apache/maven/artifact/ant/antlib.xml"
uri="artifact:org.apache.maven.artifact.ant"
classpath="${path.to.basedir}/build/maven-ant-tasks-${maven-ant-tasks.version}.jar"/>
+ <artifact:pom id="mvn.pom" file="pom.xml">
+ <profile id="${_mvn.hadoop.profile}"/>
+ </artifact:pom>
<property name="mvn-init.complete" value="true"/>
</target>
@@ -58,18 +61,18 @@
unless="mvn-dependencies.complete">
<echo message="${ant.project.name}"/>
- <artifact:dependencies pathId="mvn.compile.classpath" scopes="compile">
+ <artifact:dependencies pathId="mvn.compile.classpath"
+ scopes="compile" pomRefId="mvn.pom">
<localRepository path="${mvn.local.repo}"/>
- <pom file="pom.xml"/>
</artifact:dependencies>
<mkdir dir="${build.dir}/lib/compile"/>
<copy todir="${build.dir}/lib/compile">
<path refid="mvn.compile.classpath"/>
</copy>
- <artifact:dependencies pathId="mvn.test.classpath" scopes="compile,
test">
+ <artifact:dependencies pathId="mvn.test.classpath"
+ scopes="compile, test" pomRefId="mvn.pom">
<localRepository path="${mvn.local.repo}"/>
- <pom file="pom.xml"/>
</artifact:dependencies>
<mkdir dir="${build.dir}/lib/test"/>
<copy todir="${build.dir}/lib/test">
@@ -81,8 +84,8 @@
<target name="mvn-deploy" depends="mvn-init" description="Deploy artifacts
to a Maven repository.">
<echo message="${ant.project.name}"/>
- <artifact:deploy
file="${build.dir}/${ant.project.name}-${hcatalog.version}.jar">
- <artifact:pom file="${pom.file}"/>
+ <artifact:deploy
file="${build.dir}/${ant.project.name}-${hcatalog.version}.jar"
+ pomRefId="mvn.pom">
<remoteRepository id="${mvn.deploy.repo.id}"
url="${mvn.deploy.repo.url}"/>
</artifact:deploy>
</target>
@@ -92,8 +95,8 @@
<echo message="${ant.project.name}"/>
<_sign
inputFile="${build.dir}/${ant.project.name}-${hcatalog.version}.jar"/>
<_sign inputFile="${pom.file}"/>
- <artifact:deploy
file="${build.dir}/${ant.project.name}-${hcatalog.version}.jar">
- <artifact:pom file="${pom.file}"/>
+ <artifact:deploy
file="${build.dir}/${ant.project.name}-${hcatalog.version}.jar"
+ pomRefId="mvn.pom">
<attach
file="${build.dir}/${ant.project.name}-${hcatalog.version}.jar.asc"
type="jar.asc"/>
<attach file="${pom.file}.asc" type="pom.asc"/>
<remoteRepository id="${mvn.deploy.repo.id}"
url="${mvn.deploy.repo.url}"/>
Modified: incubator/hcatalog/trunk/build-common.xml
URL:
http://svn.apache.org/viewvc/incubator/hcatalog/trunk/build-common.xml?rev=1413950&r1=1413949&r2=1413950&view=diff
==============================================================================
--- incubator/hcatalog/trunk/build-common.xml (original)
+++ incubator/hcatalog/trunk/build-common.xml Tue Nov 27 00:05:49 2012
@@ -22,6 +22,13 @@
<loadproperties srcfile="${path.to.basedir}/build.properties"/>
+ <condition property="hadoopversion" value="20">
+ <equals arg1="${_mvn.hadoop.profile}" arg2="hadoop20"/>
+ </condition>
+ <condition property="hadoopversion" value="23">
+ <equals arg1="${_mvn.hadoop.profile}" arg2="hadoop23"/>
+ </condition>
+
<import file="${path.to.basedir}/ant/checkstyle.xml"/>
<import file="${path.to.basedir}/ant/deploy.xml"/>
<import file="${path.to.basedir}/ant/findbugs.xml"/>
Added: incubator/hcatalog/trunk/build-support/scripts/test.sh
URL:
http://svn.apache.org/viewvc/incubator/hcatalog/trunk/build-support/scripts/test.sh?rev=1413950&view=auto
==============================================================================
--- incubator/hcatalog/trunk/build-support/scripts/test.sh (added)
+++ incubator/hcatalog/trunk/build-support/scripts/test.sh Tue Nov 27 00:05:49
2012
@@ -0,0 +1,22 @@
+#!/bin/bash
+
+function run_cmd() {
+ echo "Running command: ${cmd}"
+ ${cmd}
+ if [ $? != 0 ]; then
+ echo "Failed!"
+ exit 1
+ fi
+}
+
+umask 0022
+
+# Build with hadoop23, but do not run tests as they do not pass.
+cmd='ant clean package -Dmvn.hadoop.profile=hadoop23'
+run_cmd
+
+# Build and run tests with hadoop20. This must happen afterwards so test
results
+# are available for CI to publish.
+cmd='ant clean package test -Dtest.junit.output.format=xml'
+run_cmd
+
Propchange: incubator/hcatalog/trunk/build-support/scripts/test.sh
------------------------------------------------------------------------------
svn:executable = *
Modified: incubator/hcatalog/trunk/build.properties
URL:
http://svn.apache.org/viewvc/incubator/hcatalog/trunk/build.properties?rev=1413950&r1=1413949&r2=1413950&view=diff
==============================================================================
--- incubator/hcatalog/trunk/build.properties (original)
+++ incubator/hcatalog/trunk/build.properties Tue Nov 27 00:05:49 2012
@@ -47,9 +47,6 @@ javac.version=1.6
javac.args=
javac.args.warnings=
-#Set to 20 to build against hadoop 1.0.2 or 23 to build against hadoop 0.23.1
-hadoopversion=20
-
# hive properties
#shims.name=20
shims.20S.hive.shims.include=0.20,0.20S
@@ -78,3 +75,5 @@ mvn.deploy.repo.id=apache.snapshots.http
mvn.deploy.repo.url=https://repository.apache.org/content/repositories/snapshots
maven-ant-tasks.version=2.1.3
mvn.local.repo=${user.home}/.m2/repository
+mvn.hadoop.profile=hadoop20
+
Modified: incubator/hcatalog/trunk/build.xml
URL:
http://svn.apache.org/viewvc/incubator/hcatalog/trunk/build.xml?rev=1413950&r1=1413949&r2=1413950&view=diff
==============================================================================
--- incubator/hcatalog/trunk/build.xml (original)
+++ incubator/hcatalog/trunk/build.xml Tue Nov 27 00:05:49 2012
@@ -60,12 +60,24 @@
================================================================================
-->
<target name="jar" depends="init" description="build all jars">
- <ant target="jar" dir="core" inheritAll="false"/>
- <ant target="jar" dir="hcatalog-pig-adapter" inheritAll="false"/>
- <ant target="jar" dir="server-extensions" inheritAll="false"/>
- <ant target="jar" dir="webhcat/svr" inheritAll="false"/>
- <ant target="jar" dir="webhcat/java-client" inheritAll="false"/>
- <ant target="jar" dir="storage-handlers/hbase" inheritAll="false"/>
+ <ant target="jar" dir="core" inheritAll="false">
+ <property name="_mvn.hadoop.profile" value="${mvn.hadoop.profile}"/>
+ </ant>
+ <ant target="jar" dir="hcatalog-pig-adapter" inheritAll="false">
+ <property name="_mvn.hadoop.profile" value="${mvn.hadoop.profile}"/>
+ </ant>
+ <ant target="jar" dir="server-extensions" inheritAll="false">
+ <property name="_mvn.hadoop.profile" value="${mvn.hadoop.profile}"/>
+ </ant>
+ <ant target="jar" dir="webhcat/svr" inheritAll="false">
+ <property name="_mvn.hadoop.profile" value="hadoop20"/>
+ </ant>
+ <ant target="jar" dir="webhcat/java-client" inheritAll="false">
+ <property name="_mvn.hadoop.profile" value="${mvn.hadoop.profile}"/>
+ </ant>
+ <ant target="jar" dir="storage-handlers/hbase" inheritAll="false">
+ <property name="_mvn.hadoop.profile" value="hadoop20"/>
+ </ant>
</target>
<!--
Modified: incubator/hcatalog/trunk/core/build.xml
URL:
http://svn.apache.org/viewvc/incubator/hcatalog/trunk/core/build.xml?rev=1413950&r1=1413949&r2=1413950&view=diff
==============================================================================
--- incubator/hcatalog/trunk/core/build.xml (original)
+++ incubator/hcatalog/trunk/core/build.xml Tue Nov 27 00:05:49 2012
@@ -45,7 +45,9 @@
<_javac srcDir="${basedir}/src/main/java"
destDir="${build.classes}"
classPathRef="compile.class.path"/>
- <ant target="jar" dir="${path.to.basedir}/shims" inheritAll="false"/>
+ <ant target="jar" dir="${path.to.basedir}/shims" inheritAll="false">
+ <property name="_mvn.hadoop.profile" value="${mvn.hadoop.profile}"/>
+ </ant>
</target>
</project>
Modified: incubator/hcatalog/trunk/core/pom.xml
URL:
http://svn.apache.org/viewvc/incubator/hcatalog/trunk/core/pom.xml?rev=1413950&r1=1413949&r2=1413950&view=diff
==============================================================================
--- incubator/hcatalog/trunk/core/pom.xml (original)
+++ incubator/hcatalog/trunk/core/pom.xml Tue Nov 27 00:05:49 2012
@@ -36,12 +36,6 @@
<dependencies>
<dependency>
- <groupId>org.apache.hadoop</groupId>
- <artifactId>hadoop-tools</artifactId>
- <version>${hadoop20.version}</version>
- <scope>compile</scope>
- </dependency>
- <dependency>
<groupId>org.apache.hive</groupId>
<artifactId>hive-builtins</artifactId>
<version>${hive.version}</version>
Modified: incubator/hcatalog/trunk/pom.xml
URL:
http://svn.apache.org/viewvc/incubator/hcatalog/trunk/pom.xml?rev=1413950&r1=1413949&r2=1413950&view=diff
==============================================================================
--- incubator/hcatalog/trunk/pom.xml (original)
+++ incubator/hcatalog/trunk/pom.xml Tue Nov 27 00:05:49 2012
@@ -7,9 +7,11 @@
<commons-exec.version>1.1</commons-exec.version>
<commons-io.version>2.4</commons-io.version>
<hadoop20.version>1.0.3</hadoop20.version>
+ <hadoop23.version>0.23.3</hadoop23.version>
<hbase.version>0.92.0</hbase.version>
<hcatalog.version>0.5.0-SNAPSHOT</hcatalog.version>
<hive.version>0.10.0-SNAPSHOT</hive.version>
+ <jackson.version>1.8.8</jackson.version>
<jersey.version>1.14</jersey.version>
<jetty.webhcat.version>7.6.0.v20120127</jetty.webhcat.version>
<jms.version>1.1</jms.version>
@@ -30,6 +32,69 @@
<version>0.5.0-SNAPSHOT</version>
<packaging>pom</packaging>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <version>2.5.1</version>
+ <configuration>
+ <source>1.6</source>
+ <target>1.6</target>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+
+ <profiles>
+ <profile>
+ <id>hadoop20</id>
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.hadoop</groupId>
+ <artifactId>hadoop-tools</artifactId>
+ <version>${hadoop20.version}</version>
+ <scope>compile</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.hadoop</groupId>
+ <artifactId>hadoop-test</artifactId>
+ <version>${hadoop20.version}</version>
+ <scope>test</scope>
+ </dependency>
+ </dependencies>
+ </profile>
+ <profile>
+ <id>hadoop23</id>
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.hadoop</groupId>
+ <artifactId>hadoop-archives</artifactId>
+ <version>${hadoop23.version}</version>
+ <scope>compile</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.hadoop</groupId>
+ <artifactId>hadoop-common</artifactId>
+ <version>${hadoop23.version}</version>
+ <scope>compile</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.hadoop</groupId>
+ <artifactId>hadoop-hdfs</artifactId>
+ <version>${hadoop23.version}</version>
+ <scope>compile</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.hadoop</groupId>
+ <artifactId>hadoop-mapreduce-client-core</artifactId>
+ <version>${hadoop23.version}</version>
+ <scope>compile</scope>
+ </dependency>
+ </dependencies>
+ </profile>
+ </profiles>
+
<repositories>
<!-- This is necessary for hive-metastore dependencies. -->
<repository>
@@ -78,13 +143,6 @@
</exclusion>
</exclusions>
</dependency>
- <dependency>
- <groupId>org.apache.hadoop</groupId>
- <artifactId>hadoop-test</artifactId>
- <version>${hadoop20.version}</version>
- <scope>test</scope>
- </dependency>
-
</dependencies>
</project>
Modified: incubator/hcatalog/trunk/shims/build.xml
URL:
http://svn.apache.org/viewvc/incubator/hcatalog/trunk/shims/build.xml?rev=1413950&r1=1413949&r2=1413950&view=diff
==============================================================================
--- incubator/hcatalog/trunk/shims/build.xml (original)
+++ incubator/hcatalog/trunk/shims/build.xml Tue Nov 27 00:05:49 2012
@@ -19,14 +19,14 @@
<project name="shims" default="jar">
<property name="path.to.basedir" value="${basedir}/.."/>
- <import file="../build-common.xml"/>
+ <import file="${path.to.basedir}/build-common.xml"/>
<path id="compile.class.path">
<fileset dir="${path.to.basedir}/core/build/lib/compile"/>
</path>
<target name="jar">
- <echo message="Project: ${ant.project.name}"/>
+ <echo message="${ant.project.name}"/>
<_javac srcDir="${basedir}/src/${hadoopversion}/java"
destDir="${path.to.basedir}/core/build/classes"
classPathRef="compile.class.path"/>
Modified: incubator/hcatalog/trunk/webhcat/svr/pom.xml
URL:
http://svn.apache.org/viewvc/incubator/hcatalog/trunk/webhcat/svr/pom.xml?rev=1413950&r1=1413949&r2=1413950&view=diff
==============================================================================
--- incubator/hcatalog/trunk/webhcat/svr/pom.xml (original)
+++ incubator/hcatalog/trunk/webhcat/svr/pom.xml Tue Nov 27 00:05:49 2012
@@ -54,6 +54,12 @@
<scope>compile</scope>
</dependency>
<dependency>
+ <groupId>org.codehaus.jackson</groupId>
+ <artifactId>jackson-mapper-asl</artifactId>
+ <version>${jackson.version}</version>
+ <scope>compile</scope>
+ </dependency>
+ <dependency>
<groupId>org.eclipse.jetty.aggregate</groupId>
<artifactId>jetty-all-server</artifactId>
<version>${jetty.webhcat.version}</version>