hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From st...@apache.org
Subject svn commit: r789165 - in /hadoop/hbase/trunk: build.xml src/contrib/build-contrib.xml src/contrib/build.xml
Date Sun, 28 Jun 2009 22:39:09 GMT
Author: stack
Date: Sun Jun 28 22:39:08 2009
New Revision: 789165

URL: http://svn.apache.org/viewvc?rev=789165&view=rev
Log:
HBASE-1588 Rig our build to support our new contribs -- stargate and THBase/ITHBase--Added
calling down to src/contrib for each of the major targets

Modified:
    hadoop/hbase/trunk/build.xml
    hadoop/hbase/trunk/src/contrib/build-contrib.xml
    hadoop/hbase/trunk/src/contrib/build.xml

Modified: hadoop/hbase/trunk/build.xml
URL: http://svn.apache.org/viewvc/hadoop/hbase/trunk/build.xml?rev=789165&r1=789164&r2=789165&view=diff
==============================================================================
--- hadoop/hbase/trunk/build.xml (original)
+++ hadoop/hbase/trunk/build.xml Sun Jun 28 22:39:08 2009
@@ -39,6 +39,8 @@
   <property name="docs.dir" value="${basedir}/docs"/>
   <property name="docs.src" value="${basedir}/src/docs"/>
 
+  <property name="contrib.dir" value="${basedir}/src/contrib"/>
+
   <property name="test.output" value="no"/>
   <property name="test.timeout" value="600000"/>
 
@@ -135,12 +137,17 @@
     <chmod perm="ugo+x" type="file">
       <fileset dir="${build.bin}" />
     </chmod>
+    <!--Copy contrib. templates if any-->
+    <copy todir="${contrib.dir}" verbose="true">
+      <fileset dir="${contrib.dir}" includes="**/*.template"/>
+      <mapper type="glob" from="*.template" to="*"/>
+    </copy>
     <exec executable="sh">
        <arg line="src/saveVersion.sh ${version}"/>
     </exec>
   </target>
 
-  <target name="compile" depends="clover,init,jspc">
+  <target name="compile-core" depends="clover,init,jspc" description="Compile hbase core">
    <!--Compile whats under src and generated java classes made from jsp-->
    <javac
     encoding="${build.encoding}"
@@ -154,8 +161,20 @@
      <classpath refid="classpath"/>
    </javac>
   </target>
+
+  <target name="compile-contrib" depends="compile-core" description="Compile contribs">
+     <subant target="compile">
+        <property name="version" value="${version}"/>
+        <fileset file="${contrib.dir}/build.xml"/>
+     </subant>  	
+  </target>
+
+  <target name="compile" depends="compile-core, compile-contrib"
+     description="Compile core, contrib">
+  </target>
 	
-  <target name="jar" depends="compile" description="Build jar">
+  <target name="jar" depends="compile"
+       description="Build jar">
     <!--Copy over any properties under src-->
     <copy todir="${build.classes}">
       <fileset dir="${src.dir}">
@@ -207,7 +226,8 @@
     <echo message="Setting jspc.notRequired property. jsp pages generated once per ant
session only" />
   </target>
 
-  <target name="clover" depends="clover.setup, clover.info" description="Instrument the
Unit tests using Clover.  To use, specify -Dclover.home=&lt;base of clover installation&gt;
-Drun.clover=true on the command line."/>
+  <target name="clover" depends="clover.setup, clover.info"
+    description="Instrument the Unit tests using Clover.  To use, specify -Dclover.home=&lt;base
of clover installation&gt; -Drun.clover=true on the command line."/>
 
   <target name="clover.setup" if="clover.enabled">
     <taskdef resource="cloverlib.xml" classpath="${clover.jar}"/>
@@ -250,7 +270,7 @@
   <!-- ================================================================== -->
   <!-- Package                                                            -->
   <!-- ================================================================== -->
-  <target name="package" depends="jar,javadoc,compile-test" 
+  <target name="package" depends="jar,javadoc" 
       description="Build distribution; must define -Djava5.home and -Dforrest.home so can
generate doc"> 
     <echo message="Be sure to run 'docs' target before this one else package will be missing
site documentation" />
     <mkdir dir="${dist.dir}"/>
@@ -260,6 +280,14 @@
         <include name="${final.name}-test.jar" />
       </fileset>
     </copy>
+    <mkdir dir="${dist.dir}/contrib"/>
+    <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>  	
     <mkdir dir="${dist.dir}/webapps"/>
     <copy todir="${dist.dir}/webapps">
       <fileset dir="${build.webapps}" />
@@ -293,6 +321,13 @@
     <copy todir="${dist.dir}/src" includeEmptyDirs="true">
       <fileset dir="src" excludes="**/*.template **/docs/build/**/*"/>
     </copy>
+    <copy todir="${dist.dir}/" file="build.xml"/>
+    <chmod perm="ugo+x" type="file" parallel="false">
+        <fileset dir="${dist.dir}/bin"/>
+        <fileset dir="${dist.dir}/src/contrib/">
+          <include name="*/bin/*" />
+        </fileset>
+    </chmod>
   </target>
 
   <!-- ================================================================== -->
@@ -327,12 +362,14 @@
       <param.listofitems>
         <tarfileset dir="${build.dir}" mode="664">
           <exclude name="${final.name}/bin/*" />
+          <exclude name="${final.name}/contrib/*/bin/*" />
           <exclude name="${final.name}/src/**" />
           <exclude name="${final.name}/docs/**" />
           <include name="${final.name}/**" />
         </tarfileset>
         <tarfileset dir="${build.dir}" mode="755">
           <include name="${final.name}/bin/*" />
+          <exclude name="${final.name}/contrib/*/bin/*" />
         </tarfileset>
       </param.listofitems>
     </macro_tar>
@@ -410,7 +447,7 @@
       redoing init and jscpc at this stage of the game; i.e. the prereqs
       for compile.  TODO: Investigate why.  For now, test will fail
       if not preceeded by manual 'jar' or 'compile' invokation -->
-  <target name="compile-test" depends="compile" description="Build test jar">
+  <target name="compile-core-test" depends="compile" description="Build test jar">
     <javac encoding="${build.encoding}" 
        srcdir="${src.test}" 
        includes="**/*.java" 
@@ -432,8 +469,8 @@
     </jar>
   </target>
 
-  <target name="test" depends="compile-test"
-  	description="Build test jar and run tests">
+  <target name="test-core" depends="compile-core-test"
+   	  description="Build test jar and run tests">
     <delete dir="${test.log.dir}"/>
     <mkdir dir="${test.log.dir}"/>
     <junit
@@ -464,10 +501,28 @@
     <fail if="tests.failed">Tests failed!</fail>
   </target>
 
+  <target name="test-contrib" depends="compile, compile-core-test"
+      description="Run contrib unit tests">
+    <subant target="test">
+       <property name="version" value="${version}"/>
+       <fileset file="${contrib.dir}/build.xml"/>
+    </subant> 
+  </target>
+
+  <target name="test" depends="test-core, test-contrib"
+    description="Run core, contrib unit tests">
+  </target>
+
   <!-- ================================================================== -->
   <!-- Clean.  Delete the build files, and their directories              -->
   <!-- ================================================================== -->
-  <target name="clean" description="Clean all old builds">
+  <target name="clean-contrib" description="Clean contrib">
+     <subant target="clean">        
+        <fileset file="src/contrib/build.xml"/>
+     </subant>  	
+  </target>
+  <target name="clean" depends="clean-contrib" description="Clean all old builds">
     <delete dir="${build.dir}"/>
+    <delete dir="${docs.src}/build"/>
   </target>
 </project>

Modified: hadoop/hbase/trunk/src/contrib/build-contrib.xml
URL: http://svn.apache.org/viewvc/hadoop/hbase/trunk/src/contrib/build-contrib.xml?rev=789165&r1=789164&r2=789165&view=diff
==============================================================================
--- hadoop/hbase/trunk/src/contrib/build-contrib.xml (original)
+++ hadoop/hbase/trunk/src/contrib/build-contrib.xml Sun Jun 28 22:39:08 2009
@@ -19,7 +19,7 @@
 
 <!-- Imported by contrib/*/build.xml files to share generic targets. -->
 
-<project name="hadoopbuildcontrib">
+<project name="hbasebuildcontrib">
 
   <property name="name" value="${ant.project.name}"/>
   <property name="root" value="${basedir}"/>
@@ -29,7 +29,7 @@
   <property file="${user.home}/${name}.build.properties" />
   <property file="${root}/build.properties" />
 
-  <property name="hadoop.root" location="${root}/../../../"/>
+  <property name="hbase.root" location="${root}/../../../"/>
 
   <property name="src.dir"  location="${root}/src/java"/>
   <property name="src.test" location="${root}/src/test"/>
@@ -38,21 +38,21 @@
   <available file="${src.examples}" type="dir" property="examples.available"/>
   <available file="${src.test}" type="dir" property="test.available"/>
 
-  <property name="conf.dir" location="${hadoop.root}/conf"/>
+  <property name="conf.dir" location="${hbase.root}/conf"/>
   <property name="test.junit.output.format" value="plain"/>
   <property name="test.output" value="no"/>
   <property name="test.timeout" value="900000"/>
-  <property name="build.dir" location="${hadoop.root}/build/contrib/${name}"/>
+  <property name="build.dir" location="${hbase.root}/build/contrib/${name}"/>
   <property name="build.classes" location="${build.dir}/classes"/>
   <property name="build.test" location="${build.dir}/test"/>
   <property name="build.examples" location="${build.dir}/examples"/>
-  <property name="hadoop.log.dir" location="${build.dir}/test/logs"/>
+  <property name="hbase.log.dir" location="${build.dir}/test/logs"/>
   <!-- all jars together -->
   <property name="javac.deprecation" value="off"/>
   <property name="javac.debug" value="on"/>
 
   <property name="javadoc.link"
-            value="http://java.sun.com/j2se/1.4/docs/api/"/>
+    value="http://java.sun.com/j2se/1.4/docs/api/"/>
 
   <property name="build.encoding" value="ISO-8859-1"/>
 
@@ -62,8 +62,8 @@
   <path id="classpath">
     <pathelement location="${build.classes}"/>
     <fileset refid="lib.jars"/>
-    <pathelement location="${hadoop.root}/build/classes"/>
-    <fileset dir="${hadoop.root}/lib">
+    <pathelement location="${hbase.root}/build/classes"/>
+    <fileset dir="${hbase.root}/lib">
       <include name="**/*.jar" />
     </fileset>
   </path>
@@ -72,9 +72,9 @@
   <path id="test.classpath">
     <path refid="classpath"/>
     <pathelement location="${build.test}" />
-    <pathelement location="${hadoop.root}/build/test"/>
-    <pathelement location="${hadoop.root}/build"/>
-    <pathelement location="${hadoop.root}/src/test"/>
+    <pathelement location="${hbase.root}/build/test"/>
+    <pathelement location="${hbase.root}/build"/>
+    <pathelement location="${hbase.root}/src/test"/>
     <pathelement location="${conf.dir}"/>
   </path>
 
@@ -92,13 +92,13 @@
     <mkdir dir="${build.classes}"/>
     <mkdir dir="${build.test}"/>
     <mkdir dir="${build.examples}"/>
-    <mkdir dir="${hadoop.log.dir}"/>
+    <mkdir dir="${hbase.log.dir}"/>
     <antcall target="init-contrib"/>
   </target>
 
 
   <!-- ====================================================== -->
-  <!-- Compile a Hadoop contrib's files                       -->
+  <!-- Compile a hbase contrib's files                       -->
   <!-- ====================================================== -->
   <target name="compile" depends="init" unless="skip.contrib">
     <echo message="contrib: ${name}"/>
@@ -115,7 +115,7 @@
 
 
   <!-- ======================================================= -->
-  <!-- Compile a Hadoop contrib's example files (if available) -->
+  <!-- Compile a hbase contrib's example files (if available) -->
   <!-- ======================================================= -->
   <target name="compile-examples" depends="compile" if="examples.available">
     <echo message="contrib: ${name}"/>
@@ -147,24 +147,24 @@
   
 
   <!-- ====================================================== -->
-  <!-- Make a Hadoop contrib's jar                            -->
+  <!-- Make a hbase contrib's jar                            -->
   <!-- ====================================================== -->
   <target name="jar" depends="compile" unless="skip.contrib">
     <echo message="contrib: ${name}"/>
     <jar
-      jarfile="${build.dir}/hadoop-${version}-${name}.jar"
+      jarfile="${build.dir}/hbase-${version}-${name}.jar"
       basedir="${build.classes}"      
     />
   </target>
 
   
   <!-- ====================================================== -->
-  <!-- Make a Hadoop contrib's examples jar                   -->
+  <!-- Make a hbase contrib's examples jar                   -->
   <!-- ====================================================== -->
   <target name="jar-examples" depends="compile-examples"
           if="examples.available" unless="skip.contrib">
     <echo message="contrib: ${name}"/>
-    <jar jarfile="${build.dir}/hadoop-${version}-${name}-examples.jar">
+    <jar jarfile="${build.dir}/hbase-${version}-${name}-examples.jar">
       <fileset dir="${build.classes}">
       </fileset>
       <fileset dir="${build.examples}">
@@ -173,13 +173,13 @@
   </target>
   
   <!-- ====================================================== -->
-  <!-- Package a Hadoop contrib                               -->
+  <!-- Package a hbase 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" />
+        <include name="hbase-${version}-${name}.jar" />
       </fileset>
     </copy>
   </target>
@@ -189,8 +189,8 @@
   <!-- ================================================================== -->
   <target name="test" depends="compile-test, compile" if="test.available">
     <echo message="contrib: ${name}"/>
-    <delete dir="${hadoop.log.dir}"/>
-    <mkdir dir="${hadoop.log.dir}"/>
+    <delete dir="${hbase.log.dir}"/>
+    <mkdir dir="${hbase.log.dir}"/>
     <junit
       printsummary="yes" showoutput="${test.output}" 
       haltonfailure="no" fork="yes" maxmemory="256m"
@@ -208,8 +208,8 @@
       <sysproperty key="user.dir" value="${build.test}/data"/>
       
       <sysproperty key="fs.default.name" value="${fs.default.name}"/>
-      <sysproperty key="hadoop.test.localoutputfile" value="${hadoop.test.localoutputfile}"/>
-      <sysproperty key="hadoop.log.dir" value="${hadoop.log.dir}"/> 
+      <sysproperty key="hbase.test.localoutputfile" value="${hbase.test.localoutputfile}"/>
+      <sysproperty key="hbase.log.dir" value="${hbase.log.dir}"/> 
       <classpath refid="test.classpath"/>
       <formatter type="${test.junit.output.format}" />
       <batchtest todir="${build.test}" unless="testcase">

Modified: hadoop/hbase/trunk/src/contrib/build.xml
URL: http://svn.apache.org/viewvc/hadoop/hbase/trunk/src/contrib/build.xml?rev=789165&r1=789164&r2=789165&view=diff
==============================================================================
--- hadoop/hbase/trunk/src/contrib/build.xml (original)
+++ hadoop/hbase/trunk/src/contrib/build.xml Sun Jun 28 22:39:08 2009
@@ -17,7 +17,7 @@
    limitations under the License.
 -->
 
-<project name="hadoopcontrib" default="compile" basedir=".">
+<project name="hbasecontrib" default="compile" basedir=".">
   
   <!-- In case one of the contrib subdirectories -->
   <!-- fails the build or test targets and you cannot fix it: -->



Mime
View raw message