build.xml
changeset 43 2d7441a3debd
child 47 713911f0de59
equal deleted inserted replaced
42:80e9e37cd02d 43:2d7441a3debd
       
     1 <?xml version="1.0" encoding="UTF-8" ?>
       
     2 <!--
       
     3  *************************************************************************
       
     4  * The contents of this file are subject to the Openbravo  Public  License
       
     5  * Version  1.0  (the  "License"),  being   the  Mozilla   Public  License
       
     6  * Version 1.1  with a permitted attribution clause; you may not  use this
       
     7  * file except in compliance with the License. You  may  obtain  a copy of
       
     8  * the License at http://www.openbravo.com/legal/license.html 
       
     9  * Software distributed under the License  is  distributed  on  an "AS IS"
       
    10  * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
       
    11  * License for the specific  language  governing  rights  and  limitations
       
    12  * under the License. 
       
    13  * The Original Code is Openbravo ERP. 
       
    14  * The Initial Developer of the Original Code is Openbravo SL 
       
    15  * All portions are Copyright (C) 2001-2006 Openbravo SL 
       
    16  * All Rights Reserved. 
       
    17  * Contributor(s):  ______________________________________.
       
    18  ************************************************************************
       
    19 -->
       
    20 
       
    21 <project name="openbravo" default="compile.complete" basedir=".">
       
    22 	<property environment="env"/>
       
    23 	<property file="config/Openbravo.properties"/>
       
    24   <property name="separator" value="/"/>
       
    25   <property name="base.subversion" value="${base.source}"/>
       
    26   
       
    27   <property name="base.context" value="${base.subversion}/WebContent"/>
       
    28   <property name="context.name" value="openbravo"/>
       
    29   <property name="jakarta.home" value="${env.CATALINA_HOME}"/>
       
    30   <property name="build.core.lib" value="${base.subversion}/src-core/lib"/>
       
    31   <property name="build.trl.lib" value="${base.subversion}/src-trl/lib"/>
       
    32   <property name="build.wad.lib" value="${base.subversion}/src-wad/lib"/>
       
    33   <condition property="jakarta.base" value="${env.CATALINA_BASE}" else="${jakarta.home}">
       
    34     <and>
       
    35       <isset property="env.CATALINA_BASE"/>
       
    36     </and>
       
    37   </condition>
       
    38   <property name="log.path" value="${jakarta.base}/logs"/>
       
    39   <property name="base.src" value="${base.subversion}${separator}src"/>
       
    40   <property name="base.design" value="${base.context}/src-loc"/>
       
    41   <property name="base.web" value="${base.subversion}${separator}web"/>
       
    42   <property name="base.wad" value="${base.source}${separator}src-wad"/>
       
    43   <property name="build" value="${base.source}${separator}build${separator}classes"/>
       
    44   <property name="build.AD" value="${base.source}${separator}srcAD"/>
       
    45   <property name="build.sqlc" value="${base.source}${separator}build${separator}javasqlc"/>
       
    46   <property name="build.docs" value="${base.source}${separator}docs${separator}api"/>
       
    47   <property name="lib" value="${jakarta.home}${separator}common"/>
       
    48   <property name="base.lib" value="${base.subversion}${separator}lib"/>
       
    49   <property name="base.config" value="${base.subversion}${separator}config"/>
       
    50   <property name="jakarta.context" value="${jakarta.base}${separator}webapps${separator}openbravo"/>
       
    51   <property name="base.client.src" value="${base.source}${separator}srcClient"/>
       
    52   <property name="client" value="download"/>
       
    53   <property name="release_dir" value="/opt/AppsPublicRelease/release"/>
       
    54   <property name="release_fonts" value="/opt/download"/>
       
    55   <property name="release_dest" value="/opt/release"/>
       
    56   <property name="release" value="2.12"/>
       
    57   <property name="fileRelease" value="/opt/FileRelease"/>
       
    58   <property name="documentation" value="/opt/documentation"/>
       
    59   <property name="demo_dest" value="/opt/demo"/>
       
    60   <property name="demo_client" value="demo"/>
       
    61   <property name="demo_dir" value="/opt/AppsPublicRelease/demo"/>
       
    62   <property name="build.maxmemory" value="512M"/>
       
    63   <property name="debug.level" value="false"/>
       
    64 
       
    65   <condition property="shell.extension" value="bat" else="sh">
       
    66     <and>
       
    67       <os family="windows"/>
       
    68     </and>
       
    69   </condition>
       
    70 
       
    71   <condition property="temp.folder" value="c:\Temp" else="/tmp">
       
    72         <and>
       
    73                 <os family="windows"/>
       
    74         </and>
       
    75   </condition>
       
    76 
       
    77   <path id="project.class.path">
       
    78     <pathelement path="${build}"/>
       
    79     <fileset dir="${base.lib}">
       
    80       <include name="**/*.jar"/>
       
    81     </fileset>
       
    82     <fileset dir="${build.core.lib}">
       
    83       <include name="openbravo-core.jar"/>
       
    84     </fileset>
       
    85     <fileset dir="${build.trl.lib}">
       
    86       <include name="openbravo-trl.jar"/>
       
    87     </fileset>
       
    88     <fileset dir="${build.wad.lib}">
       
    89       <include name="openbravo-wad.jar"/>
       
    90     </fileset>
       
    91   </path>
       
    92 
       
    93   <target name="compile.complete">
       
    94     <ant dir="${base.subversion}/src" target="compile.complete" inheritAll="true" inheritRefs="true"/>
       
    95   </target>
       
    96 
       
    97   <target name="compile">
       
    98     <ant dir="${base.subversion}/src" target="compile" inheritAll="true" inheritRefs="true"/>
       
    99   </target>
       
   100 
       
   101   <target name="compile.complete.development">
       
   102     <ant dir="${base.subversion}/src" target="compile.complete.development" inheritAll="true" inheritRefs="true"/>
       
   103   </target>
       
   104 
       
   105   <target name="compile.development">
       
   106     <ant dir="${base.subversion}/src" target="compile.development" inheritAll="true" inheritRefs="true"/>
       
   107   </target>
       
   108 
       
   109   <target name="eclipse.compile">
       
   110     <ant dir="${base.subversion}/src-core" target="build.jar" inheritAll="true" inheritRefs="true"/>
       
   111     <ant dir="${base.subversion}/src-trl" target="build.jar" inheritAll="true" inheritRefs="true"/>
       
   112     <ant dir="${base.subversion}/src-wad" target="build.jar" inheritAll="true" inheritRefs="true"/>
       
   113     <ant dir="${base.subversion}/src" target="eclipse.compile" inheritAll="true" inheritRefs="true"/>
       
   114   </target>
       
   115 
       
   116   <target name="eclipse.compile.complete">
       
   117     <ant dir="${base.subversion}/src-core" target="build.jar" inheritAll="true" inheritRefs="true"/>
       
   118     <ant dir="${base.subversion}/src-trl" target="build.jar" inheritAll="true" inheritRefs="true"/>
       
   119     <ant dir="${base.subversion}/src-wad" target="build.jar" inheritAll="true" inheritRefs="true"/>
       
   120     <ant dir="${base.subversion}/src" target="eclipse.compile.complete" inheritAll="true" inheritRefs="true"/>
       
   121   </target>
       
   122 
       
   123   <target name="compile.src">
       
   124     <ant dir="${base.subversion}/src" target="compile.src" inheritAll="true" inheritRefs="true"/>
       
   125   </target>
       
   126 
       
   127   <target name="war">
       
   128     <ant dir="${base.subversion}${separator}src" target="build.war" inheritAll="true" inheritRefs="true"/>
       
   129   </target>
       
   130 
       
   131   <target name="core.docs">
       
   132     <ant dir="${base.subversion}${separator}src-core" target="doc" inheritAll="true" inheritRefs="true"/>
       
   133   </target>
       
   134   
       
   135   <target name="core.lib">
       
   136     <ant dir="${base.subversion}${separator}src-core" target="build" inheritAll="true" inheritRefs="true"/>
       
   137     <copy file="${base.subversion}/src-core/lib/openbravo-core.jar" todir="${base.lib}" overwrite="true" failonerror="false"/>
       
   138   </target>
       
   139   
       
   140   <target name="eclipse.wad.lib">
       
   141     <ant dir="${base.subversion}${separator}src-wad" target="sqlc" inheritAll="true" inheritRefs="true"/>
       
   142   </target>
       
   143   
       
   144   <target name="wad.docs">
       
   145     <ant dir="${base.subversion}${separator}src-wad" target="doc" inheritAll="true" inheritRefs="true"/>
       
   146   </target>
       
   147   
       
   148   <target name="wad.lib">
       
   149     <ant dir="${base.subversion}${separator}src-wad" target="build" inheritAll="true" inheritRefs="true"/>
       
   150   </target>
       
   151   
       
   152   <target name="eclipse.trl.lib">
       
   153     <ant dir="${base.subversion}${separator}src-trl" target="sqlc" inheritAll="true" inheritRefs="true"/>
       
   154   </target>
       
   155   
       
   156   <target name="trl.docs">
       
   157     <ant dir="${base.subversion}${separator}src-trl" target="doc" inheritAll="true" inheritRefs="true"/>
       
   158   </target>
       
   159   
       
   160   <target name="trl.lib">
       
   161     <ant dir="${base.subversion}${separator}src-trl" target="build" inheritAll="true" inheritRefs="true"/>
       
   162     <!--copy file="${base.subversion}/src-trl/lib/openbravo-trl.jar" todir="${base.lib}" overwrite="true" failonerror="false"/-->
       
   163   </target>
       
   164   
       
   165   <target name="database.lib">
       
   166     <ant dir="${base.subversion}${separator}src-db" target="jar" inheritAll="true" inheritRefs="true"/>
       
   167     <copy file="${base.subversion}/src-db/build/lib/dbmanager.jar" todir="${base.subversion}/database/lib" overwrite="true" failonerror="false"/>
       
   168   </target>
       
   169 
       
   170   <target name="installWebService">
       
   171     <ant dir="${base.subversion}/src" target="installWebService" inheritAll="true" inheritRefs="true">
       
   172       <property name="wsdd" value="1"/>
       
   173     </ant>
       
   174   </target>
       
   175 
       
   176   <target name="uninstallWebService">
       
   177     <ant dir="${base.subversin}/src" target="uninstallWebService" inheritAll="true" inheritRefs="true"/>
       
   178   </target>
       
   179 
       
   180   <target name="preinstall">
       
   181     <ant dir="${base.subversion}/bdutil" target="build" inheritAll="true" inheritRefs="true"/>
       
   182     <ant dir="${base.subversion}/bdutil" target="preinstall" inheritAll="true" inheritRefs="true"/>
       
   183   </target>
       
   184 
       
   185   <target name="preinstall.complete">
       
   186     <ant dir="${base.subversion}/bdutil" target="build" inheritAll="true" inheritRefs="true"/>
       
   187     <ant dir="${base.subversion}/bdutil" target="preinstall_complete" inheritAll="true" inheritRefs="true"/>
       
   188   </target>
       
   189 
       
   190   <target name="setup">
       
   191     <ant dir="./setup" target="setup" inheritAll="true" inheritRefs="true"/>
       
   192   </target>
       
   193 
       
   194   <target name="setup.compile">
       
   195     <ant dir="./setup" target="compile" inheritAll="true" inheritRefs="true"/>
       
   196   </target>
       
   197 
       
   198   <target name="install">
       
   199     <ant dir="${base.subversion}/install" target="build" inheritAll="true" inheritRefs="true"/>
       
   200     <ant dir="${base.subversion}/install" target="install" inheritAll="true" inheritRefs="true"/>
       
   201   </target>
       
   202 
       
   203   <target name="deploy">
       
   204     <copy file="${base.lib}/${context.name}.war" todir="${jakarta.base}/webapps"/>
       
   205   </target>
       
   206 
       
   207   <target name="install.source">
       
   208     <ant dir="${base.subversion}/database" target="create.database" inheritAll="true" inheritRefs="true"/>
       
   209     <antcall target="database.lib"/>
       
   210     <antcall target="core.lib"/>
       
   211     <antcall target="wad.lib"/>
       
   212     <antcall target="trl.lib"/>
       
   213     <antcall target="compile.complete"/>
       
   214     <antcall target="installWebService"/>
       
   215     <antcall target="war"/>
       
   216   </target>
       
   217   
       
   218   <target name="eclipse.install.source">
       
   219     <ant dir="${base.subversion}/database" target="create.database" inheritAll="true" inheritRefs="true"/>
       
   220     <antcall target="database.lib"/>
       
   221     <antcall target="core.lib"/>
       
   222     <antcall target="wad.lib"/>
       
   223     <antcall target="trl.lib"/>
       
   224     <antcall target="compile.complete"/>
       
   225     <antcall target="installWebService"/>
       
   226   </target>
       
   227 
       
   228     <target name="create.database">
       
   229         <ant dir="${base.subversion}/database" target="create.database" inheritAll="true" inheritRefs="true"/>
       
   230     </target>
       
   231 
       
   232     <target name="update.database">
       
   233         <ant dir="${base.subversion}/database" target="update.database" inheritAll="true" inheritRefs="true"/>   
       
   234    </target>
       
   235 
       
   236     <target name="create.database.structure">
       
   237         <ant dir="${base.subversion}/database" target="create.database.structure" inheritAll="true" inheritRefs="true"/>
       
   238     </target>
       
   239 
       
   240     <target name="update.database.structure">
       
   241         <ant dir="${base.subversion}/database" target="update.database.structure" inheritAll="true" inheritRefs="true"/>   
       
   242    </target>
       
   243 
       
   244     <target name="create.database.script">
       
   245         <ant dir="${base.subversion}/database" target="create.database.script" inheritAll="true" inheritRefs="true"/>
       
   246     </target>
       
   247 
       
   248     <target name="update.database.script">
       
   249         <ant dir="${base.subversion}/database" target="update.database.script" inheritAll="true" inheritRefs="true"/>   
       
   250    </target>
       
   251     
       
   252     <target name="export.database.data">
       
   253         <ant dir="${base.subversion}/database" target="export.database.data" inheritAll="true" inheritRefs="true"/>
       
   254     </target>
       
   255     
       
   256     <target name="import.database.data">
       
   257         <ant dir="${base.subversion}/database" target="import.database.data" inheritAll="true" inheritRefs="true"/>
       
   258     </target>
       
   259 
       
   260     <target name="export.database.sampledata">
       
   261         <ant dir="${base.subversion}/database" target="export.database.sampledata" inheritAll="true" inheritRefs="true"/>
       
   262     </target>
       
   263 
       
   264     <target name="import.database.sampledata">
       
   265         <ant dir="${base.subversion}/database" target="import.database.sampledata" inheritAll="true" inheritRefs="true"/>
       
   266     </target>
       
   267 
       
   268     <target name="save.database.model">
       
   269         <ant dir="${base.subversion}/database" target="save.database.model" inheritAll="true" inheritRefs="true"/>
       
   270     </target>
       
   271 
       
   272 </project>