hadoop-hive-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From zs...@apache.org
Subject svn commit: r765065 - in /hadoop/hive/trunk: CHANGES.txt build-common.xml build.xml ql/build.xml
Date Wed, 15 Apr 2009 06:33:01 GMT
Author: zshao
Date: Wed Apr 15 06:33:00 2009
New Revision: 765065

URL: http://svn.apache.org/viewvc?rev=765065&view=rev
Log:
HIVE-406. Build file improvements. (Joydeep Sen Sarma via zshao).

Modified:
    hadoop/hive/trunk/CHANGES.txt
    hadoop/hive/trunk/build-common.xml
    hadoop/hive/trunk/build.xml
    hadoop/hive/trunk/ql/build.xml

Modified: hadoop/hive/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/hive/trunk/CHANGES.txt?rev=765065&r1=765064&r2=765065&view=diff
==============================================================================
--- hadoop/hive/trunk/CHANGES.txt (original)
+++ hadoop/hive/trunk/CHANGES.txt Wed Apr 15 06:33:00 2009
@@ -12,6 +12,8 @@
     HIVE-360. Generalize the FileFormat Interface in Hive.
     (He Yongqiang via zshao)
 
+    HIVE-406. Build file improvements. (Joydeep Sen Sarma via zshao).
+
   OPTIMIZATIONS
 
     HIVE-279. Predicate Pushdown support (Prasad Chakka via athusoo).

Modified: hadoop/hive/trunk/build-common.xml
URL: http://svn.apache.org/viewvc/hadoop/hive/trunk/build-common.xml?rev=765065&r1=765064&r2=765065&view=diff
==============================================================================
--- hadoop/hive/trunk/build-common.xml (original)
+++ hadoop/hive/trunk/build-common.xml Wed Apr 15 06:33:00 2009
@@ -33,7 +33,6 @@
   <property name="build.dir" location="${build.dir.hive}/${ant.project.name}"/>
   <property name="build.classes" location="${build.dir}/classes"/>
   <property name="build.encoding" value="ISO-8859-1"/>
-  <property name="deploy.dir" location="${build.dir.hive}"/>
 
   <property name="hadoop.conf.dir" location="${hadoop.root}/conf"/>
 
@@ -100,24 +99,17 @@
     <antcall target="install-hadoopcore-default"/>
   </target>
 
-  <!-- I am not sure whether we need this target any more since that package does what
is needed -->
-  <target name="deploy" depends="jar">
-    <echo message="hive: ${ant.project.name}"/>
-    <mkdir dir="${deploy.dir}"/>
-    <copy file="${build.dir}/hive_${ant.project.name}.jar"
-          todir="${deploy.dir}"/>
-  </target>
-
   <!-- the normal classpath -->
   <path id="common-classpath">
     <pathelement location="${hadoop.jar}"/>
     <pathelement location="${build.dir.hive}/classes"/>
-    <fileset dir="${build.dir.hive}" includes="hive_*.jar"/>
+    <fileset dir="${build.dir.hive}" includes="*/*.jar"/>
     <fileset dir="${hive.root}/lib" includes="*.jar"/>
     <fileset dir="${hive.root}/ql/lib" includes="*.jar"/>
   </path>
 
   <path id="classpath">
+    <pathelement location="${build.dir.hive}/service/classes"/>
     <pathelement location="${build.dir.hive}/common/classes"/>
     <pathelement location="${build.dir.hive}/serde/classes"/>
     <pathelement location="${build.dir.hive}/metastore/classes"/>
@@ -238,7 +230,7 @@
   </target>
 
   <target name="deploy-ant-tasks" depends="compile-ant-tasks">
-    <subant target="deploy">
+    <subant target="jar">
       <fileset dir=".." includes="ant/build.xml"/>
     </subant>
   </target>

Modified: hadoop/hive/trunk/build.xml
URL: http://svn.apache.org/viewvc/hadoop/hive/trunk/build.xml?rev=765065&r1=765064&r2=765065&view=diff
==============================================================================
--- hadoop/hive/trunk/build.xml (original)
+++ hadoop/hive/trunk/build.xml Wed Apr 15 06:33:00 2009
@@ -18,7 +18,7 @@
 -->
 
 
-<project name="hive" default="deploy" >
+<project name="hive" default="jar" >
 
   <property name="hive.root" location="${basedir}"/>
   <property file="${hive.root}/build.properties"/>
@@ -58,6 +58,24 @@
     </sequential>
   </macrodef>
 
+  <macrodef name="iterate-all">
+    <attribute name="target"/>
+    <sequential>
+      <subant target="@{target}">
+        <filelist dir="." files="common/build.xml,serde/build.xml,metastore/build.xml,ql/build.xml,cli/build.xml,service/build.xml,jdbc/build.xml,hwi/build.xml,ant/build.xml"/>
+      </subant>
+    </sequential>
+  </macrodef>
+
+  <macrodef name="iterate">
+    <attribute name="target"/>
+    <sequential>
+      <subant target="@{target}">
+        <filelist dir="." files="common/build.xml,serde/build.xml,metastore/build.xml,ql/build.xml,cli/build.xml,service/build.xml,jdbc/build.xml,hwi/build.xml"/>
+      </subant>
+    </sequential>
+  </macrodef>
+
   <!-- the normal classpath -->
   <path id="common-classpath">
     <pathelement location="${hadoop.jar}"/>
@@ -80,92 +98,24 @@
     <path refid="common-classpath"/>
   </path>
 
-  <!-- ====================================================== -->
-  <!-- Initialize for running junit tests                     -->
-  <!-- ====================================================== -->
-
   <target name="init">
-    <subant target="init">
-      <fileset dir="." includes="*/build.xml"/>
-    </subant>
+    <iterate-all target="init"/>
   </target>
 
   <target name="test-init">
-    <subant target="test-init">
-      <fileset dir="." includes="*/build.xml"/>
-    </subant>
+    <iterate-all target="test-init"/>
   </target>
 
-
-  <!-- ====================================================== -->
-  <!-- Compile all the contrib jars.                          -->
-  <!-- ====================================================== -->
-
   <target name="compile">
-    <subant target="compile">
-      <fileset dir="." includes="common/build.xml"/>
-    </subant>
-    <subant target="compile">
-      <fileset dir="." includes="serde/build.xml"/>
-    </subant>
-    <subant target="compile">
-      <fileset dir="." includes="metastore/build.xml"/>
-    </subant>
-    <subant target="compile">
-      <fileset dir="." includes="ql/build.xml"/>
-    </subant>
-    <subant target="compile">
-      <fileset dir="." includes="cli/build.xml"/>
-    </subant>
-    <subant target="compile">
-      <fileset dir="." includes="service/build.xml"/>
-    </subant>
-    <subant target="compile">
-      <fileset dir="." includes="jdbc/build.xml"/>
-    </subant>
-    <subant target="compile">
-      <fileset dir="." includes="hwi/build.xml"/>
-    </subant>
+    <iterate target="compile"/>
   </target>
 
-  <!-- ====================================================== -->
-  <!-- Build & deploy all the contrib jars.                   -->
-  <!-- ====================================================== -->
-
-  <target name="deploy">
-    <subant target="deploy">
-      <fileset dir="." includes="common/build.xml"/>
-    </subant>
-    <subant target="deploy">
-      <fileset dir="." includes="serde/build.xml"/>
-    </subant>
-    <subant target="deploy">
-      <fileset dir="." includes="metastore/build.xml"/>
-    </subant>
-    <subant target="deploy">
-      <fileset dir="." includes="ql/build.xml"/>
-    </subant>
-    <subant target="deploy">
-      <fileset dir="." includes="cli/build.xml"/>
-    </subant>
-    <subant target="deploy">
-      <fileset dir="." includes="service/build.xml"/>
-    </subant>
-    <subant target="deploy">
-      <fileset dir="." includes="jdbc/build.xml"/>
-    </subant>
-    <subant target="deploy">
-      <fileset dir="." includes="hwi/build.xml"/>
-    </subant>
+  <target name="jar">
+    <iterate target="jar"/>
   </target>
 
-  <!-- ====================================================== -->
-  <!-- Test everything.                                       -->
-  <!-- ====================================================== -->
-  <target name="test" depends="clean-test,deploy">
-    <subant target="test">
-      <fileset dir="." includes="*/build.xml" excludes="ant/build.xml"/>
-    </subant>
+  <target name="test" depends="clean-test,jar">
+    <iterate target="test"/>
   </target>
 	
   <!-- create an html report from junit output files -->
@@ -179,19 +129,12 @@
   </target>
 
   <target name="clean-test">
-    <subant target="clean-test">
-      <fileset dir="." includes="*/build.xml" excludes="ant/build.xml"/>
-    </subant>
+    <iterate target="clean-test"/>
     <delete dir="${build.dir.hive}/test"/>
   </target>
 
-  <!-- ====================================================== -->
-  <!-- Clean everything.                                      -->
-  <!-- ====================================================== -->
   <target name="clean">
-    <subant target="clean">
-      <fileset dir="." includes="*/build.xml"/>
-    </subant>
+    <iterate-all target="clean"/>
     <delete dir="${target.dir}"/>
     <delete dir="${build.dir.hive}"/>
   </target>
@@ -199,13 +142,13 @@
   <!-- ====================================================== -->
   <!-- Generate some of the test data.                        -->
   <!-- ====================================================== -->
-  <target name="gen-testdata" depends="deploy">
+  <target name="gen-testdata" depends="jar">
     <subant target="gen-testdata">
       <fileset dir="." includes="serde/build.xml"/>
     </subant>
   </target>
 
-  <target name="package" depends="deploy">
+  <target name="package" depends="jar">
     <echo message="Deploying Hive jars to ${target.dir}"/>
     <mkdir dir="${target.dir}"/>
     <mkdir dir="${target.lib.dir}"/>

Modified: hadoop/hive/trunk/ql/build.xml
URL: http://svn.apache.org/viewvc/hadoop/hive/trunk/ql/build.xml?rev=765065&r1=765064&r2=765065&view=diff
==============================================================================
--- hadoop/hive/trunk/ql/build.xml (original)
+++ hadoop/hive/trunk/ql/build.xml Wed Apr 15 06:33:00 2009
@@ -45,7 +45,7 @@
 
   <target name="gen-test" depends="deploy-ant-tasks, test-conditions, test-init" >
     <taskdef name="qtestgen" classname="org.apache.hadoop.hive.ant.QTestGenTask"
-             classpath="${build.dir.hive}/hive_anttasks.jar:${hive.root}/lib/velocity-1.5.jar:${hive.root}/lib/commons-collections-3.2.1.jar:${hive.root}/lib/commons-lang-2.4.jar"/>
+             classpath="${build.dir.hive}/anttasks/hive_anttasks.jar:${hive.root}/lib/velocity-1.5.jar:${hive.root}/lib/commons-collections-3.2.1.jar:${hive.root}/lib/commons-lang-2.4.jar"/>
     
     <qtestgen outputDirectory="${test.build.src}/org/apache/hadoop/hive/ql/parse" 
               templatePath="${ql.test.template.dir}" template="TestParse.vm" 
@@ -102,7 +102,7 @@
   <target name="configure" depends="deploy-ant-tasks">
     <!-- If not set already make sure that they are defined but empty -->
     <taskdef name="getversionpref" classname="org.apache.hadoop.hive.ant.GetVersionPref"
-             classpath="${build.dir.hive}/hive_anttasks.jar"/>
+             classpath="${build.dir.hive}/anttasks/hive_anttasks.jar"/>
 
     <getversionpref property="hadoop.version.prefix" input="${hadoop.version}"/>
 



Mime
View raw message