build.xml
author Juan Pablo Aroztegi <juanpablo.aroztegi@openbravo.com>
Tue, 11 Dec 2007 09:10:22 +0000
changeset 213 7bc683ea98e9
parent 202 54e5b8f4d170
child 305 b296d661c7c5
permissions -rw-r--r--
Remove ^M garbage
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.
juanpablo@213
    64
save.database.model: refer to save.database.model target of database.
juanpablo@213
    65
compare.database.structure: refer to compare.database.structure target of database.
fernando@202
    66
-->
asier@43
    67
<project name="openbravo" default="compile.complete" basedir=".">
juanpablo@131
    68
  <property environment="env"/>
juanpablo@131
    69
  <property file="config/Openbravo.properties"/>
asier@43
    70
  <property name="separator" value="/"/>
juanpablo@131
    71
juanpablo@131
    72
  <property name="base.context" value="${base.source}/WebContent"/>
asier@43
    73
  <property name="context.name" value="openbravo"/>
asier@43
    74
  <property name="jakarta.home" value="${env.CATALINA_HOME}"/>
juanpablo@131
    75
  <property name="build.core.lib" value="${base.source}/src-core/lib"/>
juanpablo@131
    76
  <property name="build.trl.lib" value="${base.source}/src-trl/lib"/>
juanpablo@131
    77
  <property name="build.wad.lib" value="${base.source}/src-wad/lib"/>
asier@43
    78
  <condition property="jakarta.base" value="${env.CATALINA_BASE}" else="${jakarta.home}">
asier@43
    79
    <and>
asier@43
    80
      <isset property="env.CATALINA_BASE"/>
asier@43
    81
    </and>
asier@43
    82
  </condition>
asier@43
    83
  <property name="log.path" value="${jakarta.base}/logs"/>
juanpablo@131
    84
  <property name="base.src" value="${base.source}${separator}src"/>
asier@43
    85
  <property name="base.design" value="${base.context}/src-loc"/>
juanpablo@131
    86
  <property name="base.web" value="${base.source}${separator}web"/>
asier@43
    87
  <property name="base.wad" value="${base.source}${separator}src-wad"/>
asier@43
    88
  <property name="build" value="${base.source}${separator}build${separator}classes"/>
asier@43
    89
  <property name="build.AD" value="${base.source}${separator}srcAD"/>
asier@43
    90
  <property name="build.sqlc" value="${base.source}${separator}build${separator}javasqlc"/>
asier@43
    91
  <property name="build.docs" value="${base.source}${separator}docs${separator}api"/>
asier@43
    92
  <property name="lib" value="${jakarta.home}${separator}common"/>
juanpablo@131
    93
  <property name="base.lib" value="${base.source}${separator}lib"/>
juanpablo@131
    94
  <property name="base.config" value="${base.source}${separator}config"/>
asier@43
    95
  <property name="jakarta.context" value="${jakarta.base}${separator}webapps${separator}openbravo"/>
asier@43
    96
  <property name="base.client.src" value="${base.source}${separator}srcClient"/>
asier@43
    97
  <property name="build.maxmemory" value="512M"/>
asier@43
    98
  <property name="debug.level" value="false"/>
asier@43
    99
asier@43
   100
  <condition property="shell.extension" value="bat" else="sh">
asier@43
   101
    <and>
asier@43
   102
      <os family="windows"/>
asier@43
   103
    </and>
asier@43
   104
  </condition>
asier@43
   105
asier@43
   106
  <condition property="temp.folder" value="c:\Temp" else="/tmp">
juanpablo@131
   107
    <and>
juanpablo@131
   108
      <os family="windows"/>
juanpablo@131
   109
    </and>
asier@43
   110
  </condition>
asier@43
   111
stefan@124
   112
  <condition property="no.java.home" value="true">
stefan@124
   113
    <not>
stefan@125
   114
      <isset property="env.JAVA_HOME"/>
stefan@124
   115
    </not>
stefan@124
   116
  </condition>
stefan@124
   117
asier@43
   118
  <path id="project.class.path">
asier@43
   119
    <pathelement path="${build}"/>
asier@43
   120
    <fileset dir="${base.lib}">
asier@43
   121
      <include name="**/*.jar"/>
asier@43
   122
    </fileset>
asier@43
   123
    <fileset dir="${build.core.lib}">
asier@43
   124
      <include name="openbravo-core.jar"/>
asier@43
   125
    </fileset>
asier@43
   126
    <fileset dir="${build.trl.lib}">
asier@43
   127
      <include name="openbravo-trl.jar"/>
asier@43
   128
    </fileset>
asier@43
   129
    <fileset dir="${build.wad.lib}">
asier@43
   130
      <include name="openbravo-wad.jar"/>
asier@43
   131
    </fileset>
asier@43
   132
  </path>
asier@43
   133
stefan@124
   134
  <target name="init">
stefan@124
   135
    <fail if="no.java.home" message="The environment variable JAVA_HOME is not set."/>
stefan@124
   136
  </target>
stefan@124
   137
stefan@124
   138
  <target name="compile.complete" depends="init">
juanpablo@131
   139
    <ant dir="${base.source}/src" target="compile.complete" inheritAll="true" inheritRefs="true"/>
asier@43
   140
  </target>
asier@43
   141
stefan@124
   142
  <target name="compile" depends="init">
juanpablo@131
   143
    <ant dir="${base.source}/src" target="compile" inheritAll="true" inheritRefs="true"/>
asier@43
   144
  </target>
asier@43
   145
stefan@124
   146
  <target name="compile.complete.development" depends="init">
juanpablo@131
   147
    <ant dir="${base.source}/src" target="compile.complete.development" inheritAll="true" inheritRefs="true"/>
asier@43
   148
  </target>
asier@43
   149
stefan@124
   150
  <target name="compile.development" depends="init">
juanpablo@131
   151
    <ant dir="${base.source}/src" target="compile.development" inheritAll="true" inheritRefs="true"/>
asier@43
   152
  </target>
asier@43
   153
stefan@124
   154
  <target name="eclipse.compile" depends="init">
juanpablo@131
   155
    <ant dir="${base.source}/src-core" target="build.jar" inheritAll="true" inheritRefs="true"/>
juanpablo@131
   156
    <ant dir="${base.source}/src-trl" target="build.jar" inheritAll="true" inheritRefs="true"/>
juanpablo@131
   157
    <ant dir="${base.source}/src-wad" target="build.jar" inheritAll="true" inheritRefs="true"/>
juanpablo@131
   158
    <ant dir="${base.source}/src" target="eclipse.compile" inheritAll="true" inheritRefs="true"/>
asier@43
   159
  </target>
asier@43
   160
stefan@124
   161
  <target name="eclipse.compile.complete" depends="init">
juanpablo@131
   162
    <ant dir="${base.source}/src-core" target="build.jar" inheritAll="true" inheritRefs="true"/>
juanpablo@131
   163
    <ant dir="${base.source}/src-trl" target="build.jar" inheritAll="true" inheritRefs="true"/>
juanpablo@131
   164
    <ant dir="${base.source}/src-wad" target="build.jar" inheritAll="true" inheritRefs="true"/>
juanpablo@131
   165
    <ant dir="${base.source}/src" target="eclipse.compile.complete" inheritAll="true" inheritRefs="true"/>
asier@43
   166
  </target>
asier@43
   167
stefan@124
   168
  <target name="compile.src" depends="init">
juanpablo@131
   169
    <ant dir="${base.source}/src" target="compile.src" inheritAll="true" inheritRefs="true"/>
asier@43
   170
  </target>
asier@43
   171
stefan@124
   172
  <target name="war" depends="init">
juanpablo@131
   173
    <ant dir="${base.source}${separator}src" target="build.war" inheritAll="true" inheritRefs="true"/>
asier@43
   174
  </target>
asier@43
   175
stefan@124
   176
  <target name="core.docs" depends="init">
juanpablo@131
   177
    <ant dir="${base.source}${separator}src-core" target="doc" inheritAll="true" inheritRefs="true"/>
asier@43
   178
  </target>
juanpablo@131
   179
stefan@124
   180
  <target name="core.lib" depends="init">
juanpablo@131
   181
    <ant dir="${base.source}${separator}src-core" target="build" inheritAll="true" inheritRefs="true"/>
juanpablo@131
   182
    <copy file="${base.source}/src-core/lib/openbravo-core.jar" todir="${base.lib}" overwrite="true" failonerror="false"/>
asier@43
   183
  </target>
juanpablo@131
   184
stefan@124
   185
  <target name="eclipse.wad.lib" depends="init">
juanpablo@131
   186
    <ant dir="${base.source}${separator}src-wad" target="sqlc" inheritAll="true" inheritRefs="true"/>
asier@43
   187
  </target>
juanpablo@131
   188
stefan@124
   189
  <target name="wad.docs" depends="init">
juanpablo@131
   190
    <ant dir="${base.source}${separator}src-wad" target="doc" inheritAll="true" inheritRefs="true"/>
asier@43
   191
  </target>
juanpablo@131
   192
stefan@124
   193
  <target name="wad.lib" depends="init">
juanpablo@131
   194
    <ant dir="${base.source}${separator}src-wad" target="build" inheritAll="true" inheritRefs="true"/>
asier@43
   195
  </target>
juanpablo@131
   196
stefan@124
   197
  <target name="eclipse.trl.lib" depends="init">
juanpablo@131
   198
    <ant dir="${base.source}${separator}src-trl" target="sqlc" inheritAll="true" inheritRefs="true"/>
asier@43
   199
  </target>
juanpablo@131
   200
stefan@124
   201
  <target name="trl.docs" depends="init">
juanpablo@131
   202
    <ant dir="${base.source}${separator}src-trl" target="doc" inheritAll="true" inheritRefs="true"/>
asier@43
   203
  </target>
juanpablo@131
   204
stefan@124
   205
  <target name="trl.lib" depends="init">
juanpablo@131
   206
    <ant dir="${base.source}${separator}src-trl" target="build" inheritAll="true" inheritRefs="true"/>
asier@43
   207
  </target>
juanpablo@131
   208
stefan@124
   209
  <target name="database.lib" depends="init">
juanpablo@131
   210
    <ant dir="${base.source}${separator}src-db" target="jar" inheritAll="true" inheritRefs="true"/>
juanpablo@131
   211
    <copy file="${base.source}/src-db/build/lib/dbmanager.jar" todir="${base.source}/database/lib" overwrite="true" failonerror="false"/>
asier@43
   212
  </target>
asier@43
   213
juanpablo@179
   214
  <target name="clean" depends="init">
juanpablo@179
   215
    <ant dir="${base.source}/src" target="clean" inheritAll="true" inheritRefs="true"/>
juanpablo@179
   216
  </target>
juanpablo@179
   217
juanpablo@179
   218
  <target name="trl.clean" depends="init">
juanpablo@179
   219
    <ant dir="${base.source}/src" target="trl.clean" inheritAll="true" inheritRefs="true"/>
juanpablo@179
   220
  </target>
juanpablo@179
   221
juanpablo@179
   222
  <target name="translate" depends="init">
juanpablo@179
   223
    <ant dir="${base.source}/src" target="translate" inheritAll="true" inheritRefs="true"/>
juanpablo@179
   224
  </target>
juanpablo@179
   225
stefan@124
   226
  <target name="installWebService" depends="init">
juanpablo@131
   227
    <ant dir="${base.source}/src" target="installWebService" inheritAll="true" inheritRefs="true">
asier@43
   228
      <property name="wsdd" value="1"/>
asier@43
   229
    </ant>
asier@43
   230
  </target>
asier@43
   231
stefan@124
   232
  <target name="uninstallWebService" depends="init">
asier@43
   233
    <ant dir="${base.subversin}/src" target="uninstallWebService" inheritAll="true" inheritRefs="true"/>
asier@43
   234
  </target>
asier@43
   235
stefan@124
   236
  <target name="preinstall" depends="init">
juanpablo@131
   237
    <ant dir="${base.source}/bdutil" target="build" inheritAll="true" inheritRefs="true"/>
juanpablo@131
   238
    <ant dir="${base.source}/bdutil" target="preinstall" inheritAll="true" inheritRefs="true"/>
asier@43
   239
  </target>
asier@43
   240
stefan@124
   241
  <target name="preinstall.complete" depends="init">
juanpablo@131
   242
    <ant dir="${base.source}/bdutil" target="build" inheritAll="true" inheritRefs="true"/>
juanpablo@131
   243
    <ant dir="${base.source}/bdutil" target="preinstall_complete" inheritAll="true" inheritRefs="true"/>
asier@43
   244
  </target>
asier@43
   245
stefan@124
   246
  <target name="install" depends="init">
juanpablo@131
   247
    <ant dir="${base.source}/install" target="build" inheritAll="true" inheritRefs="true"/>
juanpablo@131
   248
    <ant dir="${base.source}/install" target="install" inheritAll="true" inheritRefs="true"/>
asier@43
   249
  </target>
asier@43
   250
stefan@124
   251
  <target name="deploy" depends="init">
asier@43
   252
    <copy file="${base.lib}/${context.name}.war" todir="${jakarta.base}/webapps"/>
asier@43
   253
  </target>
asier@43
   254
stefan@124
   255
  <target name="install.source" depends="init">
asier@43
   256
    <antcall target="database.lib"/>
juanpablo@131
   257
    <ant dir="${base.source}/database" target="create.database" inheritAll="true" inheritRefs="true"/>
asier@43
   258
    <antcall target="core.lib"/>
asier@43
   259
    <antcall target="wad.lib"/>
asier@43
   260
    <antcall target="trl.lib"/>
asier@43
   261
    <antcall target="compile.complete"/>
asier@43
   262
    <antcall target="installWebService"/>
asier@43
   263
    <antcall target="war"/>
asier@43
   264
  </target>
juanpablo@131
   265
stefan@124
   266
  <target name="eclipse.install.source" depends="init">
juanpablo@131
   267
    <antcall target="database.lib"/>
juanpablo@131
   268
    <ant dir="${base.source}/database" target="create.database" inheritAll="true" inheritRefs="true"/>
asier@43
   269
    <antcall target="core.lib"/>
asier@43
   270
    <antcall target="wad.lib"/>
asier@43
   271
    <antcall target="trl.lib"/>
asier@43
   272
    <antcall target="compile.complete"/>
asier@43
   273
    <antcall target="installWebService"/>
asier@43
   274
  </target>
asier@43
   275
juanpablo@131
   276
  <target name="create.database" depends="init">
juanpablo@131
   277
    <antcall target="database.lib"/>
juanpablo@131
   278
    <ant dir="${base.source}/database" target="create.database" inheritAll="true" inheritRefs="true"/>
juanpablo@131
   279
  </target>
asier@43
   280
juanpablo@131
   281
  <target name="update.database" depends="init">
juanpablo@131
   282
    <ant dir="${base.source}/database" target="update.database" inheritAll="true" inheritRefs="true"/>
juanpablo@131
   283
  </target>
asier@43
   284
juanpablo@131
   285
  <target name="create.database.structure" depends="init">
juanpablo@131
   286
    <ant dir="${base.source}/database" target="create.database.structure" inheritAll="true" inheritRefs="true"/>
juanpablo@131
   287
  </target>
asier@43
   288
juanpablo@131
   289
  <target name="update.database.structure" depends="init">
juanpablo@131
   290
    <ant dir="${base.source}/database" target="update.database.structure" inheritAll="true" inheritRefs="true"/>
juanpablo@131
   291
  </target>
asier@43
   292
juanpablo@131
   293
  <target name="create.database.script" depends="init">
juanpablo@131
   294
    <ant dir="${base.source}/database" target="create.database.script" inheritAll="true" inheritRefs="true"/>
juanpablo@131
   295
  </target>
asier@43
   296
juanpablo@131
   297
  <target name="update.database.script" depends="init">
juanpablo@131
   298
    <ant dir="${base.source}/database" target="update.database.script" inheritAll="true" inheritRefs="true"/>
juanpablo@131
   299
  </target>
adrian@97
   300
adrian@164
   301
  <target name="export.database" depends="init">
adrian@164
   302
    <ant dir="${base.source}/database" target="export.database.structure" inheritAll="true" inheritRefs="true"/>
adrian@164
   303
    <ant dir="${base.source}/database" target="export.database.data" inheritAll="true" inheritRefs="true"/>
adrian@164
   304
  </target>
adrian@164
   305
juanpablo@131
   306
  <target name="export.database.structure" depends="init">
juanpablo@131
   307
    <ant dir="${base.source}/database" target="export.database.structure" inheritAll="true" inheritRefs="true"/>
juanpablo@131
   308
  </target>
asier@43
   309
juanpablo@131
   310
  <target name="export.database.data" depends="init">
juanpablo@131
   311
    <ant dir="${base.source}/database" target="export.database.data" inheritAll="true" inheritRefs="true"/>
juanpablo@131
   312
  </target>
asier@43
   313
juanpablo@131
   314
  <target name="import.database.data" depends="init">
juanpablo@131
   315
    <ant dir="${base.source}/database" target="import.database.data" inheritAll="true" inheritRefs="true"/>
juanpablo@131
   316
  </target>
asier@43
   317
juanpablo@131
   318
  <target name="export.database.sampledata" depends="init">
juanpablo@131
   319
    <ant dir="${base.source}/database" target="export.database.sampledata" inheritAll="true" inheritRefs="true"/>
juanpablo@131
   320
  </target>
asier@43
   321
juanpablo@131
   322
  <target name="import.database.sampledata" depends="init">
juanpablo@131
   323
    <ant dir="${base.source}/database" target="import.database.sampledata" inheritAll="true" inheritRefs="true"/>
juanpablo@131
   324
  </target>
juanpablo@131
   325
juanpablo@131
   326
  <target name="save.database.model" depends="init">
juanpablo@131
   327
    <ant dir="${base.source}/database" target="save.database.model" inheritAll="true" inheritRefs="true"/>
juanpablo@131
   328
  </target>
adrian@171
   329
adrian@171
   330
  <target name="compare.database.structure" depends="init">
adrian@171
   331
    <ant dir="${base.source}/database" target="compare.database.structure" inheritAll="true" inheritRefs="true"/>
adrian@171
   332
  </target>
adrian@171
   333
asier@43
   334
</project>