Browse Source

ZOOKEEPER-533. ant error running clean twice (phunt via mahadev)

git-svn-id: https://svn.apache.org/repos/asf/hadoop/zookeeper/trunk@818232 13f79535-47bb-0310-9956-ffa450edef68
Mahadev Konar 16 years ago
parent
commit
a3673f8548

+ 2 - 0
CHANGES.txt

@@ -71,6 +71,8 @@ BUGFIXES:
   ZOOKEEPER-518. DEBUG message for outstanding proposals in leader should be
    moved to trace. (phunt)
 
+  ZOOKEEPER-533.  ant error running clean twice (phunt via mahadev)
+
 IMPROVEMENTS:
   ZOOKEEPER-473. cleanup junit tests to eliminate false positives due to
   "socket reuse" and failure to close client (phunt via mahadev)

+ 0 - 9
src/contrib/bookkeeper/build.xml

@@ -32,15 +32,6 @@
     <property name="test.junit.haltonfailure" value="no" />
     <property name="test.junit.maxmem" value="512m" />
 
-  
-  <available classname="org.apache.zookeeper.ZooKeeperMain"
-             classpathref="classpath"
-             property="mainIsCompiled"/>
-
-  <target name="checkMainCompiled" unless="mainIsCompiled">
-    <fail message="ZooKeeper main must first be compiled (toplevel build.xml)"/>
-  </target>
-
   <target name="setjarname">
     <property name="jarname"
               value="${build.dir}/zookeeper-${version}-${name}.jar"/>

+ 17 - 2
src/contrib/build-contrib.xml

@@ -48,10 +48,10 @@
     <pathelement location="${build.classes}"/>
     <fileset refid="lib.jars"/>
     <pathelement location="${zk.root}/build/classes"/>
-    <fileset dir="${zk.root}/build/lib">
+    <fileset dir="${zk.root}/build/lib" erroronmissingdir="false">
       <include name="**/*.jar" />
     </fileset>
-    <fileset dir="${zk.root}/build/test/lib">
+    <fileset dir="${zk.root}/build/test/lib" erroronmissingdir="false">
       <include name="**/*.jar" />
     </fileset>
     <fileset dir="${zk.root}/src/java/lib">
@@ -121,4 +121,19 @@
     <delete dir="${build.dir}"/>
   </target>
 
+
+  <!-- ================================================================== -->
+  <!-- Utility features                                                   -->
+  <!-- ================================================================== -->
+
+  <target name="checkMainIsAvailable">
+    <available classname="org.apache.zookeeper.ZooKeeperMain"
+               classpathref="classpath"
+               property="mainIsCompiled"/>
+  </target>
+
+  <target name="checkMainCompiled" unless="mainIsCompiled" depends="checkMainIsAvailable">
+    <fail message="ZooKeeper main must first be compiled (toplevel build.xml)"/>
+  </target>
+
 </project>

+ 0 - 8
src/contrib/fatjar/build.xml

@@ -20,14 +20,6 @@
 <project name="fatjar" default="jar">
   <import file="../build-contrib.xml"/>
 
-  <available classname="org.apache.zookeeper.ZooKeeperMain"
-             classpathref="classpath"
-             property="mainIsCompiled"/>
-
-  <target name="checkMainCompiled" unless="mainIsCompiled">
-    <fail message="ZooKeeper main must first be compiled (toplevel build.xml)"/>
-  </target>
-
   <target name="setjarname">
     <property name="jarname"
               value="${build.dir}/zookeeper-${version}-${name}.jar"/>

+ 0 - 8
src/contrib/rest/build.xml

@@ -34,14 +34,6 @@
     <property name="test.junit.haltonfailure" value="no" />
     <property name="test.junit.maxmem" value="512m" />
 
-  <available classname="org.apache.zookeeper.ZooKeeperMain"
-             classpathref="classpath"
-             property="mainIsCompiled"/>
-
-  <target name="checkMainCompiled" unless="mainIsCompiled">
-    <fail message="ZooKeeper main must first be compiled (toplevel build.xml)"/>
-  </target>
-
   <target name="setjarname">
     <property name="main.jarname"
               value="${zk.root}/build/zookeeper-${version}.jar"/>

+ 0 - 9
src/contrib/zkpython/build.xml

@@ -26,15 +26,6 @@
   <property name="test.output" value="no" />
   <property name="test.timeout" value="900000" />
 
-  <available classname="org.apache.zookeeper.ZooKeeperMain"
-             classpathref="classpath"
-             property="mainIsCompiled"/>
-
-  <target name="checkMainCompiled" unless="mainIsCompiled">
-    <fail message="ZooKeeper main must first be compiled (toplevel build.xml)"/>
-  </target>
-
-
   <target name="test"
           depends="test-init,test-category,test-start,python-test,test-stop" />
 	

+ 16 - 1
src/recipes/build-recipes.xml

@@ -48,7 +48,7 @@
     <pathelement location="${build.classes}"/>
     <fileset refid="lib.jars"/>
     <pathelement location="${zk.root}/build/classes"/>
-    <fileset dir="${zk.root}/build/lib">
+    <fileset dir="${zk.root}/build/lib" erroronmissingdir="false">
       <include name="**/*.jar" />
     </fileset>
     <fileset dir="${zk.root}/src/java/lib">
@@ -118,4 +118,19 @@
     <delete dir="${build.dir}"/>
   </target>
 
+
+  <!-- ================================================================== -->
+  <!-- Utility features                                                   -->
+  <!-- ================================================================== -->
+
+  <target name="checkMainIsAvailable">
+    <available classname="org.apache.zookeeper.ZooKeeperMain"
+               classpathref="classpath"
+               property="mainIsCompiled"/>
+  </target>
+
+  <target name="checkMainCompiled" unless="mainIsCompiled" depends="checkMainIsAvailable">
+    <fail message="ZooKeeper main must first be compiled (toplevel build.xml)"/>
+  </target>
+
 </project>

+ 0 - 9
src/recipes/lock/build.xml

@@ -32,15 +32,6 @@
     <property name="test.junit.haltonfailure" value="no" />
     <property name="test.junit.maxmem" value="512m" />
 
-  
-  <available classname="org.apache.zookeeper.ZooKeeperMain"
-             classpathref="classpath"
-             property="mainIsCompiled"/>
-
-  <target name="checkMainCompiled" unless="mainIsCompiled">
-    <fail message="ZooKeeper main must first be compiled (toplevel build.xml)"/>
-  </target>
-
   <target name="setjarname">
     <property name="jarname"
               value="${build.dir}/zookeeper-${version}-recipes-${name}.jar"/>