build.xml
changeset 5604 c255da3a3e6b
parent 5603 ac876221d3c1
parent 5492 3d128ca57533
child 5611 35de562d9634
--- a/build.xml	Tue Nov 24 18:48:35 2009 +0100
+++ b/build.xml	Wed Nov 25 10:42:08 2009 +0100
@@ -45,24 +45,14 @@
 translate: refer to translate target of src.
 installWebService: refer to installWebService target of src.
 uninstallWebService: refer to uninstallWebService target of src.
-preinstall: deprecated.
-preinstall.complete: deprecated.
-install: deprecated.
 deploy.context: deploy the context into Tomcat using the manager
 install.source: install the ERP from sources (from subversion).
 eclipse.install.source: install the ERP from sources for eclipse (from Mercurial).
 create.database: refer to create.database target of database.
 update.database: refer to update.database target of database.
-create.database.structure: refer to create.database.structure target of database.
-update.database.structure: refer to update.database.structure target of database.
 create.database.script: refer to create.database.script target of database.
 update.database.script: refer to update.database.script target of database.
 export.database: exports database structure and data to xml files.
-export.database.structure: refer to export.database.structure target of database.
-export.database.data: refer to export.database.data target of database.
-import.database.data: refer to import.database.data target of database.
-save.database.model: refer to save.database.model target of database.
-compare.database.structure: refer to compare.database.structure target of database.
 -->
 <project name="openbravo" default="compile.complete" basedir=".">
   <property environment="env" />
@@ -297,9 +287,7 @@
     <ant dir="${base.src}" target="compile" inheritAll="true" inheritRefs="true" />
   </target>
 
-  <target name="compile.complete.deploy">
-    <antcall target="compile.complete.development" />
-    <antcall target="compile.complete.war" />
+  <target name="compile.complete.deploy" depends="compile.complete.development, compile.complete.war">
     
     <!-- Calculate wad checksum to enable smartbuild-->
     <taskdef name="CheckSumCondition" classname="org.openbravo.utils.CheckSumCondition">
@@ -320,9 +308,7 @@
     <antcall target="war" />
   </target>
 
-  <target name="compile.deploy">
-    <antcall target="compile.war" />
-    <antcall target="compile.development" />
+  <target name="compile.deploy" depends="compile.war, compile.development">
   </target>
 
   <target name="compile.development" depends="init" if="mode.class">
@@ -419,7 +405,7 @@
                   stableDBdir="${stableDBdir}"
                   testDBdir="${base.src.db}/database"
                   verbosity="${bbdd.verbosity}"
-                  userId="0" 
+                  userId="0" adminMode="true" 
                   propertiesFile="${base.config}/Openbravo.properties"/>    
   </target>
 
@@ -511,13 +497,7 @@
     <ant dir="${base.src}" target="uninstallWebService" inheritAll="true" inheritRefs="true" />
   </target>
 
-  <target name="install.source" depends="init,code.rev">
-    <antcall target="database.lib" />
-    <antcall target="create.database" />
-    <antcall target="wad.lib" />
-    <antcall target="trl.lib" />
-
-    <antcall target="compile.complete.deploy" />
+  <target name="install.source" depends="init, create.database, wad.lib, trl.lib, compile.complete.deploy">
     
     <echo message="applying modules" />    
     <antcall inheritall="true" inheritrefs="true" target="apply.module" />
@@ -531,9 +511,7 @@
 		-->
   </target>
 
-  <target name="eclipse.install.source" depends="init,code.rev">
-    <antcall target="database.lib" />
-    <antcall target="create.database" />
+  <target name="eclipse.install.source" depends="init, create.database">
     <eclipse.incrementalBuild project="OpenbravoCore" kind="full"/>
     <antcall target="eclipse.wad.lib"/>
     <antcall target="eclipse.trl.lib"/>
@@ -543,9 +521,7 @@
     <antcall target="import.sample.data" />
   </target>
 
-  <target name="create.database" depends="init,code.rev, core.lib">
-    <antcall target="database.lib" />
-    <antcall target="core.lib" />
+  <target name="create.database" depends="init, core.lib, database.lib">
     <ant dir="${base.db}" antfile="build-create.xml" target="create.database" inheritAll="true" inheritRefs="true" />
     <antcall target="db.apply.modules.sampledata" />
   </target>
@@ -557,73 +533,33 @@
                      DELETE FROM ad_error_log where system_status=(select system_status from ad_system_info)</transaction>
         </sql>
   </target>
-  <target name="update.database" depends="init,code.rev">
-    <antcall target="database.lib" />
-    <antcall target="core.lib" />
+  <target name="update.database" depends="init, core.lib, database.lib">
     <ant dir="${base.db}" target="update.database.java" inheritAll="true" inheritRefs="true" />
     <antcall target="update.generate.entities.status" inheritall="true" inheritrefs="true"/>
     <antcall target="generate.entities.quick" />
     <antcall target="db.apply.modules" />
   </target>
 
-  <target name="update.database.mod" depends="init,code.rev">
-    <antcall target="database.lib" />
-    <antcall target="core.lib" />
+  <target name="update.database.mod" depends="init, core.lib, database.lib">
     <ant dir="${base.db}" target="update.database.mod.java" inheritAll="true" inheritRefs="true" />
   </target>
 
-  <target name="update.customized.database" depends="init,code.rev">
-    <antcall target="database.lib" />
-    <antcall target="core.lib" />
-    <ant dir="${base.db}" target="update.customized.database" inheritAll="true" inheritRefs="true" />
-  </target>
-
-  <target name="create.database.structure" depends="init">
-    <antcall target="core.lib" />
-    <ant dir="${base.db}" target="create.database.structure" inheritAll="true" inheritRefs="true" />
-  </target>
-
-  <target name="update.database.structure" depends="init">
-    <antcall target="core.lib" />
-    <ant dir="${base.db}" target="update.database.structure" inheritAll="true" inheritRefs="true" />
-  </target>
-
-  <target name="create.database.script" depends="init">
-    <antcall target="core.lib" />
+  <target name="create.database.script" depends="init, core.lib">
     <ant dir="${base.db}" target="create.database.script" inheritAll="true" inheritRefs="true" />
   </target>
 
-  <target name="update.database.script" depends="init">
-    <antcall target="core.lib" />
+  <target name="update.database.script" depends="init, core.lib">
     <ant dir="${base.db}" target="update.database.script" inheritAll="true" inheritRefs="true" />
   </target>
 
-  <target name="export.database" depends="init,code.rev">
-    <antcall target="database.lib" />
-    <antcall target="core.lib" />
+  <target name="export.database" depends="init, core.lib, database.lib, generate.entities.quick">
     <ant dir="${base.db}" target="export.database.structure" inheritAll="true" inheritRefs="true" />
   </target>
 
-  <target name="export.database.structure" depends="init,code.rev">
-    <antcall target="core.lib" />
-    <ant dir="${base.db}" target="export.database.structure" inheritAll="true" inheritRefs="true" />
-  </target>
-
-  <target name="export.config.script" depends="init,code.rev">
-    <antcall target="core.lib" />
+  <target name="export.config.script" depends="init, core.lib">
     <ant dir="${base.db}" target="export.config.script" inheritAll="true" inheritRefs="true" />
   </target>
 
-  <target name="export.database.data" depends="init,code.rev">
-    <antcall target="core.lib" />
-    <ant dir="${base.db}" target="export.database.data" inheritAll="true" inheritRefs="true" />
-  </target>
-
-  <target name="import.database.data" depends="init,code.rev">
-    <antcall target="core.lib" />
-    <ant dir="${base.db}" target="import.database.data" inheritAll="true" inheritRefs="true" />
-  </target>
-
   <target name="db.apply.modules" if="apply.modules.on.create">
     <antcall inheritall="true" inheritrefs="true" target="apply.module" />
   </target>
@@ -667,7 +603,7 @@
     <taskdef name="applyModule" classname="org.openbravo.erpCommon.modules.ApplyModuleTask">
       <classpath refid="project.class.path" />
     </taskdef>
-    <applyModule userId="0" propertiesFile="${base.config}/Openbravo.properties"/>
+    <applyModule userId="0" adminMode="true" propertiesFile="${base.config}/Openbravo.properties"/>
   </target>
 
   <target name="apply.module">
@@ -803,12 +739,12 @@
     </taskdef>
 
     <echo message="Validating Module..." />
-    <validateModules moduleJavaPackage="${module}" failOnError="false" userId="0" propertiesFile="${base.config}/Openbravo.properties" type="module" />
+    <validateModules moduleJavaPackage="${module}" failOnError="false" userId="0" adminMode="true" propertiesFile="${base.config}/Openbravo.properties" type="module" />
 
     <antcall target="obx.export.database" />
     <antcall target="obx.export.config.script" />
 
-    <extractModule moduleName="${module}" userId="0" propertiesFile="${base.config}/Openbravo.properties" exportRD="${obx.export.RD}" />
+    <extractModule moduleName="${module}" userId="0" adminMode="true" propertiesFile="${base.config}/Openbravo.properties" exportRD="${obx.export.RD}" />
   </target>
 
   <target name="diagnostic">