You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by ja...@apache.org on 2013/09/07 11:27:59 UTC

svn commit: r1520744 - in /ofbiz/trunk: applications/build.xml build.xml framework/build.xml specialpurpose/build.xml

Author: jacopoc
Date: Sat Sep  7 09:27:59 2013
New Revision: 1520744

URL: http://svn.apache.org/r1520744
Log:
Simplified the layout of the main/framework/applications/specialpurpose build files; now the files:

framework/build.xml
applications/build.xml
specialpurpose/build.xml

are only used to define the filelist properties (as before) with the list of components to be built.
The main build file simply refers to these lists to build/doc/clean OFBiz; as before, if applications' or specialpurpose's build.xml files are absent, the folders are ignored.


Modified:
    ofbiz/trunk/applications/build.xml
    ofbiz/trunk/build.xml
    ofbiz/trunk/framework/build.xml
    ofbiz/trunk/specialpurpose/build.xml

Modified: ofbiz/trunk/applications/build.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/build.xml?rev=1520744&r1=1520743&r2=1520744&view=diff
==============================================================================
--- ofbiz/trunk/applications/build.xml (original)
+++ ofbiz/trunk/applications/build.xml Sat Sep  7 09:27:59 2013
@@ -19,46 +19,11 @@ under the License.
 -->
 
 <project name="OFBiz Applications Build" default="build" basedir=".">
-    <import file="../macros.xml"/>
-
-    <filelist id="application-builds" dir="."
+    <filelist id="application-builds" dir="applications"
         files="content/build.xml,party/build.xml,
                workeffort/build.xml,product/build.xml,marketing/build.xml,
                order/build.xml,manufacturing/build.xml,
                accounting/build.xml,
                securityext/build.xml, humanres/build.xml"/>
 
-    <!-- ================================================================== -->
-    <!-- Removes all created files and directories                          -->
-    <!-- ================================================================== -->
-
-    <target name="clean">
-        <iterate target="clean" filelist="application-builds"/>
-        <delete file="ofbiz.jar"/>
-        <echo message="[clean] ========== Done Cleaning Applications =========="/>
-    </target>
-
-    <!-- ================================================================== -->
-    <!-- Build Components                                                   -->
-    <!-- ================================================================== -->
-
-    <target name="build" depends="">
-        <echo message="[build] ========== Start Building Applications (Compile) =========="/>
-
-        <iterate inheritall="false" filelist="application-builds"/>
-
-        <echo message="[build] ========== Done Building Applications (Compile) =========="/>
-    </target>
-
-    <!-- ================================================================== -->
-    <!-- Build JavaDocs                                                     -->
-    <!-- ================================================================== -->
-
-    <target name="docs" depends="">
-        <echo message="[docs] ========== Start Building Applications (JavaDoc) =========="/>
-
-        <iterate target="docs" filelist="application-builds"/>
-
-        <echo message="[docs] ========== Done Building Applications (JavaDocs) =========="/>
-    </target>
 </project>

Modified: ofbiz/trunk/build.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/build.xml?rev=1520744&r1=1520743&r2=1520744&view=diff
==============================================================================
--- ofbiz/trunk/build.xml (original)
+++ ofbiz/trunk/build.xml Sat Sep  7 09:27:59 2013
@@ -28,8 +28,11 @@ under the License.
     <property name="memory.max.param" value="-Xmx512M"/>
     <property name="memory.maxpermsize.param" value="-XX:MaxPermSize=512M"/>
 
+    <import file="framework/build.xml" optional="false"/>
     <available file="applications/build.xml" property="applications.present"/>
+    <import file="applications/build.xml" optional="true"/>
     <available file="specialpurpose/build.xml" property="specialpurpose.present"/>
+    <import file="specialpurpose/build.xml" optional="true"/>
 
     <!-- ================================================================== -->
     <!-- Initialization of all property settings                            -->
@@ -169,29 +172,28 @@ under the License.
     </target>
 
     <target name="tests" depends="ofbiz-init">
-        <subant target="tests">
-            <filelist dir="." files="framework/build.xml"/>
-        </subant>
+        <iterate target="tests" filelist="test-builds"/>
     </target>
 
     <target name="clean">
         <hotdeployant target="clean"/>
-
-        <subant target="clean"  failonerror="${specialpurpose.present}"
-          description="Use failonerror=false in case the specialpurpose directory is not there">
-            <filelist dir="." files="specialpurpose/build.xml"/>
-        </subant>
-        <subant target="clean" failonerror="${applications.present}"
-          description="Use failonerror=false in case the applications directory is not there">
-            <filelist dir="." files="applications/build.xml"/>
-        </subant>
-        <subant target="clean">
-            <filelist dir="." files="framework/build.xml"/>
-        </subant>
+        <antcall target="clean-specialpurpose"/>
+        <antcall target="clean-applications"/>
+        <antcall target="clean-framework"/>
         <delete file="ofbiz.jar"/>
         <echo message="[clean] ========== Done Cleaning =========="/>
     </target>
 
+    <target name="clean-framework">
+        <iterate target="clean" filelist="framework-builds"/>
+    </target>
+    <target name="clean-applications" if="${applications.present}">
+        <iterate target="clean" filelist="application-builds"/>
+    </target>
+    <target name="clean-specialpurpose" if="${specialpurpose.present}">
+        <iterate target="clean" filelist="specialpurpose-builds"/>
+    </target>
+
     <target name="svninfo"
         description="Update the Release-revision info in the footer. Note that you need a valid Internet connection and Subversion connected to the OFBiz repository for that ">
         <echo message="Creating svninfo..."/>
@@ -220,15 +222,9 @@ under the License.
     <target name="build" depends="ofbiz-init">
         <echo message="[build] ========== Start Building (Compile) =========="/>
 
-        <subant inheritall="false">
-            <filelist dir="." files="framework/build.xml"/>
-        </subant>
-        <subant inheritall="false" failonerror="${applications.present}">
-            <filelist dir="." files="applications/build.xml"/>
-        </subant>
-        <subant inheritall="false" failonerror="${specialpurpose.present}">
-            <filelist dir="." files="specialpurpose/build.xml"/>
-        </subant>
+        <antcall target="build-framework"/>
+        <antcall target="build-applications"/>
+        <antcall target="build-specialpurpose"/>
         <externalsubant>
             <fileset dir="${basedir}/themes">
                 <include name="*/build.xml" />
@@ -241,6 +237,18 @@ under the License.
         <echo message="[build] ========== Done Building (Compile) =========="/>
     </target>
 
+    <target name="build-framework">
+        <iterate target="jar" filelist="framework-builds"/>
+    </target>
+
+    <target name="build-applications" if="${applications.present}">
+        <iterate target="jar" filelist="application-builds"/>
+    </target>
+
+    <target name="build-specialpurpose" if="${specialpurpose.present}">
+        <iterate target="jar" filelist="specialpurpose-builds"/>
+    </target>
+
     <macrodef name="hotdeployant">
       <attribute name="target" default=""/>
       <sequential>
@@ -273,21 +281,26 @@ under the License.
 
     <target name="docs" depends="ofbiz-init">
         <echo message="[docs] ========== Start Building (JavaDoc) =========="/>
-
-        <subant target="docs">
-            <filelist dir="." files="framework/build.xml"/>
-        </subant>
-        <subant target="docs" failonerror="${applications.present}">
-            <filelist dir="." files="applications/build.xml"/>
-        </subant>
-        <subant target="docs" failonerror="${specialpurpose.present}">
-            <filelist dir="." files="specialpurpose/build.xml"/>
-        </subant>
+        <antcall target="docs-framework"/>
+        <antcall target="docs-applications"/>
+        <antcall target="docs-specialpurpose"/>
         <hotdeployant target="docs"/>
 
         <echo message="[docs] ========== Done Building (JavaDocs) =========="/>
     </target>
 
+    <target name="docs-framework">
+        <iterate target="docs" filelist="framework-builds"/>
+    </target>
+
+    <target name="docs-applications" if="${applications.present}">
+        <iterate target="docs" filelist="application-builds"/>
+    </target>
+
+    <target name="docs-specialpurpose" if="${specialpurpose.present}">
+        <iterate target="docs" filelist="specialpurpose-builds"/>
+    </target>
+
     <target name="docs-all" depends="build,ofbiz-init"
             description="For committers : Build all javadoc into one tree for easier viewing by the community">
 

Modified: ofbiz/trunk/framework/build.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/build.xml?rev=1520744&r1=1520743&r2=1520744&view=diff
==============================================================================
--- ofbiz/trunk/framework/build.xml (original)
+++ ofbiz/trunk/framework/build.xml Sat Sep  7 09:27:59 2013
@@ -19,9 +19,7 @@ under the License.
 -->
 
 <project name="OFBiz Framework Build" default="build" basedir=".">
-    <import file="../macros.xml"/>
-
-    <filelist id="framework-builds" dir="."
+    <filelist id="framework-builds" dir="framework"
         files="start/build.xml,base/build.xml,sql/build.xml,
                entity/build.xml,geronimo/build.xml,
                catalina/build.xml,
@@ -32,45 +30,5 @@ under the License.
                testtools/build.xml,
                webtools/build.xml"/>
 
-    <filelist id="test-builds" dir="." files="base/build.xml,sql/build.xml,entity/build.xml"/>
-
-    <!-- ================================================================== -->
-    <!-- Removes all created files and directories                          -->
-    <!-- ================================================================== -->
-
-    <target name="clean">
-        <iterate target="clean" filelist="framework-builds"/>
-        <echo message="[clean] ========== Done Cleaning Framework =========="/>
-    </target>
-
-    <!-- ================================================================== -->
-    <!-- Build Components                                                   -->
-    <!-- ================================================================== -->
-
-    <target name="build">
-        <echo message="[build] ========== Start Building Framework (Compile) =========="/>
-
-        <iterate inheritall="false" filelist="framework-builds"/>
-
-        <echo message="[build] ========== Done Building Framework (Compile) =========="/>
-    </target>
-
-    <target name="tests">
-        <subant target="tests">
-            <filelist refid="test-builds"/>
-        </subant>
-    </target>
-
-    <!-- ================================================================== -->
-    <!-- Build JavaDocs                                                     -->
-    <!-- ================================================================== -->
-
-    <target name="docs">
-        <echo message="[docs] ========== Start Building Framework (JavaDoc) =========="/>
-
-        <iterate target="docs" filelist="framework-builds"/>
-
-        <echo message="[docs] ========== Done Building Framework (JavaDocs) =========="/>
-    </target>
-
+    <filelist id="test-builds" dir="framework" files="base/build.xml,sql/build.xml,entity/build.xml"/>
 </project>

Modified: ofbiz/trunk/specialpurpose/build.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/build.xml?rev=1520744&r1=1520743&r2=1520744&view=diff
==============================================================================
--- ofbiz/trunk/specialpurpose/build.xml (original)
+++ ofbiz/trunk/specialpurpose/build.xml Sat Sep  7 09:27:59 2013
@@ -19,8 +19,7 @@
 -->
 
 <project name="OFBiz Special Purpose Applications Build" default="build" basedir=".">
-    <import file="../macros.xml"/>
-    <filelist id="specialpurpose-builds" dir="."
+    <filelist id="specialpurpose-builds" dir="specialpurpose"
         files="
         appserver/build.xml,
         jetty/build.xml,
@@ -41,38 +40,4 @@
         birt/build.xml,
         example/build.xml
     "/>
-
-    <!-- ================================================================== -->
-    <!-- Removes all created files and directories                          -->
-    <!-- ================================================================== -->
-
-    <target name="clean">
-        <iterate target="clean" filelist="specialpurpose-builds"/>
-        <delete file="ofbiz.jar"/>
-        <echo message="[clean] ========== Done Cleaning Special purpose =========="/>
-    </target>
-
-    <!-- ================================================================== -->
-    <!-- Build Components                                                   -->
-    <!-- ================================================================== -->
-
-    <target name="build" depends="">
-        <echo message="[build] ========== Start Building Special Purpose (Compile) =========="/>
-
-        <iterate inheritall="false" filelist="specialpurpose-builds"/>
-
-        <echo message="[build] ========== Done Building Special Purpose (Compile) =========="/>
-    </target>
-
-    <!-- ================================================================== -->
-    <!-- Build JavaDocs                                                     -->
-    <!-- ================================================================== -->
-
-    <target name="docs" depends="">
-        <echo message="[docs] ========== Start Building Special Purpose (JavaDoc) =========="/>
-
-        <iterate target="docs" filelist="specialpurpose-builds"/>
-
-        <echo message="[docs] ========== Done Building Special Purpose (JavaDocs) =========="/>
-    </target>
 </project>