hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cutt...@apache.org
Subject svn commit: r597262 - in /lucene/hadoop/trunk: CHANGES.txt build.xml src/contrib/build-contrib.xml src/contrib/build.xml
Date Wed, 21 Nov 2007 23:32:45 GMT
Author: cutting
Date: Wed Nov 21 15:32:41 2007
New Revision: 597262

URL: http://svn.apache.org/viewvc?rev=597262&view=rev
Log:
HADOOP-2207.  Add a 'package' target for contrib modules that permits each to determine what
files are copied into release builds.  Contributed by stack.

Modified:
    lucene/hadoop/trunk/CHANGES.txt
    lucene/hadoop/trunk/build.xml
    lucene/hadoop/trunk/src/contrib/build-contrib.xml
    lucene/hadoop/trunk/src/contrib/build.xml

Modified: lucene/hadoop/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/lucene/hadoop/trunk/CHANGES.txt?rev=597262&r1=597261&r2=597262&view=diff
==============================================================================
--- lucene/hadoop/trunk/CHANGES.txt (original)
+++ lucene/hadoop/trunk/CHANGES.txt Wed Nov 21 15:32:41 2007
@@ -75,6 +75,10 @@
     HADOOP-2113. A new shell command "dfs -text" to view the contents of
     a gziped or SequenceFile. (Chris Douglas via dhruba)
 
+    HADOOP-2207.  Add a "package" target for contrib modules that
+    permits each to determine what files are copied into release
+    builds.  (stack via cutting)
+
   OPTIMIZATIONS
 
     HADOOP-1898.  Release the lock protecting the last time of the last stack

Modified: lucene/hadoop/trunk/build.xml
URL: http://svn.apache.org/viewvc/lucene/hadoop/trunk/build.xml?rev=597262&r1=597261&r2=597262&view=diff
==============================================================================
--- lucene/hadoop/trunk/build.xml (original)
+++ lucene/hadoop/trunk/build.xml Wed Nov 21 15:32:41 2007
@@ -319,7 +319,7 @@
   </target>
 
   <target name="compile-contrib" depends="compile-core">
-     <subant target="deploy">
+     <subant target="compile">
         <property name="version" value="${version}"/>
         <fileset file="${contrib.dir}/build.xml"/>
      </subant>  	
@@ -660,7 +660,7 @@
   <!-- ================================================================== -->
   <!--                                                                    -->
   <!-- ================================================================== -->
-  <target name="package" depends="jar, javadoc, examples, compile-core-test, deploy-contrib,
ant-tasks" description="Build distribution">
+  <target name="package" depends="jar, javadoc, examples, compile-core-test, ant-tasks"
description="Build distribution">
     <mkdir dir="${dist.dir}"/>
     <mkdir dir="${dist.dir}/lib"/>
     <mkdir dir="${dist.dir}/contrib"/>
@@ -681,11 +681,13 @@
 	  <arg line="${native.src.dir}/packageNativeHadoop.sh"/>
     </exec>
 
-    <copy todir="${dist.dir}/contrib" includeEmptyDirs="false" flatten="true">
-      <fileset dir="build/contrib">
-        <include name="*/*.jar"/>
-      </fileset>
-    </copy>
+    <subant target="package">
+      <!--Pass down the version in case its needed again and the target
+      distribution directory so contribs know where to install to.-->
+      <property name="version" value="${version}"/>
+      <property name="dist.dir" value="${dist.dir}"/>
+      <fileset file="${contrib.dir}/build.xml"/>
+    </subant>  	
 
     <copy todir="${dist.dir}/webapps">
       <fileset dir="${build.webapps}"/>
@@ -766,15 +768,9 @@
   </target>
 
   <!-- ================================================================== -->
-  <!-- Contrib targets. For now, they must be called explicitely          -->
+  <!-- Clean contrib target. For now, must be called explicitly           -->
   <!-- Using subant instead of ant as a workaround for 30569              -->
   <!-- ================================================================== -->
-  <target name="deploy-contrib" depends="compile-core">
-     <subant target="deploy">        
-        <property name="version" value="${version}"/>
-        <fileset file="src/contrib/build.xml"/>
-     </subant>  	
-  </target>
   <target name="clean-contrib">
      <subant target="clean">        
         <fileset file="src/contrib/build.xml"/>

Modified: lucene/hadoop/trunk/src/contrib/build-contrib.xml
URL: http://svn.apache.org/viewvc/lucene/hadoop/trunk/src/contrib/build-contrib.xml?rev=597262&r1=597261&r2=597262&view=diff
==============================================================================
--- lucene/hadoop/trunk/src/contrib/build-contrib.xml (original)
+++ lucene/hadoop/trunk/src/contrib/build-contrib.xml Wed Nov 21 15:32:41 2007
@@ -31,7 +31,6 @@
   <property name="build.examples" location="${build.dir}/examples"/>
   <property name="hadoop.log.dir" location="${build.dir}/test/logs"/>
   <!-- all jars together -->
-  <property name="deploy.dir" location="${hadoop.root}/build/"/>
   <property name="javac.deprecation" value="off"/>
   <property name="javac.debug" value="on"/>
 
@@ -156,20 +155,22 @@
     </jar>
   </target>
   
-  <target name="deploy" depends="jar, jar-examples" unless="skip.contrib">
-    <echo message="contrib: ${name}"/>
-    <mkdir dir="${deploy.dir}"/>
-    <copy file="${build.dir}/hadoop-${version}-${name}.jar"
-          todir="${deploy.dir}"/>
-    <!-- <copy todir="${deploy.dir}" flatten="true">
-      <fileset refid="lib.jars"/>
-    </copy> -->
+  <!-- ====================================================== -->
+  <!-- Package a Hadoop contrib                               -->
+  <!-- ====================================================== -->
+  <target name="package" depends="jar, jar-examples" unless="skip.contrib"> 
+    <mkdir dir="${dist.dir}/contrib/${name}"/>
+    <copy todir="${dist.dir}/contrib/${name}" includeEmptyDirs="false" flatten="true">
+      <fileset dir="${build.dir}">
+        <include name="hadoop-${version}-${name}.jar" />
+      </fileset>
+    </copy>
   </target>
   
   <!-- ================================================================== -->
   <!-- Run unit tests                                                     -->
   <!-- ================================================================== -->
-  <target name="test" depends="compile-test, deploy" if="test.available">
+  <target name="test" depends="compile-test, compile, compile-examples" if="test.available">
     <echo message="contrib: ${name}"/>
     <delete dir="${hadoop.log.dir}"/>
     <mkdir dir="${hadoop.log.dir}"/>
@@ -213,7 +214,6 @@
   <target name="clean">
     <echo message="contrib: ${name}"/>
     <delete dir="${build.dir}"/>
-    <!--<delete dir="${deploy.dir}"/> -->
   </target>
 
 </project>

Modified: lucene/hadoop/trunk/src/contrib/build.xml
URL: http://svn.apache.org/viewvc/lucene/hadoop/trunk/src/contrib/build.xml?rev=597262&r1=597261&r2=597262&view=diff
==============================================================================
--- lucene/hadoop/trunk/src/contrib/build.xml (original)
+++ lucene/hadoop/trunk/src/contrib/build.xml Wed Nov 21 15:32:41 2007
@@ -1,17 +1,25 @@
 <?xml version="1.0"?>
 
-<project name="hadoopcontrib" default="deploy" basedir=".">
+<project name="hadoopcontrib" default="compile" basedir=".">
   
   <!-- In case one of the contrib subdirectories -->
   <!-- fails the build or test targets and you cannot fix it: -->
   <!-- Then add to fileset: excludes="badcontrib/build.xml" -->
-  
+
   <!-- ====================================================== -->
-  <!-- Build & deploy all the contrib jars.                   -->
+  <!-- Compile contribs.                                      -->
   <!-- ====================================================== -->
+  <target name="compile">
+    <subant target="compile">
+      <fileset dir="." includes="*/build.xml"/>
+    </subant>
+  </target>
   
-  <target name="deploy">
-    <subant target="deploy">
+  <!-- ====================================================== -->
+  <!-- Package contrib jars.                                  -->
+  <!-- ====================================================== -->
+  <target name="package">
+    <subant target="package">
       <fileset dir="." includes="*/build.xml"/>
     </subant>
   </target>



Mime
View raw message