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/06 10:32:48 UTC

svn commit: r1520510 - in /ofbiz/trunk: applications/build.xml build.xml framework/build.xml runtime/data/indexes/ runtime/indexes/ specialpurpose/build.xml specialpurpose/lucene/config/search.properties

Author: jacopoc
Date: Fri Sep  6 08:32:47 2013
New Revision: 1520510

URL: http://svn.apache.org/r1520510
Log:
First pass of the cleanup of Ant's targets defined in main build file and in build files for framework/applications/specialpurpose folders:
* removed redundant targets (e.g. clean-xtras)
* removed unused targets and settings
* moved runtime related targets from framework to main build file
* moved the search index runtime folder from runtime/data/indexes to runtime/indexes to prevent the removal of indexes when clean-data is executed


Added:
    ofbiz/trunk/runtime/indexes/
      - copied from r1520321, ofbiz/trunk/runtime/data/indexes/
Removed:
    ofbiz/trunk/runtime/data/indexes/
Modified:
    ofbiz/trunk/applications/build.xml
    ofbiz/trunk/build.xml
    ofbiz/trunk/framework/build.xml
    ofbiz/trunk/specialpurpose/build.xml
    ofbiz/trunk/specialpurpose/lucene/config/search.properties

Modified: ofbiz/trunk/applications/build.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/build.xml?rev=1520510&r1=1520509&r2=1520510&view=diff
==============================================================================
--- ofbiz/trunk/applications/build.xml (original)
+++ ofbiz/trunk/applications/build.xml Fri Sep  6 08:32:47 2013
@@ -32,25 +32,6 @@ under the License.
     <!-- Removes all created files and directories                          -->
     <!-- ================================================================== -->
 
-    <target name="refresh">
-        <antcall target="clean-all"/>
-        <antcall target="build"/>
-    </target>
-
-    <target name="clean-all">
-        <antcall target="clean-xtra"/>
-        <antcall target="clean"/>
-    </target>
-
-    <target name="clean-xtra" depends="">
-        <delete verbose="on">
-            <fileset dir="." includes="**/.nbattrs,**/*~,**/.#*,**/.DS_Store,**/*.rej,**/*.orig"/>
-        </delete>
-    </target>
-
-    <target name="tests">
-    </target>
-
     <target name="clean">
         <iterate target="clean" filelist="application-builds"/>
         <delete file="ofbiz.jar"/>

Modified: ofbiz/trunk/build.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/build.xml?rev=1520510&r1=1520509&r2=1520510&view=diff
==============================================================================
--- ofbiz/trunk/build.xml (original)
+++ ofbiz/trunk/build.xml Fri Sep  6 08:32:47 2013
@@ -35,10 +35,28 @@ under the License.
     <!-- Initialization of all property settings                            -->
     <!-- ================================================================== -->
 
-    <target name="ofbiz-init">
+    <target name="ofbiz-init" depends="dir-init">
         <property environment="env"/>
     </target>
 
+    <target name="dir-init">
+        <mkdir dir="runtime"/>
+        <mkdir dir="runtime/output"/>
+        <mkdir dir="runtime/logs"/>
+        <mkdir dir="runtime/logs/test-results"/>
+        <mkdir dir="runtime/data"/>
+        <mkdir dir="runtime/data/derby"/>
+
+        <condition property="isMac">
+            <os family="mac"/>
+        </condition>
+        <antcall target="copy-derby-props" inheritall="true"/>
+    </target>
+
+    <target name="copy-derby-props" if="isMac">
+        <copy file="runtime/data/derby.properties" todir="runtime/data/derby"/>
+    </target>
+
     <target name="ivy-init">
         <taskdef resource="org/apache/ivy/ant/antlib.xml"
             uri="antlib:org.apache.ivy.ant">
@@ -91,25 +109,30 @@ under the License.
     </target>
     <target name="clean-data"
           description="Clean all DB data (Derby) under runtime/data">
-        <subant target="clean-data">
-            <filelist dir="." files="framework/build.xml"/>
-        </subant>
+        <delete verbose="on" includeemptydirs="true">
+            <fileset dir="runtime/data" includes="**/*">
+                <exclude name="README"/>
+                <exclude name="derby.properties"/>
+            </fileset>
+        </delete>
         <delete file="runtime/data.zip"/>
         <delete file="runtime/test-list-build.xml"/>
     </target>
 
     <target name="clean-logs"
           description="Clean all logs in runtime/logs">
-        <subant target="clean-logs">
-            <filelist dir="." files="framework/build.xml"/>
-        </subant>
+        <delete verbose="on" includeemptydirs="true">
+            <fileset dir="runtime/logs" includes="**/*">
+                <exclude name="README"/>
+            </fileset>
+        </delete>
     </target>
 
     <target name="clean-output"
           description="Clean runtime/output directory">
-        <subant target="clean-output">
-            <filelist dir="." files="framework/build.xml"/>
-        </subant>
+        <delete verbose="on" includeemptydirs="true">
+            <fileset dir="runtime/output" includes="**/*"/>
+        </delete>
     </target>
 
     <target name="clean-xtra"
@@ -121,9 +144,7 @@ under the License.
 
     <target name="clean-catalina"
           description="Clean Catalina data in runtime/catalina/work">
-        <subant target="clean-catalina">
-            <filelist dir="." files="framework/build.xml"/>
-        </subant>
+        <delete dir="runtime/catalina/work"/>
     </target>
 
    <target name="clean-cache"
@@ -135,15 +156,15 @@ under the License.
 
     <target name="clean-tempfiles"
           description="Remove files located in runtime/tempfiles (captcha, etc...)">
-        <subant target="clean-tempfiles">
-            <filelist dir="." files="framework/build.xml"/>
-        </subant>
+        <delete includeemptydirs="true">
+            <fileset dir="./runtime/tempfiles" includes="**/*"/>
+        </delete>
     </target>
 
     <target name="clean-search-indexes"
-            description="Remove search indexes (e.g. Lucene indexes) created under runtime/data/indexes">
+            description="Remove search indexes (e.g. Lucene indexes) created under runtime/indexes">
         <delete includeemptydirs="true">
-            <fileset dir="./runtime/data/indexes" includes="**/*"/>
+            <fileset dir="./runtime/indexes" includes="**/*"/>
         </delete>
     </target>
 

Modified: ofbiz/trunk/framework/build.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/build.xml?rev=1520510&r1=1520509&r2=1520510&view=diff
==============================================================================
--- ofbiz/trunk/framework/build.xml (original)
+++ ofbiz/trunk/framework/build.xml Fri Sep  6 08:32:47 2013
@@ -34,101 +34,10 @@ under the License.
 
     <filelist id="test-builds" dir="." files="base/build.xml,sql/build.xml,entity/build.xml"/>
 
-    <property name="memory.max.param" value="-Xmx384M"/>
-
-    <!-- ================================================================== -->
-    <!-- Initialization of all property settings                            -->
-    <!-- ================================================================== -->
-
-    <target name="ofbiz-init">
-        <property environment="env"/>
-    </target>
-
-    <target name="dir-init" depends="ofbiz-init">
-        <mkdir dir="../runtime"/>
-        <mkdir dir="../runtime/output"/>
-        <mkdir dir="../runtime/logs"/>
-        <mkdir dir="../runtime/logs/test-results"/>
-        <mkdir dir="../runtime/data"/>
-        <mkdir dir="../runtime/data/derby"/>
-
-        <condition property="isMac">
-            <os family="mac"/>
-        </condition>
-        <antcall target="copy-derby-props" inheritall="true"/>
-    </target>
-
-    <target name="copy-derby-props" if="isMac">
-        <copy file="../runtime/data/derby.properties" todir="../runtime/data/derby"/>
-    </target>
-
     <!-- ================================================================== -->
     <!-- Removes all created files and directories                          -->
     <!-- ================================================================== -->
 
-    <target name="refresh">
-        <antcall target="clean-all"/>
-        <antcall target="build"/>
-    </target>
-
-    <target name="clean-all">
-        <antcall target="clean-data"/>
-        <antcall target="clean-logs"/>
-        <antcall target="clean-output"/>
-        <antcall target="clean-xtra"/>
-        <antcall target="clean-catalina"/>
-        <antcall target="clean"/>
-    </target>
-
-    <target name="clean-data">
-        <delete includeemptydirs="true" dir="../runtime/data/derby"/>
-        <delete includeemptydirs="true" dir="../runtime/data/hsql"/>
-        <delete verbose="on" includeemptydirs="true">
-            <fileset dir="../runtime/data" includes="**/*">
-                <exclude name="README"/>
-                <exclude name="derby.properties"/>
-            </fileset>
-        </delete>
-    </target>
-
-    <target name="clean-logs">
-        <delete verbose="on" dir="../runtime/logs/test-results"/>
-        <delete dir="../runtime/logs/cobertura-report"/>
-        <delete verbose="on">
-            <fileset dir="../runtime/logs" includes="*">
-                <exclude name="README"/>
-            </fileset>
-        </delete>
-    </target>
-
-    <target name="clean-output">
-        <delete verbose="on">
-            <fileset dir="." includes="../runtime/output/*"/>
-        </delete>
-    </target>
-
-    <target name="clean-xtra">
-        <delete verbose="on">
-            <fileset dir="." includes="**/.nbattrs,**/*~,**/.#*,**/.DS_Store,**/*.rej,**/*.orig"/>
-        </delete>
-    </target>
-
-    <target name="clean-catalina">
-        <delete dir="../runtime/catalina/work"/>
-    </target>
-
-    <target name="clean-tempfiles">
-        <delete verbose="on">
-            <fileset dir="../runtime" includes="tempfiles/**/*"/>
-        </delete>
-    </target>
-
-    <target name="tests">
-        <subant target="tests">
-            <filelist refid="test-builds"/>
-        </subant>
-    </target>
-
     <target name="clean">
         <iterate target="clean" filelist="framework-builds"/>
         <echo message="[clean] ========== Done Cleaning Framework =========="/>
@@ -138,18 +47,20 @@ under the License.
     <!-- Build Components                                                   -->
     <!-- ================================================================== -->
 
-    <target name="build" depends="dir-init">
+    <target name="build">
         <echo message="[build] ========== Start Building Framework (Compile) =========="/>
 
-        <!-- make sure the data and logs directories exist (they should exist, because they are in svn) -->
-        <mkdir dir="../runtime/data"/>
-        <mkdir dir="../runtime/logs"/>
-
         <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                                                     -->
     <!-- ================================================================== -->
@@ -162,24 +73,4 @@ under the License.
         <echo message="[docs] ========== Done Building Framework (JavaDocs) =========="/>
     </target>
 
-    <!-- ================================================================== -->
-    <!-- Contrib Targets                                                    -->
-    <!-- ================================================================== -->
-
-    <target name="copy-contrib">
-        <copy todir="${basedir}" overwrite="true" verbose="true">
-            <fileset dir="${basedir}/contrib" excludes="contrib/**,**/*.class"/>
-        </copy>
-    </target>
-
-    <target name="build-contrib" depends="copy-contrib,refresh"/>
-
-    <!-- ================================================================== -->
-    <!-- Script Targets                                                     -->
-    <!-- ================================================================== -->
-
-    <target name="scriptfix">
-        <fixcrlf srcdir="${basedir}" eol="lf" eof="remove" includes="**/*.sh"/>
-        <fixcrlf srcdir="${basedir}" eol="crlf" includes="**/*.bat"/>
-    </target>
 </project>

Modified: ofbiz/trunk/specialpurpose/build.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/build.xml?rev=1520510&r1=1520509&r2=1520510&view=diff
==============================================================================
--- ofbiz/trunk/specialpurpose/build.xml (original)
+++ ofbiz/trunk/specialpurpose/build.xml Fri Sep  6 08:32:47 2013
@@ -46,25 +46,6 @@
     <!-- Removes all created files and directories                          -->
     <!-- ================================================================== -->
 
-    <target name="refresh">
-        <antcall target="clean-all"/>
-        <antcall target="build"/>
-    </target>
-
-    <target name="clean-all">
-        <antcall target="clean-xtra"/>
-        <antcall target="clean"/>
-    </target>
-
-    <target name="clean-xtra" depends="">
-        <delete verbose="on">
-            <fileset dir="." includes="**/.nbattrs,**/*~,**/.#*,**/.DS_Store,**/*.rej,**/*.orig"/>
-        </delete>
-    </target>
-
-    <target name="tests">
-    </target>
-
     <target name="clean">
         <iterate target="clean" filelist="specialpurpose-builds"/>
         <delete file="ofbiz.jar"/>

Modified: ofbiz/trunk/specialpurpose/lucene/config/search.properties
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/lucene/config/search.properties?rev=1520510&r1=1520509&r2=1520510&view=diff
==============================================================================
--- ofbiz/trunk/specialpurpose/lucene/config/search.properties (original)
+++ ofbiz/trunk/specialpurpose/lucene/config/search.properties Fri Sep  6 08:32:47 2013
@@ -17,4 +17,4 @@
 # under the License.
 ###############################################################################
 
-defaultIndex=runtime/data/indexes
+defaultIndex=runtime/indexes