Browse Source

ZOOKEEPER-533. fix for ant version 1.7.0

git-svn-id: https://svn.apache.org/repos/asf/hadoop/zookeeper/trunk@818276 13f79535-47bb-0310-9956-ffa450edef68
Mahadev Konar 16 năm trước cách đây
mục cha
commit
9eb990629b
2 tập tin đã thay đổi với 17 bổ sung7 xóa
  1. 9 4
      src/contrib/build-contrib.xml
  2. 8 3
      src/recipes/build-recipes.xml

+ 9 - 4
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" erroronmissingdir="false">
+    <fileset dir="${zk.root}/build/lib">
       <include name="**/*.jar" />
     </fileset>
-    <fileset dir="${zk.root}/build/test/lib" erroronmissingdir="false">
+    <fileset dir="${zk.root}/build/test/lib">
       <include name="**/*.jar" />
     </fileset>
     <fileset dir="${zk.root}/src/java/lib">
@@ -128,8 +128,13 @@
 
   <target name="checkMainIsAvailable">
     <available classname="org.apache.zookeeper.ZooKeeperMain"
-               classpathref="classpath"
-               property="mainIsCompiled"/>
+               property="mainIsCompiled">
+      <!-- we can't use id=classpath, because available fails if fileset directory
+           doesn't exist -->
+      <classpath>
+        <pathelement location="${zk.root}/build/classes"/>
+      </classpath>
+    </available>
   </target>
 
   <target name="checkMainCompiled" unless="mainIsCompiled" depends="checkMainIsAvailable">

+ 8 - 3
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" erroronmissingdir="false">
+    <fileset dir="${zk.root}/build/lib">
       <include name="**/*.jar" />
     </fileset>
     <fileset dir="${zk.root}/src/java/lib">
@@ -125,8 +125,13 @@
 
   <target name="checkMainIsAvailable">
     <available classname="org.apache.zookeeper.ZooKeeperMain"
-               classpathref="classpath"
-               property="mainIsCompiled"/>
+               property="mainIsCompiled">
+      <!-- we can't use id=classpath, because available fails if fileset directory
+           doesn't exist -->
+      <classpath>
+        <pathelement location="${zk.root}/build/classes"/>
+      </classpath>
+    </available>
   </target>
 
   <target name="checkMainCompiled" unless="mainIsCompiled" depends="checkMainIsAvailable">