You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by do...@apache.org on 2013/06/28 21:07:52 UTC

svn commit: r1497886 - /ofbiz/trunk/build.xml

Author: doogie
Date: Fri Jun 28 19:07:52 2013
New Revision: 1497886

URL: http://svn.apache.org/r1497886
Log:
OPTIMIZE: Make the targets clean and build use a common macro, so that
they both handle the case of hot-deploy/build.xml in the same way.

Modified:
    ofbiz/trunk/build.xml

Modified: ofbiz/trunk/build.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/build.xml?rev=1497886&r1=1497885&r2=1497886&view=diff
==============================================================================
--- ofbiz/trunk/build.xml (original)
+++ ofbiz/trunk/build.xml Fri Jun 28 19:07:52 2013
@@ -155,11 +155,7 @@ under the License.
     </target>
 
     <target name="clean">
-        <subant target="clean">
-            <fileset dir="${basedir}/hot-deploy" casesensitive="no">
-                <include name="*/build.xml"/>
-            </fileset>
-        </subant>
+        <hotdeployant target="clean"/>
 
         <subant target="clean"  failonerror="${specialpurpose.present}"
           description="Use failonerror=false in case the specialpurpose directory is not there">
@@ -219,6 +215,15 @@ under the License.
             </fileset>
         </subant>
 
+        <hotdeployant/>
+        <antcall target="clean-svninfo"/>
+
+        <echo message="[build] ========== Done Building (Compile) =========="/>
+    </target>
+
+    <macrodef name="hotdeployant">
+      <attribute name="target" default=""/>
+      <sequential>
         <!-- a check is done, if no build.xml file is present in hot-deploy dir,
             then the build.xml files - if present - in hot-deploy sub-dirs will be used.
             So the previous, simpler, behaviour is kept as long as you don't need 
@@ -239,10 +244,8 @@ under the License.
             </subant>
           </else>
         </if>
-        <antcall target="clean-svninfo"/>
-
-        <echo message="[build] ========== Done Building (Compile) =========="/>
-    </target>
+      </sequential>
+    </macrodef>
 
     <!-- ================================================================== -->
     <!-- Build JavaDocs                                                     -->
@@ -260,11 +263,7 @@ under the License.
         <subant target="docs" failonerror="${specialpurpose.present}">
             <filelist dir="." files="specialpurpose/build.xml"/>
         </subant>
-        <subant target="docs">
-            <fileset dir="${basedir}/hot-deploy" casesensitive="no">
-                <include name="*/build.xml"/>
-            </fileset>
-        </subant>
+        <hotdeployant target="docs"/>
 
         <echo message="[docs] ========== Done Building (JavaDocs) =========="/>
     </target>