build.xml
author Antonio Moreno <antonio.moreno@openbravo.com>
Wed, 23 Apr 2008 17:56:53 +0000
changeset 757 5b2ff4ffd778
parent 540 255f49772eb2
child 812 cdac95bc56e3
permissions -rw-r--r--
New build.xml file
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@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>
asier@43
   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
stefan@124
   130
  <target name="compile.complete" depends="init">
juanpablo@536
   131
    <ant dir="${base.src}" target="compile.complete" inheritAll="true" inheritRefs="true"/>
asier@43
   132
  </target>
asier@43
   133
stefan@124
   134
  <target name="compile" depends="init">
juanpablo@536
   135
    <ant dir="${base.src}" target="compile" inheritAll="true" inheritRefs="true"/>
asier@43
   136
  </target>
asier@43
   137
stefan@124
   138
  <target name="compile.complete.development" depends="init">
juanpablo@536
   139
    <ant dir="${base.src}" target="compile.complete.development" inheritAll="true" inheritRefs="true"/>
asier@43
   140
  </target>
asier@43
   141
stefan@124
   142
  <target name="compile.development" depends="init">
juanpablo@536
   143
    <ant dir="${base.src}" target="compile.development" inheritAll="true" inheritRefs="true"/>
asier@43
   144
  </target>
asier@43
   145
stefan@124
   146
  <target name="eclipse.compile" depends="init">
juanpablo@536
   147
    <ant dir="${base.src.core}" target="build.jar" inheritAll="true" inheritRefs="true"/>
juanpablo@536
   148
    <ant dir="${base.src.trl}" target="build.jar" inheritAll="true" inheritRefs="true"/>
juanpablo@536
   149
    <ant dir="${base.src.wad}" target="build.jar" inheritAll="true" inheritRefs="true"/>
juanpablo@536
   150
    <ant dir="${base.src}" target="eclipse.compile" inheritAll="true" inheritRefs="true"/>
asier@43
   151
  </target>
asier@43
   152
stefan@124
   153
  <target name="eclipse.compile.complete" depends="init">
juanpablo@536
   154
    <ant dir="${base.src.core}" target="build.jar" inheritAll="true" inheritRefs="true"/>
juanpablo@536
   155
    <ant dir="${base.src.trl}" target="build.jar" inheritAll="true" inheritRefs="true"/>
juanpablo@536
   156
    <ant dir="${base.src.wad}" target="build.jar" inheritAll="true" inheritRefs="true"/>
juanpablo@536
   157
    <ant dir="${base.src}" target="eclipse.compile.complete" inheritAll="true" inheritRefs="true"/>
asier@43
   158
  </target>
asier@43
   159
stefan@124
   160
  <target name="compile.src" depends="init">
juanpablo@536
   161
    <ant dir="${base.src}" target="compile.src" inheritAll="true" inheritRefs="true"/>
asier@43
   162
  </target>
asier@43
   163
stefan@124
   164
  <target name="war" depends="init">
juanpablo@536
   165
    <ant dir="${base.src}" target="build.war" inheritAll="true" inheritRefs="true"/>
asier@43
   166
  </target>
asier@43
   167
stefan@124
   168
  <target name="core.docs" depends="init">
juanpablo@536
   169
    <ant dir="${base.src.core}" target="doc" inheritAll="true" inheritRefs="true"/>
asier@43
   170
  </target>
juanpablo@131
   171
stefan@124
   172
  <target name="core.lib" depends="init">
juanpablo@536
   173
    <ant dir="${base.src.core}" target="build" inheritAll="true" inheritRefs="true"/>
juanpablo@536
   174
    <copy file="${base.src.core}/lib/openbravo-core.jar" todir="${base.lib}" overwrite="true" failonerror="false"/>
asier@43
   175
  </target>
juanpablo@131
   176
stefan@124
   177
  <target name="eclipse.wad.lib" depends="init">
juanpablo@536
   178
    <ant dir="${base.src.wad}" target="sqlc" inheritAll="true" inheritRefs="true"/>
asier@43
   179
  </target>
juanpablo@131
   180
stefan@124
   181
  <target name="wad.docs" depends="init">
juanpablo@536
   182
    <ant dir="${base.src.wad}" target="doc" inheritAll="true" inheritRefs="true"/>
asier@43
   183
  </target>
juanpablo@131
   184
stefan@124
   185
  <target name="wad.lib" depends="init">
juanpablo@536
   186
    <ant dir="${base.src.wad}" target="build" inheritAll="true" inheritRefs="true"/>
asier@43
   187
  </target>
juanpablo@131
   188
stefan@124
   189
  <target name="eclipse.trl.lib" depends="init">
juanpablo@536
   190
    <ant dir="${base.src.trl}" target="sqlc" inheritAll="true" inheritRefs="true"/>
asier@43
   191
  </target>
juanpablo@131
   192
stefan@124
   193
  <target name="trl.docs" depends="init">
juanpablo@536
   194
    <ant dir="${base.src.trl}" target="doc" inheritAll="true" inheritRefs="true"/>
asier@43
   195
  </target>
juanpablo@131
   196
stefan@124
   197
  <target name="trl.lib" depends="init">
juanpablo@536
   198
    <ant dir="${base.src.trl}" target="build" inheritAll="true" inheritRefs="true"/>
asier@43
   199
  </target>
juanpablo@131
   200
stefan@124
   201
  <target name="database.lib" depends="init">
juanpablo@536
   202
    <ant dir="${base.src.db}" target="jar" inheritAll="true" inheritRefs="true"/>
juanpablo@536
   203
    <copy file="${base.src.db}/build/lib/dbmanager.jar" todir="${base.db}/lib" overwrite="true" failonerror="false"/>
asier@43
   204
  </target>
asier@43
   205
juanpablo@179
   206
  <target name="clean" depends="init">
juanpablo@536
   207
    <ant dir="${base.src}" target="clean" inheritAll="true" inheritRefs="true"/>
juanpablo@179
   208
  </target>
juanpablo@179
   209
juanpablo@179
   210
  <target name="trl.clean" depends="init">
juanpablo@536
   211
    <ant dir="${base.src}" target="trl.clean" inheritAll="true" inheritRefs="true"/>
juanpablo@179
   212
  </target>
juanpablo@179
   213
juanpablo@179
   214
  <target name="translate" depends="init">
juanpablo@536
   215
    <ant dir="${base.src}" target="translate" inheritAll="true" inheritRefs="true"/>
juanpablo@179
   216
  </target>
juanpablo@179
   217
stefan@124
   218
  <target name="installWebService" depends="init">
juanpablo@536
   219
    <ant dir="${base.src}" target="installWebService" inheritAll="true" inheritRefs="true">
asier@43
   220
      <property name="wsdd" value="1"/>
asier@43
   221
    </ant>
asier@43
   222
  </target>
asier@43
   223
stefan@124
   224
  <target name="uninstallWebService" depends="init">
juanpablo@536
   225
    <ant dir="${base.src}" target="uninstallWebService" inheritAll="true" inheritRefs="true"/>
asier@43
   226
  </target>
asier@43
   227
stefan@124
   228
  <target name="deploy" depends="init">
asier@43
   229
    <copy file="${base.lib}/${context.name}.war" todir="${jakarta.base}/webapps"/>
asier@43
   230
  </target>
asier@43
   231
stefan@124
   232
  <target name="install.source" depends="init">
asier@43
   233
    <antcall target="database.lib"/>
juanpablo@536
   234
    <ant dir="${base.db}" target="create.database" inheritAll="true" inheritRefs="true"/>
asier@43
   235
    <antcall target="core.lib"/>
asier@43
   236
    <antcall target="wad.lib"/>
asier@43
   237
    <antcall target="trl.lib"/>
asier@43
   238
    <antcall target="compile.complete"/>
asier@43
   239
    <antcall target="war"/>
asier@43
   240
  </target>
juanpablo@131
   241
stefan@124
   242
  <target name="eclipse.install.source" depends="init">
juanpablo@131
   243
    <antcall target="database.lib"/>
juanpablo@536
   244
    <ant dir="${base.db}" target="create.database" inheritAll="true" inheritRefs="true"/>
asier@43
   245
    <antcall target="core.lib"/>
asier@43
   246
    <antcall target="wad.lib"/>
asier@43
   247
    <antcall target="trl.lib"/>
asier@43
   248
    <antcall target="compile.complete"/>
asier@43
   249
  </target>
asier@43
   250
juanpablo@131
   251
  <target name="create.database" depends="init">
juanpablo@131
   252
    <antcall target="database.lib"/>
juanpablo@536
   253
    <ant dir="${base.db}" target="create.database" inheritAll="true" inheritRefs="true"/>
juanpablo@131
   254
  </target>
asier@43
   255
juanpablo@131
   256
  <target name="update.database" depends="init">
juanpablo@536
   257
    <ant dir="${base.db}" target="update.database" inheritAll="true" inheritRefs="true"/>
juanpablo@131
   258
  </target>
asier@43
   259
juanpablo@131
   260
  <target name="create.database.structure" depends="init">
juanpablo@536
   261
    <ant dir="${base.db}" target="create.database.structure" inheritAll="true" inheritRefs="true"/>
juanpablo@131
   262
  </target>
asier@43
   263
juanpablo@131
   264
  <target name="update.database.structure" depends="init">
juanpablo@536
   265
    <ant dir="${base.db}" target="update.database.structure" inheritAll="true" inheritRefs="true"/>
juanpablo@131
   266
  </target>
asier@43
   267
juanpablo@131
   268
  <target name="create.database.script" depends="init">
juanpablo@536
   269
    <ant dir="${base.db}" target="create.database.script" inheritAll="true" inheritRefs="true"/>
juanpablo@131
   270
  </target>
asier@43
   271
juanpablo@131
   272
  <target name="update.database.script" depends="init">
juanpablo@536
   273
    <ant dir="${base.db}" target="update.database.script" inheritAll="true" inheritRefs="true"/>
juanpablo@131
   274
  </target>
adrian@97
   275
adrian@164
   276
  <target name="export.database" depends="init">
juanpablo@536
   277
    <ant dir="${base.db}" target="export.database.structure" inheritAll="true" inheritRefs="true"/>
juanpablo@536
   278
    <ant dir="${base.db}" target="export.database.data" inheritAll="true" inheritRefs="true"/>
adrian@164
   279
  </target>
adrian@164
   280
juanpablo@131
   281
  <target name="export.database.structure" depends="init">
juanpablo@536
   282
    <ant dir="${base.db}" target="export.database.structure" inheritAll="true" inheritRefs="true"/>
juanpablo@131
   283
  </target>
asier@43
   284
juanpablo@131
   285
  <target name="export.database.data" depends="init">
juanpablo@536
   286
    <ant dir="${base.db}" target="export.database.data" inheritAll="true" inheritRefs="true"/>
juanpablo@131
   287
  </target>
asier@43
   288
juanpablo@131
   289
  <target name="import.database.data" depends="init">
juanpablo@536
   290
    <ant dir="${base.db}" target="import.database.data" inheritAll="true" inheritRefs="true"/>
juanpablo@131
   291
  </target>
asier@43
   292
juanpablo@131
   293
  <target name="export.database.sampledata" depends="init">
juanpablo@536
   294
    <ant dir="${base.db}" target="export.database.sampledata" inheritAll="true" inheritRefs="true"/>
juanpablo@131
   295
  </target>
asier@43
   296
juanpablo@131
   297
  <target name="import.database.sampledata" depends="init">
juanpablo@536
   298
    <ant dir="${base.db}" target="import.database.sampledata" inheritAll="true" inheritRefs="true"/>
juanpablo@131
   299
  </target>
juanpablo@131
   300
antonio@451
   301
  <target name="export.database.masterdata" depends="init">
juanpablo@536
   302
    <ant dir="${base.db}" target="export.database.masterdata" inheritAll="true" inheritRefs="true"/>
antonio@451
   303
  </target>
antonio@451
   304
antonio@451
   305
  <target name="import.database.masterdata" depends="init">
juanpablo@536
   306
    <ant dir="${base.db}" target="import.database.masterdata" inheritAll="true" inheritRefs="true"/>
antonio@451
   307
  </target>
antonio@451
   308
juanpablo@131
   309
  <target name="save.database.model" depends="init">
juanpablo@536
   310
    <ant dir="${base.db}" target="save.database.model" inheritAll="true" inheritRefs="true"/>
juanpablo@131
   311
  </target>
adrian@171
   312
adrian@171
   313
  <target name="compare.database.structure" depends="init">
juanpablo@536
   314
    <ant dir="${base.db}" target="compare.database.structure" inheritAll="true" inheritRefs="true"/>
adrian@171
   315
  </target>
adrian@171
   316
asier@43
   317
</project>