build.xml
changeset 536 11197a4eb04d
parent 451 408c33b8ad40
child 537 8eedfed43502
--- a/build.xml	Fri Mar 14 11:59:45 2008 +0000
+++ b/build.xml	Fri Mar 14 12:10:31 2008 +0000
@@ -69,47 +69,38 @@
 <project name="openbravo" default="compile.complete" basedir=".">
   <property environment="env"/>
   <property file="config/Openbravo.properties"/>
-  <property name="separator" value="/"/>
 
-  <property name="base.context" value="${base.source}/WebContent"/>
-  <property name="jakarta.home" value="${env.CATALINA_HOME}"/>
-  <property name="build.core.lib" value="${base.source}/src-core/lib"/>
-  <property name="build.trl.lib" value="${base.source}/src-trl/lib"/>
-  <property name="build.wad.lib" value="${base.source}/src-wad/lib"/>
+  <property name="base.src" location="src"/>
+  <property name="base.src.core" location="src-core"/>
+  <property name="base.src.db" location="src-db"/>
+  <property name="base.src.trl" location="src-trl"/>
+  <property name="base.src.wad" location="src-wad"/>
+  <property name="base.client.src" location="srcClient"/>
+  <property name="base.db" location="database"/>
+  <property name="base.web" location="web"/>
+  <property name="base.context" location="WebContent"/>
+  <property name="base.design" location="${base.context}/src-loc"/>
+  <property name="base.lib" location="lib"/>
+  <property name="base.config" location="config"/>
+  <property name="build" location="build/classes"/>
+  <property name="build.AD" location="srcAD"/>
+  <property name="build.sqlc" location="build/javasqlc"/>
+  <property name="build.core.lib" location="src-core/lib"/>
+  <property name="build.trl.lib" location="src-trl/lib"/>
+  <property name="build.wad.lib" location="src-wad/lib"/>
+  <property name="build.docs" location="docs/api"/>
+  <property name="jakarta.home" location="${env.CATALINA_HOME}"/>
   <condition property="jakarta.base" value="${env.CATALINA_BASE}" else="${jakarta.home}">
     <and>
       <isset property="env.CATALINA_BASE"/>
     </and>
   </condition>
-  <property name="log.path" value="${jakarta.base}/logs"/>
-  <property name="base.src" value="${base.source}${separator}src"/>
-  <property name="base.design" value="${base.context}/src-loc"/>
-  <property name="base.web" value="${base.source}${separator}web"/>
-  <property name="base.wad" value="${base.source}${separator}src-wad"/>
-  <property name="build" value="${base.source}${separator}build${separator}classes"/>
-  <property name="build.AD" value="${base.source}${separator}srcAD"/>
-  <property name="build.sqlc" value="${base.source}${separator}build${separator}javasqlc"/>
-  <property name="build.docs" value="${base.source}${separator}docs${separator}api"/>
-  <property name="lib" value="${jakarta.home}${separator}common"/>
-  <property name="base.lib" value="${base.source}${separator}lib"/>
-  <property name="base.config" value="${base.source}${separator}config"/>
-  <property name="jakarta.context" value="${jakarta.base}${separator}webapps${separator}openbravo"/>
-  <property name="base.client.src" value="${base.source}${separator}srcClient"/>
+  <property name="log.path" location="${jakarta.base}/logs"/>
+  <property name="lib" location="${jakarta.home}/common"/>
+  <property name="jakarta.context" location="${jakarta.base}/webapps/${context.name}"/>
   <property name="build.maxmemory" value="512M"/>
   <property name="debug.level" value="false"/>
 
-  <condition property="shell.extension" value="bat" else="sh">
-    <and>
-      <os family="windows"/>
-    </and>
-  </condition>
-
-  <condition property="temp.folder" value="c:\Temp" else="/tmp">
-    <and>
-      <os family="windows"/>
-    </and>
-  </condition>
-
   <condition property="no.java.home" value="true">
     <not>
       <isset property="env.JAVA_HOME"/>
@@ -137,116 +128,101 @@
   </target>
 
   <target name="compile.complete" depends="init">
-    <ant dir="${base.source}/src" target="compile.complete" inheritAll="true" inheritRefs="true"/>
+    <ant dir="${base.src}" target="compile.complete" inheritAll="true" inheritRefs="true"/>
   </target>
 
   <target name="compile" depends="init">
-    <ant dir="${base.source}/src" target="compile" inheritAll="true" inheritRefs="true"/>
+    <ant dir="${base.src}" target="compile" inheritAll="true" inheritRefs="true"/>
   </target>
 
   <target name="compile.complete.development" depends="init">
-    <ant dir="${base.source}/src" target="compile.complete.development" inheritAll="true" inheritRefs="true"/>
+    <ant dir="${base.src}" target="compile.complete.development" inheritAll="true" inheritRefs="true"/>
   </target>
 
   <target name="compile.development" depends="init">
-    <ant dir="${base.source}/src" target="compile.development" inheritAll="true" inheritRefs="true"/>
+    <ant dir="${base.src}" target="compile.development" inheritAll="true" inheritRefs="true"/>
   </target>
 
   <target name="eclipse.compile" depends="init">
-    <ant dir="${base.source}/src-core" target="build.jar" inheritAll="true" inheritRefs="true"/>
-    <ant dir="${base.source}/src-trl" target="build.jar" inheritAll="true" inheritRefs="true"/>
-    <ant dir="${base.source}/src-wad" target="build.jar" inheritAll="true" inheritRefs="true"/>
-    <ant dir="${base.source}/src" target="eclipse.compile" inheritAll="true" inheritRefs="true"/>
+    <ant dir="${base.src.core}" target="build.jar" inheritAll="true" inheritRefs="true"/>
+    <ant dir="${base.src.trl}" target="build.jar" inheritAll="true" inheritRefs="true"/>
+    <ant dir="${base.src.wad}" target="build.jar" inheritAll="true" inheritRefs="true"/>
+    <ant dir="${base.src}" target="eclipse.compile" inheritAll="true" inheritRefs="true"/>
   </target>
 
   <target name="eclipse.compile.complete" depends="init">
-    <ant dir="${base.source}/src-core" target="build.jar" inheritAll="true" inheritRefs="true"/>
-    <ant dir="${base.source}/src-trl" target="build.jar" inheritAll="true" inheritRefs="true"/>
-    <ant dir="${base.source}/src-wad" target="build.jar" inheritAll="true" inheritRefs="true"/>
-    <ant dir="${base.source}/src" target="eclipse.compile.complete" inheritAll="true" inheritRefs="true"/>
+    <ant dir="${base.src.core}" target="build.jar" inheritAll="true" inheritRefs="true"/>
+    <ant dir="${base.src.trl}" target="build.jar" inheritAll="true" inheritRefs="true"/>
+    <ant dir="${base.src.wad}" target="build.jar" inheritAll="true" inheritRefs="true"/>
+    <ant dir="${base.src}" target="eclipse.compile.complete" inheritAll="true" inheritRefs="true"/>
   </target>
 
   <target name="compile.src" depends="init">
-    <ant dir="${base.source}/src" target="compile.src" inheritAll="true" inheritRefs="true"/>
+    <ant dir="${base.src}" target="compile.src" inheritAll="true" inheritRefs="true"/>
   </target>
 
   <target name="war" depends="init">
-    <ant dir="${base.source}${separator}src" target="build.war" inheritAll="true" inheritRefs="true"/>
+    <ant dir="${base.src}" target="build.war" inheritAll="true" inheritRefs="true"/>
   </target>
 
   <target name="core.docs" depends="init">
-    <ant dir="${base.source}${separator}src-core" target="doc" inheritAll="true" inheritRefs="true"/>
+    <ant dir="${base.src.core}" target="doc" inheritAll="true" inheritRefs="true"/>
   </target>
 
   <target name="core.lib" depends="init">
-    <ant dir="${base.source}${separator}src-core" target="build" inheritAll="true" inheritRefs="true"/>
-    <copy file="${base.source}/src-core/lib/openbravo-core.jar" todir="${base.lib}" overwrite="true" failonerror="false"/>
+    <ant dir="${base.src.core}" target="build" inheritAll="true" inheritRefs="true"/>
+    <copy file="${base.src.core}/lib/openbravo-core.jar" todir="${base.lib}" overwrite="true" failonerror="false"/>
   </target>
 
   <target name="eclipse.wad.lib" depends="init">
-    <ant dir="${base.source}${separator}src-wad" target="sqlc" inheritAll="true" inheritRefs="true"/>
+    <ant dir="${base.src.wad}" target="sqlc" inheritAll="true" inheritRefs="true"/>
   </target>
 
   <target name="wad.docs" depends="init">
-    <ant dir="${base.source}${separator}src-wad" target="doc" inheritAll="true" inheritRefs="true"/>
+    <ant dir="${base.src.wad}" target="doc" inheritAll="true" inheritRefs="true"/>
   </target>
 
   <target name="wad.lib" depends="init">
-    <ant dir="${base.source}${separator}src-wad" target="build" inheritAll="true" inheritRefs="true"/>
+    <ant dir="${base.src.wad}" target="build" inheritAll="true" inheritRefs="true"/>
   </target>
 
   <target name="eclipse.trl.lib" depends="init">
-    <ant dir="${base.source}${separator}src-trl" target="sqlc" inheritAll="true" inheritRefs="true"/>
+    <ant dir="${base.src.trl}" target="sqlc" inheritAll="true" inheritRefs="true"/>
   </target>
 
   <target name="trl.docs" depends="init">
-    <ant dir="${base.source}${separator}src-trl" target="doc" inheritAll="true" inheritRefs="true"/>
+    <ant dir="${base.src.trl}" target="doc" inheritAll="true" inheritRefs="true"/>
   </target>
 
   <target name="trl.lib" depends="init">
-    <ant dir="${base.source}${separator}src-trl" target="build" inheritAll="true" inheritRefs="true"/>
+    <ant dir="${base.src.trl}" target="build" inheritAll="true" inheritRefs="true"/>
   </target>
 
   <target name="database.lib" depends="init">
-    <ant dir="${base.source}${separator}src-db" target="jar" inheritAll="true" inheritRefs="true"/>
-    <copy file="${base.source}/src-db/build/lib/dbmanager.jar" todir="${base.source}/database/lib" overwrite="true" failonerror="false"/>
+    <ant dir="${base.src.db}" target="jar" inheritAll="true" inheritRefs="true"/>
+    <copy file="${base.src.db}/build/lib/dbmanager.jar" todir="${base.db}/lib" overwrite="true" failonerror="false"/>
   </target>
 
   <target name="clean" depends="init">
-    <ant dir="${base.source}/src" target="clean" inheritAll="true" inheritRefs="true"/>
+    <ant dir="${base.src}" target="clean" inheritAll="true" inheritRefs="true"/>
   </target>
 
   <target name="trl.clean" depends="init">
-    <ant dir="${base.source}/src" target="trl.clean" inheritAll="true" inheritRefs="true"/>
+    <ant dir="${base.src}" target="trl.clean" inheritAll="true" inheritRefs="true"/>
   </target>
 
   <target name="translate" depends="init">
-    <ant dir="${base.source}/src" target="translate" inheritAll="true" inheritRefs="true"/>
+    <ant dir="${base.src}" target="translate" inheritAll="true" inheritRefs="true"/>
   </target>
 
   <target name="installWebService" depends="init">
-    <ant dir="${base.source}/src" target="installWebService" inheritAll="true" inheritRefs="true">
+    <ant dir="${base.src}" target="installWebService" inheritAll="true" inheritRefs="true">
       <property name="wsdd" value="1"/>
     </ant>
   </target>
 
   <target name="uninstallWebService" depends="init">
-    <ant dir="${base.source}/src" target="uninstallWebService" inheritAll="true" inheritRefs="true"/>
-  </target>
-
-  <target name="preinstall" depends="init">
-    <ant dir="${base.source}/bdutil" target="build" inheritAll="true" inheritRefs="true"/>
-    <ant dir="${base.source}/bdutil" target="preinstall" inheritAll="true" inheritRefs="true"/>
-  </target>
-
-  <target name="preinstall.complete" depends="init">
-    <ant dir="${base.source}/bdutil" target="build" inheritAll="true" inheritRefs="true"/>
-    <ant dir="${base.source}/bdutil" target="preinstall_complete" inheritAll="true" inheritRefs="true"/>
-  </target>
-
-  <target name="install" depends="init">
-    <ant dir="${base.source}/install" target="build" inheritAll="true" inheritRefs="true"/>
-    <ant dir="${base.source}/install" target="install" inheritAll="true" inheritRefs="true"/>
+    <ant dir="${base.src}" target="uninstallWebService" inheritAll="true" inheritRefs="true"/>
   </target>
 
   <target name="deploy" depends="init">
@@ -255,7 +231,7 @@
 
   <target name="install.source" depends="init">
     <antcall target="database.lib"/>
-    <ant dir="${base.source}/database" target="create.database" inheritAll="true" inheritRefs="true"/>
+    <ant dir="${base.db}" target="create.database" inheritAll="true" inheritRefs="true"/>
     <antcall target="core.lib"/>
     <antcall target="wad.lib"/>
     <antcall target="trl.lib"/>
@@ -266,7 +242,7 @@
 
   <target name="eclipse.install.source" depends="init">
     <antcall target="database.lib"/>
-    <ant dir="${base.source}/database" target="create.database" inheritAll="true" inheritRefs="true"/>
+    <ant dir="${base.db}" target="create.database" inheritAll="true" inheritRefs="true"/>
     <antcall target="core.lib"/>
     <antcall target="wad.lib"/>
     <antcall target="trl.lib"/>
@@ -276,68 +252,68 @@
 
   <target name="create.database" depends="init">
     <antcall target="database.lib"/>
-    <ant dir="${base.source}/database" target="create.database" inheritAll="true" inheritRefs="true"/>
+    <ant dir="${base.db}" target="create.database" inheritAll="true" inheritRefs="true"/>
   </target>
 
   <target name="update.database" depends="init">
-    <ant dir="${base.source}/database" target="update.database" inheritAll="true" inheritRefs="true"/>
+    <ant dir="${base.db}" target="update.database" inheritAll="true" inheritRefs="true"/>
   </target>
 
   <target name="create.database.structure" depends="init">
-    <ant dir="${base.source}/database" target="create.database.structure" inheritAll="true" inheritRefs="true"/>
+    <ant dir="${base.db}" target="create.database.structure" inheritAll="true" inheritRefs="true"/>
   </target>
 
   <target name="update.database.structure" depends="init">
-    <ant dir="${base.source}/database" target="update.database.structure" inheritAll="true" inheritRefs="true"/>
+    <ant dir="${base.db}" target="update.database.structure" inheritAll="true" inheritRefs="true"/>
   </target>
 
   <target name="create.database.script" depends="init">
-    <ant dir="${base.source}/database" target="create.database.script" inheritAll="true" inheritRefs="true"/>
+    <ant dir="${base.db}" target="create.database.script" inheritAll="true" inheritRefs="true"/>
   </target>
 
   <target name="update.database.script" depends="init">
-    <ant dir="${base.source}/database" target="update.database.script" inheritAll="true" inheritRefs="true"/>
+    <ant dir="${base.db}" target="update.database.script" inheritAll="true" inheritRefs="true"/>
   </target>
 
   <target name="export.database" depends="init">
-    <ant dir="${base.source}/database" target="export.database.structure" inheritAll="true" inheritRefs="true"/>
-    <ant dir="${base.source}/database" target="export.database.data" inheritAll="true" inheritRefs="true"/>
+    <ant dir="${base.db}" target="export.database.structure" inheritAll="true" inheritRefs="true"/>
+    <ant dir="${base.db}" target="export.database.data" inheritAll="true" inheritRefs="true"/>
   </target>
 
   <target name="export.database.structure" depends="init">
-    <ant dir="${base.source}/database" target="export.database.structure" inheritAll="true" inheritRefs="true"/>
+    <ant dir="${base.db}" target="export.database.structure" inheritAll="true" inheritRefs="true"/>
   </target>
 
   <target name="export.database.data" depends="init">
-    <ant dir="${base.source}/database" target="export.database.data" inheritAll="true" inheritRefs="true"/>
+    <ant dir="${base.db}" target="export.database.data" inheritAll="true" inheritRefs="true"/>
   </target>
 
   <target name="import.database.data" depends="init">
-    <ant dir="${base.source}/database" target="import.database.data" inheritAll="true" inheritRefs="true"/>
+    <ant dir="${base.db}" target="import.database.data" inheritAll="true" inheritRefs="true"/>
   </target>
 
   <target name="export.database.sampledata" depends="init">
-    <ant dir="${base.source}/database" target="export.database.sampledata" inheritAll="true" inheritRefs="true"/>
+    <ant dir="${base.db}" target="export.database.sampledata" inheritAll="true" inheritRefs="true"/>
   </target>
 
   <target name="import.database.sampledata" depends="init">
-    <ant dir="${base.source}/database" target="import.database.sampledata" inheritAll="true" inheritRefs="true"/>
+    <ant dir="${base.db}" target="import.database.sampledata" inheritAll="true" inheritRefs="true"/>
   </target>
 
   <target name="export.database.masterdata" depends="init">
-    <ant dir="${base.source}/database" target="export.database.masterdata" inheritAll="true" inheritRefs="true"/>
+    <ant dir="${base.db}" target="export.database.masterdata" inheritAll="true" inheritRefs="true"/>
   </target>
 
   <target name="import.database.masterdata" depends="init">
-    <ant dir="${base.source}/database" target="import.database.masterdata" inheritAll="true" inheritRefs="true"/>
+    <ant dir="${base.db}" target="import.database.masterdata" inheritAll="true" inheritRefs="true"/>
   </target>
 
   <target name="save.database.model" depends="init">
-    <ant dir="${base.source}/database" target="save.database.model" inheritAll="true" inheritRefs="true"/>
+    <ant dir="${base.db}" target="save.database.model" inheritAll="true" inheritRefs="true"/>
   </target>
 
   <target name="compare.database.structure" depends="init">
-    <ant dir="${base.source}/database" target="compare.database.structure" inheritAll="true" inheritRefs="true"/>
+    <ant dir="${base.db}" target="compare.database.structure" inheritAll="true" inheritRefs="true"/>
   </target>
 
 </project>