[1914248] Get ride of base.source, use relative paths. [1914249] base.temp is not used at all, removed.
authorJuan Pablo Aroztegi <juanpablo.aroztegi@openbravo.com>
Fri, 14 Mar 2008 12:10:31 +0000
changeset 536 11197a4eb04d
parent 535 8b0761dbf378
child 537 8eedfed43502
[1914248] Get ride of base.source, use relative paths. [1914249] base.temp is not used at all, removed.
build.xml
config/Openbravo.properties.template
database/build.xml
src/build.xml
--- 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>
--- a/config/Openbravo.properties.template	Fri Mar 14 11:59:45 2008 +0000
+++ b/config/Openbravo.properties.template	Fri Mar 14 12:10:31 2008 +0000
@@ -33,12 +33,10 @@
 bbdd.sessionConfig=ALTER SESSION SET NLS_LANGUAGE='AMERICAN' NLS_DATE_FORMAT='DD-MM-YYYY' NLS_NUMERIC_CHARACTERS='.,'
 
 # build.xml properties
-base.source=/opt/openbravo
 attach.path=/opt/openbravo/attachments
 context.name=openbravo
 web.url=@actual_url_context@/web
 context.url=http://localhost:8880/openbravo
-base.temp=/tmp
 
 # Development
 bbdd.outputscript=~/databasescript.sql
--- a/database/build.xml	Fri Mar 14 11:59:45 2008 +0000
+++ b/database/build.xml	Fri Mar 14 12:10:31 2008 +0000
@@ -43,7 +43,6 @@
 -->
 <project name="openbravo" default="create.database" basedir=".">
   <property environment="env" />
-  <property name="database.file" value="${base.source}/database" />
   <condition property="bbdd.owner.url" value="${bbdd.url}/${bbdd.sid}" else="${bbdd.url}">
     <and>
       <equals arg1="${bbdd.rdbms}" arg2="POSTGRE"/>
@@ -95,7 +94,6 @@
 
   <target name="create.database">
     <antcall target="clean.database.${bbdd.rdbms}"/>
-    <chmod dir="${base.source}/database" perm="755" type="both" />
     <antcall target="prepare.database"/>
     <antcall target="create.database.structure"/>
     <antcall target="import.database.data" />
--- a/src/build.xml	Fri Mar 14 11:59:45 2008 +0000
+++ b/src/build.xml	Fri Mar 14 12:10:31 2008 +0000
@@ -53,7 +53,6 @@
 <project name="openbravo sources" default="compile" basedir=".">
   <property name="webTab" value="all"/>
   <property name="tab" value="%"/>
-  <property name="base.language" value="${base.source}/src"/>
   <property name="base.translate.structure" value="org/openbravo/erpWindows"/>
   <property name="client.web.xml" value="${base.client.src}/web.xml"/>
   <property name="package" value="/org"/>
@@ -123,9 +122,9 @@
       <arg line="${base.config}/Openbravo.properties .xsql . ${build.sqlc}/src"/>
       <classpath refid="project.class.path"/>
     </java>
-    <copy file="${base.source}/src/buildAD.xml" tofile="${base.source}/srcAD/build.xml"/>
-    <copy file="${base.source}/src/log4j.lcf" tofile="${base.source}/srcAD/log4j.lcf"/>
-    <ant dir="${base.source}/srcAD" target="buildAD" inheritAll="true" inheritRefs="true"/>
+    <copy file="${base.src}/buildAD.xml" tofile="${build.AD}/build.xml"/>
+    <copy file="${base.src}/log4j.lcf" tofile="${build.AD}/log4j.lcf"/>
+    <ant dir="${build.AD}" target="buildAD" inheritAll="true" inheritRefs="true"/>
   </target>
 
   <target name="compileSqlc" depends="sqlc">
@@ -142,7 +141,7 @@
 
   <target name="wad" depends="init">
     <java classname="org.openbravo.wad.Wad" jvm="${env.JAVA_HOME}/bin/java" fork="yes" maxmemory="${build.maxmemory}">
-      <arg line="'${base.config}' '${tab}' '${build.AD}/org/openbravo/erpWindows' '${build.AD}/org/openbravo/erpCommon' '${build.sqlc}/src' '${webTab}' '${build.AD}/org/openbravo/erpCommon/ad_actionButton' '${base.design}' '${base.translate.structure}' '${client.web.xml}' '${base.source}' '${attach.path}' '${web.url}' '${base.src}' '${complete}'"/>
+      <arg line="'${base.config}' '${tab}' '${build.AD}/org/openbravo/erpWindows' '${build.AD}/org/openbravo/erpCommon' '${build.sqlc}/src' '${webTab}' '${build.AD}/org/openbravo/erpCommon/ad_actionButton' '${base.design}' '${base.translate.structure}' '${client.web.xml}' '..' '${attach.path}' '${web.url}' '${base.src}' '${complete}'"/>
       <classpath refid="project.class.path"/>
     </java>
     <antcall target="postwad" inheritall="true" inheritrefs="true"/>
@@ -222,7 +221,7 @@
     </copy>
     <mkdir dir="${base.context}/web"/>
     <copy todir="${base.context}/web"  encoding="UTF-8">
-      <fileset dir="${base.source}/web/"/>
+      <fileset dir="${base.web}"/>
     </copy>
     <chmod dir="${base.context}" perm="775"/>
   </target>