build.xml
author Juan Pablo Aroztegi <juanpablo.aroztegi@openbravo.com>
Fri, 08 Aug 2008 10:05:21 +0000
changeset 1548 8302641b3f39
parent 1546 8f0d693c6d1a
child 1711 72577fd0c13c
permissions -rw-r--r--
Reindent build.xml
asier@43
     1
<?xml version="1.0" encoding="UTF-8" ?>
asier@43
     2
<!--
juanpablo@1548
     3
*************************************************************************
juanpablo@1548
     4
* The contents of this file are subject to the Openbravo  Public  License
juanpablo@1548
     5
* Version  1.0  (the  "License"),  being   the  Mozilla   Public  License
juanpablo@1548
     6
* Version 1.1  with a permitted attribution clause; you may not  use this
juanpablo@1548
     7
* file except in compliance with the License. You  may  obtain  a copy of
juanpablo@1548
     8
* the License at http://www.openbravo.com/legal/license.html
juanpablo@1548
     9
* Software distributed under the License  is  distributed  on  an "AS IS"
juanpablo@1548
    10
* basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
juanpablo@1548
    11
* License for the specific  language  governing  rights  and  limitations
juanpablo@1548
    12
* under the License.
juanpablo@1548
    13
* The Original Code is Openbravo ERP.
juanpablo@1548
    14
* The Initial Developer of the Original Code is Openbravo SL
juanpablo@1548
    15
* All portions are Copyright (C) 2001-2008 Openbravo SL
juanpablo@1548
    16
* All Rights Reserved.
juanpablo@1548
    17
* Contributor(s):  ______________________________________.
juanpablo@1548
    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@537
    71
  <property name="base.config" location="config"/>
juanpablo@537
    72
  <property file="${base.config}/Openbravo.properties"/>
juanpablo@131
    73
juanpablo@536
    74
  <property name="base.src" location="src"/>
juanpablo@536
    75
  <property name="base.src.core" location="src-core"/>
juanpablo@536
    76
  <property name="base.src.db" location="src-db"/>
juanpablo@536
    77
  <property name="base.src.trl" location="src-trl"/>
juanpablo@536
    78
  <property name="base.src.wad" location="src-wad"/>
juanpablo@536
    79
  <property name="base.client.src" location="srcClient"/>
antonio@757
    80
  <property name="base.db" location="src-db/database"/>
juanpablo@536
    81
  <property name="base.web" location="web"/>
juanpablo@536
    82
  <property name="base.context" location="WebContent"/>
juanpablo@536
    83
  <property name="base.design" location="${base.context}/src-loc"/>
juanpablo@536
    84
  <property name="base.lib" location="lib"/>
juanpablo@536
    85
  <property name="build" location="build/classes"/>
juanpablo@536
    86
  <property name="build.AD" location="srcAD"/>
juanpablo@536
    87
  <property name="build.sqlc" location="build/javasqlc"/>
juanpablo@536
    88
  <property name="build.core.lib" location="src-core/lib"/>
juanpablo@536
    89
  <property name="build.trl.lib" location="src-trl/lib"/>
juanpablo@536
    90
  <property name="build.wad.lib" location="src-wad/lib"/>
juanpablo@536
    91
  <property name="build.docs" location="docs/api"/>
juanpablo@536
    92
  <property name="jakarta.home" location="${env.CATALINA_HOME}"/>
asier@43
    93
  <condition property="jakarta.base" value="${env.CATALINA_BASE}" else="${jakarta.home}">
asier@43
    94
    <and>
asier@43
    95
      <isset property="env.CATALINA_BASE"/>
asier@43
    96
    </and>
asier@43
    97
  </condition>
juanpablo@536
    98
  <property name="log.path" location="${jakarta.base}/logs"/>
juanpablo@536
    99
  <property name="lib" location="${jakarta.home}/common"/>
juanpablo@536
   100
  <property name="jakarta.context" location="${jakarta.base}/webapps/${context.name}"/>
asier@43
   101
  <property name="build.maxmemory" value="512M"/>
asier@43
   102
  <property name="debug.level" value="false"/>
asier@43
   103
stefan@124
   104
  <condition property="no.java.home" value="true">
stefan@124
   105
    <not>
stefan@125
   106
      <isset property="env.JAVA_HOME"/>
stefan@124
   107
    </not>
stefan@124
   108
  </condition>
stefan@124
   109
asier@43
   110
  <path id="project.class.path">
asier@43
   111
    <pathelement path="${build}"/>
asier@43
   112
    <fileset dir="${base.lib}">
asier@43
   113
      <include name="**/*.jar"/>
asier@43
   114
    </fileset>
asier@43
   115
    <fileset dir="${build.core.lib}">
asier@43
   116
      <include name="openbravo-core.jar"/>
asier@43
   117
    </fileset>
asier@43
   118
    <fileset dir="${build.trl.lib}">
asier@43
   119
      <include name="openbravo-trl.jar"/>
asier@43
   120
    </fileset>
asier@43
   121
    <fileset dir="${build.wad.lib}">
asier@43
   122
      <include name="openbravo-wad.jar"/>
asier@43
   123
    </fileset>
asier@43
   124
  </path>
juanpablo@1548
   125
stefan@124
   126
  <target name="init">
stefan@124
   127
    <fail if="no.java.home" message="The environment variable JAVA_HOME is not set."/>
stefan@124
   128
  </target>
stefan@124
   129
juanpablo@1548
   130
  <target name="code.rev">
juanpablo@1548
   131
    <loadfile property="svn.entries" srcFile=".svn/entries" failonerror="false">
juanpablo@1548
   132
      <filterchain>
juanpablo@1548
   133
        <filterreader classname="org.apache.tools.ant.filters.HeadFilter">
juanpablo@1548
   134
          <param name="skip" value="3"/>
juanpablo@1548
   135
          <param name="lines" value="1"/>
juanpablo@1548
   136
        </filterreader>
juanpablo@1548
   137
      </filterchain>
juanpablo@1548
   138
      <filterchain>
juanpablo@1548
   139
        <filterreader classname="org.apache.tools.ant.filters.StripLineBreaks" />
juanpablo@1548
   140
      </filterchain>
juanpablo@1548
   141
    </loadfile>
juanpablo@1548
   142
    <condition property="code.revision" value="${svn.entries}" else ="0">
juanpablo@1548
   143
      <and>
juanpablo@1548
   144
        <isset property="svn.entries" />
juanpablo@1548
   145
      </and>
juanpablo@1548
   146
    </condition>
juanpablo@1548
   147
  </target>
ivan@812
   148
stefan@124
   149
  <target name="compile.complete" depends="init">
juanpablo@536
   150
    <ant dir="${base.src}" target="compile.complete" inheritAll="true" inheritRefs="true"/>
asier@43
   151
  </target>
asier@43
   152
stefan@124
   153
  <target name="compile" depends="init">
juanpablo@536
   154
    <ant dir="${base.src}" target="compile" inheritAll="true" inheritRefs="true"/>
asier@43
   155
  </target>
asier@43
   156
stefan@124
   157
  <target name="compile.complete.development" depends="init">
juanpablo@536
   158
    <ant dir="${base.src}" target="compile.complete.development" inheritAll="true" inheritRefs="true"/>
asier@43
   159
  </target>
asier@43
   160
stefan@124
   161
  <target name="compile.development" depends="init">
juanpablo@536
   162
    <ant dir="${base.src}" target="compile.development" inheritAll="true" inheritRefs="true"/>
asier@43
   163
  </target>
asier@43
   164
stefan@124
   165
  <target name="eclipse.compile" depends="init">
juanpablo@536
   166
    <ant dir="${base.src.core}" target="build.jar" inheritAll="true" inheritRefs="true"/>
juanpablo@536
   167
    <ant dir="${base.src.trl}" target="build.jar" inheritAll="true" inheritRefs="true"/>
juanpablo@536
   168
    <ant dir="${base.src.wad}" target="build.jar" inheritAll="true" inheritRefs="true"/>
juanpablo@536
   169
    <ant dir="${base.src}" target="eclipse.compile" inheritAll="true" inheritRefs="true"/>
juanpablo@1548
   170
    <eclipse.refreshLocal resource="openbravo" depth="infinite"/>
juanpablo@1548
   171
    <eclipse.incrementalBuild project="openbravo" kind="incremental"/>
asier@43
   172
  </target>
asier@43
   173
stefan@124
   174
  <target name="eclipse.compile.complete" depends="init">
juanpablo@536
   175
    <ant dir="${base.src.core}" target="build.jar" inheritAll="true" inheritRefs="true"/>
juanpablo@536
   176
    <ant dir="${base.src.trl}" target="build.jar" inheritAll="true" inheritRefs="true"/>
juanpablo@536
   177
    <ant dir="${base.src.wad}" target="build.jar" inheritAll="true" inheritRefs="true"/>
juanpablo@536
   178
    <ant dir="${base.src}" target="eclipse.compile.complete" inheritAll="true" inheritRefs="true"/>
juanpablo@1548
   179
    <eclipse.refreshLocal resource="openbravo" depth="infinite"/>
juanpablo@1548
   180
    <eclipse.incrementalBuild project="openbravo" kind="full"/>
asier@43
   181
  </target>
asier@43
   182
stefan@124
   183
  <target name="compile.src" depends="init">
juanpablo@536
   184
    <ant dir="${base.src}" target="compile.src" inheritAll="true" inheritRefs="true"/>
asier@43
   185
  </target>
asier@43
   186
stefan@124
   187
  <target name="war" depends="init">
juanpablo@536
   188
    <ant dir="${base.src}" target="build.war" inheritAll="true" inheritRefs="true"/>
asier@43
   189
  </target>
asier@43
   190
stefan@124
   191
  <target name="core.docs" depends="init">
juanpablo@536
   192
    <ant dir="${base.src.core}" target="doc" inheritAll="true" inheritRefs="true"/>
asier@43
   193
  </target>
juanpablo@131
   194
stefan@124
   195
  <target name="core.lib" depends="init">
juanpablo@536
   196
    <ant dir="${base.src.core}" target="build" inheritAll="true" inheritRefs="true"/>
juanpablo@536
   197
    <copy file="${base.src.core}/lib/openbravo-core.jar" todir="${base.lib}" overwrite="true" failonerror="false"/>
asier@43
   198
  </target>
juanpablo@131
   199
stefan@124
   200
  <target name="eclipse.wad.lib" depends="init">
juanpablo@536
   201
    <ant dir="${base.src.wad}" target="sqlc" inheritAll="true" inheritRefs="true"/>
juanpablo@1548
   202
    <eclipse.refreshLocal resource="OpenbravoWAD" depth="infinite"/>
juanpablo@1548
   203
    <eclipse.incrementalBuild project="OpenbravoWAD" kind="full"/>
asier@43
   204
  </target>
juanpablo@131
   205
stefan@124
   206
  <target name="wad.docs" depends="init">
juanpablo@536
   207
    <ant dir="${base.src.wad}" target="doc" inheritAll="true" inheritRefs="true"/>
asier@43
   208
  </target>
juanpablo@131
   209
stefan@124
   210
  <target name="wad.lib" depends="init">
juanpablo@536
   211
    <ant dir="${base.src.wad}" target="build" inheritAll="true" inheritRefs="true"/>
asier@43
   212
  </target>
juanpablo@131
   213
stefan@124
   214
  <target name="eclipse.trl.lib" depends="init">
juanpablo@536
   215
    <ant dir="${base.src.trl}" target="sqlc" inheritAll="true" inheritRefs="true"/>
juanpablo@1548
   216
    <eclipse.refreshLocal resource="OpenbravoTrl" depth="infinite"/>
juanpablo@1548
   217
    <eclipse.incrementalBuild project="OpenbravoTrl" kind="full"/>
asier@43
   218
  </target>
juanpablo@131
   219
stefan@124
   220
  <target name="trl.docs" depends="init">
juanpablo@536
   221
    <ant dir="${base.src.trl}" target="doc" inheritAll="true" inheritRefs="true"/>
asier@43
   222
  </target>
juanpablo@131
   223
stefan@124
   224
  <target name="trl.lib" depends="init">
juanpablo@536
   225
    <ant dir="${base.src.trl}" target="build" inheritAll="true" inheritRefs="true"/>
asier@43
   226
  </target>
juanpablo@131
   227
stefan@124
   228
  <target name="database.lib" depends="init">
juanpablo@536
   229
    <ant dir="${base.src.db}" target="jar" inheritAll="true" inheritRefs="true"/>
juanpablo@536
   230
    <copy file="${base.src.db}/build/lib/dbmanager.jar" todir="${base.db}/lib" overwrite="true" failonerror="false"/>
asier@43
   231
  </target>
asier@43
   232
juanpablo@179
   233
  <target name="clean" depends="init">
juanpablo@536
   234
    <ant dir="${base.src}" target="clean" inheritAll="true" inheritRefs="true"/>
juanpablo@179
   235
  </target>
juanpablo@179
   236
juanpablo@179
   237
  <target name="trl.clean" depends="init">
juanpablo@536
   238
    <ant dir="${base.src}" target="trl.clean" inheritAll="true" inheritRefs="true"/>
juanpablo@179
   239
  </target>
juanpablo@179
   240
juanpablo@179
   241
  <target name="translate" depends="init">
juanpablo@536
   242
    <ant dir="${base.src}" target="translate" inheritAll="true" inheritRefs="true"/>
juanpablo@179
   243
  </target>
juanpablo@179
   244
stefan@124
   245
  <target name="installWebService" depends="init">
juanpablo@536
   246
    <ant dir="${base.src}" target="installWebService" inheritAll="true" inheritRefs="true">
asier@43
   247
      <property name="wsdd" value="1"/>
asier@43
   248
    </ant>
asier@43
   249
  </target>
asier@43
   250
stefan@124
   251
  <target name="uninstallWebService" depends="init">
juanpablo@536
   252
    <ant dir="${base.src}" target="uninstallWebService" inheritAll="true" inheritRefs="true"/>
asier@43
   253
  </target>
asier@43
   254
stefan@124
   255
  <target name="deploy" depends="init">
asier@43
   256
    <copy file="${base.lib}/${context.name}.war" todir="${jakarta.base}/webapps"/>
asier@43
   257
  </target>
asier@43
   258
antonio@1062
   259
  <target name="install.source" depends="init,code.rev">
asier@43
   260
    <antcall target="database.lib"/>
juanpablo@536
   261
    <ant dir="${base.db}" target="create.database" inheritAll="true" inheritRefs="true"/>
asier@43
   262
    <antcall target="core.lib"/>
asier@43
   263
    <antcall target="wad.lib"/>
asier@43
   264
    <antcall target="trl.lib"/>
asier@43
   265
    <antcall target="compile.complete"/>
asier@43
   266
    <antcall target="war"/>
asier@43
   267
  </target>
juanpablo@131
   268
antonio@1062
   269
  <target name="eclipse.install.source" depends="init,code.rev">
juanpablo@131
   270
    <antcall target="database.lib"/>
juanpablo@536
   271
    <ant dir="${base.db}" target="create.database" inheritAll="true" inheritRefs="true"/>
juanpablo@1548
   272
    <eclipse.incrementalBuild project="OpenbravoCore" kind="full"/>
rafael@1546
   273
    <antcall target="eclipse.wad.lib"/>
rafael@1546
   274
    <antcall target="eclipse.trl.lib"/>
rafael@1546
   275
    <antcall target="eclipse.compile.complete"/>
asier@43
   276
  </target>
asier@43
   277
ivan@812
   278
  <target name="create.database" depends="init,code.rev">
juanpablo@131
   279
    <antcall target="database.lib"/>
juanpablo@536
   280
    <ant dir="${base.db}" target="create.database" inheritAll="true" inheritRefs="true"/>
juanpablo@131
   281
  </target>
asier@43
   282
antonio@1335
   283
  <target name="create.original.database" depends="init,code.rev">
antonio@1335
   284
    <antcall target="database.lib"/>
antonio@1335
   285
    <ant dir="${base.db}" target="create.original.database" inheritAll="true" inheritRefs="true"/>
antonio@1335
   286
  </target>
antonio@1335
   287
antonio@905
   288
  <target name="update.database" depends="init,code.rev">
antonio@1208
   289
    <antcall target="database.lib"/>
juanpablo@536
   290
    <ant dir="${base.db}" target="update.database" inheritAll="true" inheritRefs="true"/>
juanpablo@131
   291
  </target>
asier@43
   292
antonio@1335
   293
  <target name="update.customized.database" depends="init,code.rev">
antonio@1335
   294
    <antcall target="database.lib"/>
antonio@1335
   295
    <ant dir="${base.db}" target="update.customized.database" inheritAll="true" inheritRefs="true"/>
antonio@1335
   296
  </target>
antonio@1335
   297
juanpablo@131
   298
  <target name="create.database.structure" depends="init">
juanpablo@536
   299
    <ant dir="${base.db}" target="create.database.structure" inheritAll="true" inheritRefs="true"/>
juanpablo@131
   300
  </target>
asier@43
   301
juanpablo@131
   302
  <target name="update.database.structure" depends="init">
juanpablo@536
   303
    <ant dir="${base.db}" target="update.database.structure" inheritAll="true" inheritRefs="true"/>
juanpablo@131
   304
  </target>
asier@43
   305
juanpablo@131
   306
  <target name="create.database.script" depends="init">
juanpablo@536
   307
    <ant dir="${base.db}" target="create.database.script" inheritAll="true" inheritRefs="true"/>
juanpablo@131
   308
  </target>
asier@43
   309
juanpablo@131
   310
  <target name="update.database.script" depends="init">
juanpablo@536
   311
    <ant dir="${base.db}" target="update.database.script" inheritAll="true" inheritRefs="true"/>
juanpablo@131
   312
  </target>
adrian@97
   313
antonio@903
   314
  <target name="export.database" depends="init,code.rev">
antonio@1208
   315
    <antcall target="database.lib"/>
juanpablo@536
   316
    <ant dir="${base.db}" target="export.database.structure" inheritAll="true" inheritRefs="true"/>
juanpablo@536
   317
    <ant dir="${base.db}" target="export.database.data" inheritAll="true" inheritRefs="true"/>
adrian@164
   318
  </target>
adrian@164
   319
antonio@903
   320
  <target name="export.database.structure" depends="init,code.rev">
juanpablo@536
   321
    <ant dir="${base.db}" target="export.database.structure" inheritAll="true" inheritRefs="true"/>
juanpablo@131
   322
  </target>
asier@43
   323
antonio@903
   324
  <target name="export.database.data" depends="init,code.rev">
juanpablo@536
   325
    <ant dir="${base.db}" target="export.database.data" inheritAll="true" inheritRefs="true"/>
juanpablo@131
   326
  </target>
asier@43
   327
antonio@879
   328
  <target name="import.database.data" depends="init,code.rev">
juanpablo@536
   329
    <ant dir="${base.db}" target="import.database.data" inheritAll="true" inheritRefs="true"/>
juanpablo@131
   330
  </target>
asier@43
   331
antonio@903
   332
  <target name="export.database.sampledata" depends="init,code.rev">
juanpablo@536
   333
    <ant dir="${base.db}" target="export.database.sampledata" inheritAll="true" inheritRefs="true"/>
juanpablo@131
   334
  </target>
asier@43
   335
antonio@879
   336
  <target name="import.database.sampledata" depends="init,code.rev">
juanpablo@536
   337
    <ant dir="${base.db}" target="import.database.sampledata" inheritAll="true" inheritRefs="true"/>
juanpablo@131
   338
  </target>
juanpablo@131
   339
antonio@903
   340
  <target name="export.database.masterdata" depends="init,code.rev">
juanpablo@536
   341
    <ant dir="${base.db}" target="export.database.masterdata" inheritAll="true" inheritRefs="true"/>
antonio@451
   342
  </target>
antonio@451
   343
antonio@879
   344
  <target name="import.database.masterdata" depends="init,code.rev">
juanpablo@536
   345
    <ant dir="${base.db}" target="import.database.masterdata" inheritAll="true" inheritRefs="true"/>
antonio@451
   346
  </target>
antonio@451
   347
juanpablo@131
   348
  <target name="save.database.model" depends="init">
juanpablo@536
   349
    <ant dir="${base.db}" target="save.database.model" inheritAll="true" inheritRefs="true"/>
juanpablo@131
   350
  </target>
adrian@171
   351
adrian@171
   352
  <target name="compare.database.structure" depends="init">
juanpablo@536
   353
    <ant dir="${base.db}" target="compare.database.structure" inheritAll="true" inheritRefs="true"/>
adrian@171
   354
  </target>
adrian@171
   355
antonio@1335
   356
  <target name="compare.database.data" depends="init">
antonio@1335
   357
    <ant dir="${base.db}" target="compare.database.data" inheritAll="true" inheritRefs="true"/>
antonio@1335
   358
  </target>
asier@43
   359
</project>