build.xml
author Antonio Moreno <antonio.moreno@openbravo.com>
Tue, 19 Feb 2008 10:09:56 +0000
changeset 451 408c33b8ad40
parent 345 337c99045b67
child 536 11197a4eb04d
permissions -rw-r--r--
bug fixed: [1883392] Because of this bug, a new data class (masterdata) has been created. This class will contain the data which is not sampledata, but that clients usually find useful (for example, countries or currencies).
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
-->
juanpablo@213
    20
<!--
juanpablo@213
    21
List of targets:
juanpablo@213
    22
juanpablo@213
    23
init: checks if exists the JAVA_HOME var.
juanpablo@213
    24
compile.complete: refer to compile.complete target of src.
juanpablo@213
    25
compile: refer to compile target of src.
juanpablo@213
    26
compile.complete.development: refer to compile.complete.development target of src.
juanpablo@213
    27
compile.development: refer to compile.development target of src.
juanpablo@213
    28
eclipse.compile: refer to eclipse.compile target of src.
juanpablo@213
    29
eclipse.compile.complete: refer to eclipse.compile.complete target of src.
juanpablo@213
    30
compile.src: refer to compile.src target of src.
juanpablo@213
    31
war: refer to build.war target of src.
juanpablo@213
    32
core.docs: refer to doc target of src-core.
juanpablo@213
    33
core.lib: refer to build target of src-core.
juanpablo@213
    34
eclipse.wad.lib: refer to sqlc target of src-wad.
juanpablo@213
    35
wad.docs: refer to doc target of src-wad.
juanpablo@213
    36
wad.lib: refer to build target of src-wad.
juanpablo@213
    37
eclipse.trl.lib: refer to sqlc target of src-trl.
juanpablo@213
    38
trl.docs: refer to doc target of src-trl.
juanpablo@213
    39
trl.lib: refer to build target of src-trl.
juanpablo@213
    40
database.lib: refer to jar target of src-db.
juanpablo@213
    41
clean: refer to clean target of src.
juanpablo@213
    42
trl.clean: refer to trl.clean target of src.
juanpablo@213
    43
translate: refer to translate target of src.
juanpablo@213
    44
installWebService: refer to installWebService target of src.
juanpablo@213
    45
uninstallWebService: refer to uninstallWebService target of src.
juanpablo@213
    46
preinstall: deprecated.
juanpablo@213
    47
preinstall.complete: deprecated.
juanpablo@213
    48
install: deprecated.
juanpablo@213
    49
deploy: copy war to the jakarta context.
juanpablo@213
    50
install.source: install the ERP from sources (from subversion).
juanpablo@213
    51
eclipse.install.source: install the ERP from sources for eclipse (from subversion).
juanpablo@213
    52
create.database: refer to create.database target of database.
juanpablo@213
    53
update.database: refer to update.database target of database.
juanpablo@213
    54
create.database.structure: refer to create.database.structure target of database.
juanpablo@213
    55
update.database.structure: refer to update.database.structure target of database.
juanpablo@213
    56
create.database.script: refer to create.database.script target of database.
juanpablo@213
    57
update.database.script: refer to update.database.script target of database.
juanpablo@213
    58
export.database: exports database structure and data to xml files.
juanpablo@213
    59
export.database.structure: refer to export.database.structure target of database.
juanpablo@213
    60
export.database.data: refer to export.database.data target of database.
juanpablo@213
    61
import.database.data: refer to import.database.data target of database.
juanpablo@213
    62
export.database.sampledata: refer to export.database.sampledata target of database.
juanpablo@213
    63
import.database.sampledata: refer to import.database.sampledata target of database.
antonio@451
    64
export.database.masterdata: refer to export.database.masterdata target of database.
antonio@451
    65
import.database.masterdata: refer to import.database.masterdata target of database.
juanpablo@213
    66
save.database.model: refer to save.database.model target of database.
juanpablo@213
    67
compare.database.structure: refer to compare.database.structure target of database.
fernando@202
    68
-->
asier@43
    69
<project name="openbravo" default="compile.complete" basedir=".">
juanpablo@131
    70
  <property environment="env"/>
juanpablo@131
    71
  <property file="config/Openbravo.properties"/>
asier@43
    72
  <property name="separator" value="/"/>
juanpablo@131
    73
juanpablo@131
    74
  <property name="base.context" value="${base.source}/WebContent"/>
asier@43
    75
  <property name="jakarta.home" value="${env.CATALINA_HOME}"/>
juanpablo@131
    76
  <property name="build.core.lib" value="${base.source}/src-core/lib"/>
juanpablo@131
    77
  <property name="build.trl.lib" value="${base.source}/src-trl/lib"/>
juanpablo@131
    78
  <property name="build.wad.lib" value="${base.source}/src-wad/lib"/>
asier@43
    79
  <condition property="jakarta.base" value="${env.CATALINA_BASE}" else="${jakarta.home}">
asier@43
    80
    <and>
asier@43
    81
      <isset property="env.CATALINA_BASE"/>
asier@43
    82
    </and>
asier@43
    83
  </condition>
asier@43
    84
  <property name="log.path" value="${jakarta.base}/logs"/>
juanpablo@131
    85
  <property name="base.src" value="${base.source}${separator}src"/>
asier@43
    86
  <property name="base.design" value="${base.context}/src-loc"/>
juanpablo@131
    87
  <property name="base.web" value="${base.source}${separator}web"/>
asier@43
    88
  <property name="base.wad" value="${base.source}${separator}src-wad"/>
asier@43
    89
  <property name="build" value="${base.source}${separator}build${separator}classes"/>
asier@43
    90
  <property name="build.AD" value="${base.source}${separator}srcAD"/>
asier@43
    91
  <property name="build.sqlc" value="${base.source}${separator}build${separator}javasqlc"/>
asier@43
    92
  <property name="build.docs" value="${base.source}${separator}docs${separator}api"/>
asier@43
    93
  <property name="lib" value="${jakarta.home}${separator}common"/>
juanpablo@131
    94
  <property name="base.lib" value="${base.source}${separator}lib"/>
juanpablo@131
    95
  <property name="base.config" value="${base.source}${separator}config"/>
asier@43
    96
  <property name="jakarta.context" value="${jakarta.base}${separator}webapps${separator}openbravo"/>
asier@43
    97
  <property name="base.client.src" value="${base.source}${separator}srcClient"/>
asier@43
    98
  <property name="build.maxmemory" value="512M"/>
asier@43
    99
  <property name="debug.level" value="false"/>
asier@43
   100
asier@43
   101
  <condition property="shell.extension" value="bat" else="sh">
asier@43
   102
    <and>
asier@43
   103
      <os family="windows"/>
asier@43
   104
    </and>
asier@43
   105
  </condition>
asier@43
   106
asier@43
   107
  <condition property="temp.folder" value="c:\Temp" else="/tmp">
juanpablo@131
   108
    <and>
juanpablo@131
   109
      <os family="windows"/>
juanpablo@131
   110
    </and>
asier@43
   111
  </condition>
asier@43
   112
stefan@124
   113
  <condition property="no.java.home" value="true">
stefan@124
   114
    <not>
stefan@125
   115
      <isset property="env.JAVA_HOME"/>
stefan@124
   116
    </not>
stefan@124
   117
  </condition>
stefan@124
   118
asier@43
   119
  <path id="project.class.path">
asier@43
   120
    <pathelement path="${build}"/>
asier@43
   121
    <fileset dir="${base.lib}">
asier@43
   122
      <include name="**/*.jar"/>
asier@43
   123
    </fileset>
asier@43
   124
    <fileset dir="${build.core.lib}">
asier@43
   125
      <include name="openbravo-core.jar"/>
asier@43
   126
    </fileset>
asier@43
   127
    <fileset dir="${build.trl.lib}">
asier@43
   128
      <include name="openbravo-trl.jar"/>
asier@43
   129
    </fileset>
asier@43
   130
    <fileset dir="${build.wad.lib}">
asier@43
   131
      <include name="openbravo-wad.jar"/>
asier@43
   132
    </fileset>
asier@43
   133
  </path>
asier@43
   134
stefan@124
   135
  <target name="init">
stefan@124
   136
    <fail if="no.java.home" message="The environment variable JAVA_HOME is not set."/>
stefan@124
   137
  </target>
stefan@124
   138
stefan@124
   139
  <target name="compile.complete" depends="init">
juanpablo@131
   140
    <ant dir="${base.source}/src" target="compile.complete" inheritAll="true" inheritRefs="true"/>
asier@43
   141
  </target>
asier@43
   142
stefan@124
   143
  <target name="compile" depends="init">
juanpablo@131
   144
    <ant dir="${base.source}/src" target="compile" inheritAll="true" inheritRefs="true"/>
asier@43
   145
  </target>
asier@43
   146
stefan@124
   147
  <target name="compile.complete.development" depends="init">
juanpablo@131
   148
    <ant dir="${base.source}/src" target="compile.complete.development" inheritAll="true" inheritRefs="true"/>
asier@43
   149
  </target>
asier@43
   150
stefan@124
   151
  <target name="compile.development" depends="init">
juanpablo@131
   152
    <ant dir="${base.source}/src" target="compile.development" inheritAll="true" inheritRefs="true"/>
asier@43
   153
  </target>
asier@43
   154
stefan@124
   155
  <target name="eclipse.compile" depends="init">
juanpablo@131
   156
    <ant dir="${base.source}/src-core" target="build.jar" inheritAll="true" inheritRefs="true"/>
juanpablo@131
   157
    <ant dir="${base.source}/src-trl" target="build.jar" inheritAll="true" inheritRefs="true"/>
juanpablo@131
   158
    <ant dir="${base.source}/src-wad" target="build.jar" inheritAll="true" inheritRefs="true"/>
juanpablo@131
   159
    <ant dir="${base.source}/src" target="eclipse.compile" inheritAll="true" inheritRefs="true"/>
asier@43
   160
  </target>
asier@43
   161
stefan@124
   162
  <target name="eclipse.compile.complete" depends="init">
juanpablo@131
   163
    <ant dir="${base.source}/src-core" target="build.jar" inheritAll="true" inheritRefs="true"/>
juanpablo@131
   164
    <ant dir="${base.source}/src-trl" target="build.jar" inheritAll="true" inheritRefs="true"/>
juanpablo@131
   165
    <ant dir="${base.source}/src-wad" target="build.jar" inheritAll="true" inheritRefs="true"/>
juanpablo@131
   166
    <ant dir="${base.source}/src" target="eclipse.compile.complete" inheritAll="true" inheritRefs="true"/>
asier@43
   167
  </target>
asier@43
   168
stefan@124
   169
  <target name="compile.src" depends="init">
juanpablo@131
   170
    <ant dir="${base.source}/src" target="compile.src" inheritAll="true" inheritRefs="true"/>
asier@43
   171
  </target>
asier@43
   172
stefan@124
   173
  <target name="war" depends="init">
juanpablo@131
   174
    <ant dir="${base.source}${separator}src" target="build.war" inheritAll="true" inheritRefs="true"/>
asier@43
   175
  </target>
asier@43
   176
stefan@124
   177
  <target name="core.docs" depends="init">
juanpablo@131
   178
    <ant dir="${base.source}${separator}src-core" target="doc" inheritAll="true" inheritRefs="true"/>
asier@43
   179
  </target>
juanpablo@131
   180
stefan@124
   181
  <target name="core.lib" depends="init">
juanpablo@131
   182
    <ant dir="${base.source}${separator}src-core" target="build" inheritAll="true" inheritRefs="true"/>
juanpablo@131
   183
    <copy file="${base.source}/src-core/lib/openbravo-core.jar" todir="${base.lib}" overwrite="true" failonerror="false"/>
asier@43
   184
  </target>
juanpablo@131
   185
stefan@124
   186
  <target name="eclipse.wad.lib" depends="init">
juanpablo@131
   187
    <ant dir="${base.source}${separator}src-wad" target="sqlc" inheritAll="true" inheritRefs="true"/>
asier@43
   188
  </target>
juanpablo@131
   189
stefan@124
   190
  <target name="wad.docs" depends="init">
juanpablo@131
   191
    <ant dir="${base.source}${separator}src-wad" target="doc" inheritAll="true" inheritRefs="true"/>
asier@43
   192
  </target>
juanpablo@131
   193
stefan@124
   194
  <target name="wad.lib" depends="init">
juanpablo@131
   195
    <ant dir="${base.source}${separator}src-wad" target="build" inheritAll="true" inheritRefs="true"/>
asier@43
   196
  </target>
juanpablo@131
   197
stefan@124
   198
  <target name="eclipse.trl.lib" depends="init">
juanpablo@131
   199
    <ant dir="${base.source}${separator}src-trl" target="sqlc" inheritAll="true" inheritRefs="true"/>
asier@43
   200
  </target>
juanpablo@131
   201
stefan@124
   202
  <target name="trl.docs" depends="init">
juanpablo@131
   203
    <ant dir="${base.source}${separator}src-trl" target="doc" inheritAll="true" inheritRefs="true"/>
asier@43
   204
  </target>
juanpablo@131
   205
stefan@124
   206
  <target name="trl.lib" depends="init">
juanpablo@131
   207
    <ant dir="${base.source}${separator}src-trl" target="build" inheritAll="true" inheritRefs="true"/>
asier@43
   208
  </target>
juanpablo@131
   209
stefan@124
   210
  <target name="database.lib" depends="init">
juanpablo@131
   211
    <ant dir="${base.source}${separator}src-db" target="jar" inheritAll="true" inheritRefs="true"/>
juanpablo@131
   212
    <copy file="${base.source}/src-db/build/lib/dbmanager.jar" todir="${base.source}/database/lib" overwrite="true" failonerror="false"/>
asier@43
   213
  </target>
asier@43
   214
juanpablo@179
   215
  <target name="clean" depends="init">
juanpablo@179
   216
    <ant dir="${base.source}/src" target="clean" inheritAll="true" inheritRefs="true"/>
juanpablo@179
   217
  </target>
juanpablo@179
   218
juanpablo@179
   219
  <target name="trl.clean" depends="init">
juanpablo@179
   220
    <ant dir="${base.source}/src" target="trl.clean" inheritAll="true" inheritRefs="true"/>
juanpablo@179
   221
  </target>
juanpablo@179
   222
juanpablo@179
   223
  <target name="translate" depends="init">
juanpablo@179
   224
    <ant dir="${base.source}/src" target="translate" inheritAll="true" inheritRefs="true"/>
juanpablo@179
   225
  </target>
juanpablo@179
   226
stefan@124
   227
  <target name="installWebService" depends="init">
juanpablo@131
   228
    <ant dir="${base.source}/src" target="installWebService" inheritAll="true" inheritRefs="true">
asier@43
   229
      <property name="wsdd" value="1"/>
asier@43
   230
    </ant>
asier@43
   231
  </target>
asier@43
   232
stefan@124
   233
  <target name="uninstallWebService" depends="init">
antonio@305
   234
    <ant dir="${base.source}/src" target="uninstallWebService" inheritAll="true" inheritRefs="true"/>
asier@43
   235
  </target>
asier@43
   236
stefan@124
   237
  <target name="preinstall" depends="init">
juanpablo@131
   238
    <ant dir="${base.source}/bdutil" target="build" inheritAll="true" inheritRefs="true"/>
juanpablo@131
   239
    <ant dir="${base.source}/bdutil" target="preinstall" inheritAll="true" inheritRefs="true"/>
asier@43
   240
  </target>
asier@43
   241
stefan@124
   242
  <target name="preinstall.complete" depends="init">
juanpablo@131
   243
    <ant dir="${base.source}/bdutil" target="build" inheritAll="true" inheritRefs="true"/>
juanpablo@131
   244
    <ant dir="${base.source}/bdutil" target="preinstall_complete" inheritAll="true" inheritRefs="true"/>
asier@43
   245
  </target>
asier@43
   246
stefan@124
   247
  <target name="install" depends="init">
juanpablo@131
   248
    <ant dir="${base.source}/install" target="build" inheritAll="true" inheritRefs="true"/>
juanpablo@131
   249
    <ant dir="${base.source}/install" target="install" inheritAll="true" inheritRefs="true"/>
asier@43
   250
  </target>
asier@43
   251
stefan@124
   252
  <target name="deploy" depends="init">
asier@43
   253
    <copy file="${base.lib}/${context.name}.war" todir="${jakarta.base}/webapps"/>
asier@43
   254
  </target>
asier@43
   255
stefan@124
   256
  <target name="install.source" depends="init">
asier@43
   257
    <antcall target="database.lib"/>
juanpablo@131
   258
    <ant dir="${base.source}/database" target="create.database" inheritAll="true" inheritRefs="true"/>
asier@43
   259
    <antcall target="core.lib"/>
asier@43
   260
    <antcall target="wad.lib"/>
asier@43
   261
    <antcall target="trl.lib"/>
asier@43
   262
    <antcall target="compile.complete"/>
asier@43
   263
    <antcall target="installWebService"/>
asier@43
   264
    <antcall target="war"/>
asier@43
   265
  </target>
juanpablo@131
   266
stefan@124
   267
  <target name="eclipse.install.source" depends="init">
juanpablo@131
   268
    <antcall target="database.lib"/>
juanpablo@131
   269
    <ant dir="${base.source}/database" target="create.database" inheritAll="true" inheritRefs="true"/>
asier@43
   270
    <antcall target="core.lib"/>
asier@43
   271
    <antcall target="wad.lib"/>
asier@43
   272
    <antcall target="trl.lib"/>
asier@43
   273
    <antcall target="compile.complete"/>
asier@43
   274
    <antcall target="installWebService"/>
asier@43
   275
  </target>
asier@43
   276
juanpablo@131
   277
  <target name="create.database" depends="init">
juanpablo@131
   278
    <antcall target="database.lib"/>
juanpablo@131
   279
    <ant dir="${base.source}/database" target="create.database" inheritAll="true" inheritRefs="true"/>
juanpablo@131
   280
  </target>
asier@43
   281
juanpablo@131
   282
  <target name="update.database" depends="init">
juanpablo@131
   283
    <ant dir="${base.source}/database" target="update.database" inheritAll="true" inheritRefs="true"/>
juanpablo@131
   284
  </target>
asier@43
   285
juanpablo@131
   286
  <target name="create.database.structure" depends="init">
juanpablo@131
   287
    <ant dir="${base.source}/database" target="create.database.structure" inheritAll="true" inheritRefs="true"/>
juanpablo@131
   288
  </target>
asier@43
   289
juanpablo@131
   290
  <target name="update.database.structure" depends="init">
juanpablo@131
   291
    <ant dir="${base.source}/database" target="update.database.structure" inheritAll="true" inheritRefs="true"/>
juanpablo@131
   292
  </target>
asier@43
   293
juanpablo@131
   294
  <target name="create.database.script" depends="init">
juanpablo@131
   295
    <ant dir="${base.source}/database" target="create.database.script" inheritAll="true" inheritRefs="true"/>
juanpablo@131
   296
  </target>
asier@43
   297
juanpablo@131
   298
  <target name="update.database.script" depends="init">
juanpablo@131
   299
    <ant dir="${base.source}/database" target="update.database.script" inheritAll="true" inheritRefs="true"/>
juanpablo@131
   300
  </target>
adrian@97
   301
adrian@164
   302
  <target name="export.database" depends="init">
adrian@164
   303
    <ant dir="${base.source}/database" target="export.database.structure" inheritAll="true" inheritRefs="true"/>
adrian@164
   304
    <ant dir="${base.source}/database" target="export.database.data" inheritAll="true" inheritRefs="true"/>
adrian@164
   305
  </target>
adrian@164
   306
juanpablo@131
   307
  <target name="export.database.structure" depends="init">
juanpablo@131
   308
    <ant dir="${base.source}/database" target="export.database.structure" inheritAll="true" inheritRefs="true"/>
juanpablo@131
   309
  </target>
asier@43
   310
juanpablo@131
   311
  <target name="export.database.data" depends="init">
juanpablo@131
   312
    <ant dir="${base.source}/database" target="export.database.data" inheritAll="true" inheritRefs="true"/>
juanpablo@131
   313
  </target>
asier@43
   314
juanpablo@131
   315
  <target name="import.database.data" depends="init">
juanpablo@131
   316
    <ant dir="${base.source}/database" target="import.database.data" inheritAll="true" inheritRefs="true"/>
juanpablo@131
   317
  </target>
asier@43
   318
juanpablo@131
   319
  <target name="export.database.sampledata" depends="init">
juanpablo@131
   320
    <ant dir="${base.source}/database" target="export.database.sampledata" inheritAll="true" inheritRefs="true"/>
juanpablo@131
   321
  </target>
asier@43
   322
juanpablo@131
   323
  <target name="import.database.sampledata" depends="init">
juanpablo@131
   324
    <ant dir="${base.source}/database" target="import.database.sampledata" inheritAll="true" inheritRefs="true"/>
juanpablo@131
   325
  </target>
juanpablo@131
   326
antonio@451
   327
  <target name="export.database.masterdata" depends="init">
antonio@451
   328
    <ant dir="${base.source}/database" target="export.database.masterdata" inheritAll="true" inheritRefs="true"/>
antonio@451
   329
  </target>
antonio@451
   330
antonio@451
   331
  <target name="import.database.masterdata" depends="init">
antonio@451
   332
    <ant dir="${base.source}/database" target="import.database.masterdata" inheritAll="true" inheritRefs="true"/>
antonio@451
   333
  </target>
antonio@451
   334
juanpablo@131
   335
  <target name="save.database.model" depends="init">
juanpablo@131
   336
    <ant dir="${base.source}/database" target="save.database.model" inheritAll="true" inheritRefs="true"/>
juanpablo@131
   337
  </target>
adrian@171
   338
adrian@171
   339
  <target name="compare.database.structure" depends="init">
adrian@171
   340
    <ant dir="${base.source}/database" target="compare.database.structure" inheritAll="true" inheritRefs="true"/>
adrian@171
   341
  </target>
adrian@171
   342
asier@43
   343
</project>