Skip to content

Commit

Permalink
HIVE-726. Make "ant package -Dhadoop.version=0.17.0" work. (Todd Lipc…
Browse files Browse the repository at this point in the history
…on via zshao)

git-svn-id: https://svn.apache.org/repos/asf/hadoop/hive/trunk@812607 13f79535-47bb-0310-9956-ffa450edef68
  • Loading branch information
zshao committed Sep 8, 2009
1 parent 4635aaf commit 9cddeed
Show file tree
Hide file tree
Showing 11 changed files with 33 additions and 28 deletions.
3 changes: 3 additions & 0 deletions CHANGES.txt
Original file line number Diff line number Diff line change
Expand Up @@ -609,6 +609,9 @@ Release 0.4.0 - Unreleased

HIVE-794. MergeTask should use COMPRESSRESULT. (Saurabh Nanda via zshao)

HIVE-726. Make "ant package -Dhadoop.version=0.17.0" work.
(Todd Lipcon via zshao)

Release 0.3.1 - Unreleased

INCOMPATIBLE CHANGES
Expand Down
8 changes: 4 additions & 4 deletions build-common.xml
Original file line number Diff line number Diff line change
Expand Up @@ -79,12 +79,12 @@
<ivy:retrieve pattern="${build.dir.hadoop}/[artifact]-[revision].[ext]"/>
</target>

<available property="hadoopcore.${hadoop.version}.install.done" file="${build.dir.hadoop}/hadoop-${hadoop.version}.installed"/>
<available property="hadoopcore.${hadoop.version.ant-internal}.install.done" file="${build.dir.hadoop}/hadoop-${hadoop.version.ant-internal}.installed"/>

<target name="install-hadoopcore-internal" depends="resolve" unless="hadoopcore.${hadoop.version}.install.done">
<untar src="${build.dir.hadoop}/hadoop-${hadoop.version}.tar.gz" dest="${build.dir.hadoop}" compression="gzip"/>
<target name="install-hadoopcore-internal" depends="resolve" unless="hadoopcore.${hadoop.version.ant-internal}.install.done">
<untar src="${build.dir.hadoop}/hadoop-${hadoop.version.ant-internal}.tar.gz" dest="${build.dir.hadoop}" compression="gzip"/>
<chmod file="${hadoop.root}/bin/hadoop" perm="+x"/>
<touch file="${build.dir.hadoop}/hadoop-${hadoop.version}.installed"/>
<touch file="${build.dir.hadoop}/hadoop-${hadoop.version.ant-internal}.installed"/>
</target>

<target name="install-hadoopcore-default" unless="hadoop.root.nondefault">
Expand Down
8 changes: 5 additions & 3 deletions build.properties
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,12 @@ hadoop.mirror=http://archive.apache.org/dist
build.dir.hive=${hive.root}/build
build.dir.hadoop=${build.dir.hive}/hadoopcore

hadoop.root.default=${build.dir.hadoop}/hadoop-${hadoop.version}

hadoop.version.ant-internal=${hadoop.version}
hadoop.root.default=${build.dir.hadoop}/hadoop-${hadoop.version.ant-internal}
hadoop.root=${hadoop.root.default}
hadoop.jar=${hadoop.root}/hadoop-${hadoop.version}-core.jar
hadoop.test.jar=${hadoop.root}/hadoop-${hadoop.version}-test.jar
hadoop.jar=${hadoop.root}/hadoop-${hadoop.version.ant-internal}-core.jar
hadoop.test.jar=${hadoop.root}/hadoop-${hadoop.version.ant-internal}-test.jar
jetty.test.jar=${hadoop.root}/lib/jetty-5.1.4.jar
servlet.test.jar=${hadoop.root}/lib/servlet-api.jar
jasper.test.jar=${hadoop.root}/lib/jetty-ext/jasper-runtime.jar
Expand Down
14 changes: 7 additions & 7 deletions build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
<property name="images.src" value="${docs.src}/images"/>
<property name="javadoc.link.java"
value="http://java.sun.com/javase/6/docs/api/"/>
<property name="final.name" value="${name}-${version}-hadoop-${hadoop.version}"/>
<property name="final.name" value="${name}-${version}-hadoop-${hadoop.version.ant-internal}"/>
<property name="dev.final.name" value="${final.name}-dev"/>
<property name="bin.final.name" value="${final.name}-bin"/>

Expand Down Expand Up @@ -267,17 +267,17 @@
<target name="eclipse-files" depends="init"
description="Generate files for Eclipse">

<condition property="hadoop.version" value="0.19">
<condition property="hadoop.version.ant-internal" value="0.19">
<not>
<isset property="hadoop.version"/>
<isset property="hadoop.version.ant-internal"/>
</not>
</condition>
<echo message="Using hadoop version ${hadoop.version}"/>
<echo message="Using hadoop version ${hadoop.version.ant-internal}"/>

<taskdef name="getversionpref" classname="org.apache.hadoop.hive.ant.GetVersionPref"
classpath="${build.dir.hive}/anttasks/hive_anttasks.jar"/>

<getversionpref property="hadoop.version.prefix" input="${hadoop.version}"/>
<getversionpref property="hadoop.version.ant-internal.prefix" input="${hadoop.version.ant-internal}"/>

<pathconvert property="eclipse.project">
<path path="${basedir}"/>
Expand All @@ -290,8 +290,8 @@
</fileset>
<filterset>
<filter token="PROJECT" value="${eclipse.project}"/>
<filter token="HADOOPVER" value="${hadoop.version}"/>
<filter token="HADOOPVERPREF" value="${hadoop.version.prefix}"/>
<filter token="HADOOPVER" value="${hadoop.version.ant-internal}"/>
<filter token="HADOOPVERPREF" value="${hadoop.version.ant-internal.prefix}"/>
</filterset>
</copy>
<move todir="." includeemptydirs="false">
Expand Down
2 changes: 1 addition & 1 deletion cli/ivy.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<ivy-module version="2.0">
<info organisation="org.apache.hadoop.hive" module="cli"/>
<dependencies>
<dependency org="hadoop" name="core" rev="${hadoop.version}">
<dependency org="hadoop" name="core" rev="${hadoop.version.ant-internal}">
<artifact name="hadoop" type="source" ext="tar.gz"/>
</dependency>
</dependencies>
Expand Down
2 changes: 1 addition & 1 deletion common/ivy.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<ivy-module version="2.0">
<info organisation="org.apache.hadoop.hive" module="common"/>
<dependencies>
<dependency org="hadoop" name="core" rev="${hadoop.version}">
<dependency org="hadoop" name="core" rev="${hadoop.version.ant-internal}">
<artifact name="hadoop" type="source" ext="tar.gz"/>
</dependency>
</dependencies>
Expand Down
2 changes: 1 addition & 1 deletion contrib/ivy.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<ivy-module version="2.0">
<info organisation="org.apache.hadoop.hive" module="contrib"/>
<dependencies>
<dependency org="hadoop" name="core" rev="${hadoop.version}">
<dependency org="hadoop" name="core" rev="${hadoop.version.ant-internal}">
<artifact name="hadoop" type="source" ext="tar.gz"/>
</dependency>
</dependencies>
Expand Down
2 changes: 1 addition & 1 deletion metastore/ivy.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<ivy-module version="2.0">
<info organisation="org.apache.hadoop.hive" module="metastore"/>
<dependencies>
<dependency org="hadoop" name="core" rev="${hadoop.version}">
<dependency org="hadoop" name="core" rev="${hadoop.version.ant-internal}">
<artifact name="hadoop" type="source" ext="tar.gz"/>
</dependency>
</dependencies>
Expand Down
2 changes: 1 addition & 1 deletion ql/ivy.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<ivy-module version="2.0">
<info organisation="org.apache.hadoop.hive" module="ql"/>
<dependencies>
<dependency org="hadoop" name="core" rev="${hadoop.version}">
<dependency org="hadoop" name="core" rev="${hadoop.version.ant-internal}">
<artifact name="hadoop" type="source" ext="tar.gz"/>
</dependency>
</dependencies>
Expand Down
2 changes: 1 addition & 1 deletion serde/ivy.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<ivy-module version="2.0">
<info organisation="org.apache.hadoop.hive" module="serde"/>
<dependencies>
<dependency org="hadoop" name="core" rev="${hadoop.version}">
<dependency org="hadoop" name="core" rev="${hadoop.version.ant-internal}">
<artifact name="hadoop" type="source" ext="tar.gz"/>
</dependency>
</dependencies>
Expand Down
16 changes: 8 additions & 8 deletions shims/build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ to call at top-level: ant deploy-contrib compile-core-test
</path>

<target name="build_shims" description="Build shims against a particular hadoop version" depends="install-hadoopcore-internal, resolve">
<getversionpref property="hadoop.version.prefix" input="${hadoop.version}" />
<echo message="Compiling shims against hadoop ${hadoop.version}"/>
<getversionpref property="hadoop.version.ant-internal.prefix" input="${hadoop.version.ant-internal}" />
<echo message="Compiling shims against hadoop ${hadoop.version.ant-internal} (${hadoop.root})"/>
<javac
encoding="${build.encoding}"
includes="**/*.java"
Expand All @@ -45,23 +45,23 @@ to call at top-level: ant deploy-contrib compile-core-test
deprecation="${javac.deprecation}">
<compilerarg line="${javac.args} ${javac.args.warnings}" />
<classpath refid="classpath"/>
<src path="${basedir}/src/${hadoop.version.prefix}/java" />
<src path="${basedir}/src/${hadoop.version.ant-internal.prefix}/java" />
<src path="${basedir}/src/common/java" />
</javac>
</target>

<target name="compile" depends="init, install-hadoopcore, setup">
<target name="compile" depends="init">
<antcall target="build_shims" inheritRefs="false" inheritAll="false">
<param name="hadoop.version" value="0.17.2.1" />
<param name="hadoop.version.ant-internal" value="0.17.2.1" />
</antcall>
<antcall target="build_shims" inheritRefs="false" inheritAll="false">
<param name="hadoop.version" value="0.18.3" />
<param name="hadoop.version.ant-internal" value="0.18.3" />
</antcall>
<antcall target="build_shims" inheritRefs="false" inheritAll="false">
<param name="hadoop.version" value="0.19.0" />
<param name="hadoop.version.ant-internal" value="0.19.0" />
</antcall>
<antcall target="build_shims" inheritRefs="false" inheritAll="false">
<param name="hadoop.version" value="0.20.0" />
<param name="hadoop.version.ant-internal" value="0.20.0" />
</antcall>
</target>

Expand Down

0 comments on commit 9cddeed

Please sign in to comment.