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