build.xml
author Asier Lostalé <asier.lostale@openbravo.com>
Fri, 21 Nov 2008 08:33:40 +0000
changeset 2056 52856de9b823
parent 2055 20890e6305f7
child 2057 12a14c230fce
permissions -rw-r--r--
don't set code.rev in case it is already set
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.
asier@1929
    28
compile.web: refer to compile.web: target of src.
asier@1929
    29
compile.web.development: refer to compile.web.development: target of src.
juanpablo@213
    30
eclipse.compile: refer to eclipse.compile target of src.
juanpablo@213
    31
eclipse.compile.complete: refer to eclipse.compile.complete target of src.
juanpablo@213
    32
compile.src: refer to compile.src target of src.
juanpablo@213
    33
war: refer to build.war target of src.
juanpablo@213
    34
core.docs: refer to doc target of src-core.
juanpablo@213
    35
core.lib: refer to build target of src-core.
juanpablo@213
    36
eclipse.wad.lib: refer to sqlc target of src-wad.
juanpablo@213
    37
wad.docs: refer to doc target of src-wad.
juanpablo@213
    38
wad.lib: refer to build target of src-wad.
juanpablo@213
    39
eclipse.trl.lib: refer to sqlc target of src-trl.
juanpablo@213
    40
trl.docs: refer to doc target of src-trl.
juanpablo@213
    41
trl.lib: refer to build target of src-trl.
juanpablo@213
    42
database.lib: refer to jar target of src-db.
juanpablo@213
    43
clean: refer to clean target of src.
juanpablo@213
    44
trl.clean: refer to trl.clean target of src.
juanpablo@213
    45
translate: refer to translate target of src.
juanpablo@213
    46
installWebService: refer to installWebService target of src.
juanpablo@213
    47
uninstallWebService: refer to uninstallWebService target of src.
juanpablo@213
    48
preinstall: deprecated.
juanpablo@213
    49
preinstall.complete: deprecated.
juanpablo@213
    50
install: deprecated.
juanpablo@213
    51
deploy: copy war to the jakarta context.
juanpablo@213
    52
install.source: install the ERP from sources (from subversion).
juanpablo@213
    53
eclipse.install.source: install the ERP from sources for eclipse (from subversion).
juanpablo@213
    54
create.database: refer to create.database target of database.
juanpablo@213
    55
update.database: refer to update.database target of database.
juanpablo@213
    56
create.database.structure: refer to create.database.structure target of database.
juanpablo@213
    57
update.database.structure: refer to update.database.structure target of database.
juanpablo@213
    58
create.database.script: refer to create.database.script target of database.
juanpablo@213
    59
update.database.script: refer to update.database.script target of database.
juanpablo@213
    60
export.database: exports database structure and data to xml files.
juanpablo@213
    61
export.database.structure: refer to export.database.structure target of database.
juanpablo@213
    62
export.database.data: refer to export.database.data target of database.
juanpablo@213
    63
import.database.data: refer to import.database.data target of database.
juanpablo@213
    64
export.database.sampledata: refer to export.database.sampledata target of database.
juanpablo@213
    65
import.database.sampledata: refer to import.database.sampledata target of database.
antonio@451
    66
export.database.masterdata: refer to export.database.masterdata target of database.
antonio@451
    67
import.database.masterdata: refer to import.database.masterdata target of database.
juanpablo@213
    68
save.database.model: refer to save.database.model target of database.
juanpablo@213
    69
compare.database.structure: refer to compare.database.structure target of database.
fernando@202
    70
-->
asier@43
    71
<project name="openbravo" default="compile.complete" basedir=".">
juanpablo@131
    72
  <property environment="env"/>
juanpablo@537
    73
  <property name="base.config" location="config"/>
juanpablo@537
    74
  <property file="${base.config}/Openbravo.properties"/>
juanpablo@131
    75
juanpablo@536
    76
  <property name="base.src" location="src"/>
juanpablo@536
    77
  <property name="base.src.core" location="src-core"/>
juanpablo@536
    78
  <property name="base.src.db" location="src-db"/>
juanpablo@536
    79
  <property name="base.src.trl" location="src-trl"/>
juanpablo@536
    80
  <property name="base.src.wad" location="src-wad"/>
ivan@1738
    81
  <property name="base.src.gen" location="src-gen"/>
juanpablo@536
    82
  <property name="base.client.src" location="srcClient"/>
antonio@757
    83
  <property name="base.db" location="src-db/database"/>
juanpablo@536
    84
  <property name="base.web" location="web"/>
juanpablo@536
    85
  <property name="base.context" location="WebContent"/>
juanpablo@536
    86
  <property name="base.design" location="${base.context}/src-loc"/>
juanpablo@536
    87
  <property name="base.lib" location="lib"/>
asier@1929
    88
  <property name="base.modules" location="modules"/>
juanpablo@536
    89
  <property name="build" location="build/classes"/>
juanpablo@536
    90
  <property name="build.AD" location="srcAD"/>
juanpablo@536
    91
  <property name="build.sqlc" location="build/javasqlc"/>
juanpablo@536
    92
  <property name="build.core.lib" location="src-core/lib"/>
juanpablo@536
    93
  <property name="build.trl.lib" location="src-trl/lib"/>
juanpablo@536
    94
  <property name="build.wad.lib" location="src-wad/lib"/>
juanpablo@536
    95
  <property name="build.docs" location="docs/api"/>
juanpablo@536
    96
  <property name="jakarta.home" location="${env.CATALINA_HOME}"/>
asier@1929
    97
  <property name="module" value="%"/>
asier@1929
    98
	<property name="apply.on.create" value="no"/>
asier@1929
    99
	<property name="obx.export.RD" value="false"/>
asier@1929
   100
	<property name="obx.export.DB" value="false"/>
asier@1929
   101
	<property name="obx.export.CS" value="false"/>
asier@2026
   102
	<property name="chekPerms" value="false"/>
asier@1929
   103
	
asier@2056
   104
	<condition property="is.code.rev">
asier@2056
   105
		<isset property="code.revision"/>
asier@2056
   106
	</condition>
asier@2056
   107
	
asier@1977
   108
	<condition property="mode.war">
asier@1977
   109
	  <equals arg1="war" arg2="${deploy.mode}"/>
asier@1977
   110
	</condition>
asier@1977
   111
	
asier@1977
   112
	 <condition property="mode.class">
asier@1977
   113
	    <equals arg1="class" arg2="${deploy.mode}"/>
asier@1977
   114
	  </condition>
asier@1977
   115
		
asier@1929
   116
	<condition property="apply.modules.on.create">
asier@1929
   117
		<or>
asier@1929
   118
		  <equals arg1="yes" arg2="${apply.on.create}"/>
asier@1929
   119
			<equals arg1="true" arg2="${apply.on.create}"/>
asier@1929
   120
		</or>
asier@1929
   121
	</condition>
asier@1929
   122
	
asier@1929
   123
	<condition property="obx.exp.DB">
asier@1929
   124
		<or>
asier@1929
   125
	    <equals arg1="yes" arg2="${obx.export.DB}"/>
asier@1929
   126
			<equals arg1="true" arg2="${obx.export.DB}"/>
asier@1929
   127
		</or>
asier@1929
   128
	</condition>
asier@1929
   129
	
asier@1929
   130
	<condition property="obx.exp.CS">
asier@1929
   131
		<or>
asier@1929
   132
	    <equals arg1="yes" arg2="${obx.export.CS}"/>
asier@1929
   133
			<equals arg1="true" arg2="${obx.export.CS}"/>
asier@1929
   134
		</or>
asier@1929
   135
	</condition>
asier@1929
   136
	
asier@43
   137
  <condition property="jakarta.base" value="${env.CATALINA_BASE}" else="${jakarta.home}">
asier@43
   138
    <and>
asier@43
   139
      <isset property="env.CATALINA_BASE"/>
asier@43
   140
    </and>
asier@43
   141
  </condition>
juanpablo@536
   142
  <property name="log.path" location="${jakarta.base}/logs"/>
juanpablo@536
   143
  <property name="lib" location="${jakarta.home}/common"/>
juanpablo@536
   144
  <property name="jakarta.context" location="${jakarta.base}/webapps/${context.name}"/>
asier@43
   145
  <property name="build.maxmemory" value="512M"/>
asier@43
   146
stefan@124
   147
  <condition property="no.java.home" value="true">
stefan@124
   148
    <not>
stefan@125
   149
      <isset property="env.JAVA_HOME"/>
stefan@124
   150
    </not>
stefan@124
   151
  </condition>
stefan@124
   152
asier@43
   153
  <path id="project.class.path">
asier@43
   154
    <pathelement path="${build}"/>
ivan@1738
   155
    <pathelement path="${base.src}" />
asier@43
   156
    <fileset dir="${base.lib}">
asier@43
   157
      <include name="**/*.jar"/>
asier@43
   158
    </fileset>
asier@43
   159
    <fileset dir="${build.core.lib}">
asier@43
   160
      <include name="openbravo-core.jar"/>
asier@43
   161
    </fileset>
asier@43
   162
    <fileset dir="${build.trl.lib}">
asier@43
   163
      <include name="openbravo-trl.jar"/>
asier@43
   164
    </fileset>
asier@43
   165
    <fileset dir="${build.wad.lib}">
asier@43
   166
      <include name="openbravo-wad.jar"/>
asier@43
   167
    </fileset>
jordi@1711
   168
    <fileset dir="${base.lib}">
jordi@1711
   169
      <include name="**/*.jar"/>
jordi@1711
   170
    </fileset>
asier@1929
   171
    <fileset dir="${base.db}/lib/">
asier@1929
   172
      <include name="**/*.jar"/>
asier@1929
   173
    </fileset>
asier@1929
   174
    <fileset dir="${base.modules}">
asier@1929
   175
      <include name="*/lib/**"/>
asier@1929
   176
    </fileset>
asier@43
   177
  </path>
asier@1929
   178
	
asier@1929
   179
	<path id="tomcat.classpath">
asier@1929
   180
    <fileset file="${env.CATALINA_HOME}/server/lib/catalina-ant.jar"/>
asier@1929
   181
	</path>
asier@1929
   182
	
asier@1929
   183
	<taskdef resource="axis-tasks.properties" classpathref="project.class.path"/>
juanpablo@1548
   184
stefan@124
   185
  <target name="init">
stefan@124
   186
    <fail if="no.java.home" message="The environment variable JAVA_HOME is not set."/>
stefan@124
   187
  </target>
stefan@124
   188
asier@2056
   189
  <target name="code.rev" unless="is.code.rev">
juanpablo@1548
   190
    <loadfile property="svn.entries" srcFile=".svn/entries" failonerror="false">
juanpablo@1548
   191
      <filterchain>
juanpablo@1548
   192
        <filterreader classname="org.apache.tools.ant.filters.HeadFilter">
juanpablo@1548
   193
          <param name="skip" value="3"/>
juanpablo@1548
   194
          <param name="lines" value="1"/>
juanpablo@1548
   195
        </filterreader>
juanpablo@1548
   196
      </filterchain>
juanpablo@1548
   197
      <filterchain>
juanpablo@1548
   198
        <filterreader classname="org.apache.tools.ant.filters.StripLineBreaks" />
juanpablo@1548
   199
      </filterchain>
juanpablo@1548
   200
    </loadfile>
asier@2056
   201
    <condition property="code.revision" value="${svn.entries}" else ="0">
asier@2056
   202
      <and>
asier@2056
   203
        <isset property="svn.entries" />
asier@2056
   204
      </and>
asier@2056
   205
    </condition>
asier@2056
   206
  </target>
ivan@812
   207
stefan@124
   208
  <target name="compile.complete" depends="init">
juanpablo@536
   209
    <ant dir="${base.src}" target="compile.complete" inheritAll="true" inheritRefs="true"/>
asier@43
   210
  </target>
asier@43
   211
stefan@124
   212
  <target name="compile" depends="init">
juanpablo@536
   213
    <ant dir="${base.src}" target="compile" inheritAll="true" inheritRefs="true"/>
asier@43
   214
  </target>
asier@1977
   215
	
asier@1977
   216
	<target name="compile.complete.deploy">
asier@1977
   217
	  <antcall target="compile.complete.development"/>
asier@1977
   218
	  <antcall target="compile.complete.war"/>
asier@1977
   219
	</target>
asier@1977
   220
	
asier@1977
   221
  <target name="compile.complete.development" depends="init" if="mode.class">
juanpablo@536
   222
    <ant dir="${base.src}" target="compile.complete.development" inheritAll="true" inheritRefs="true"/>
asier@43
   223
  </target>
asier@1977
   224
	
asier@1977
   225
	<target name="compile.complete.war" depends="init" if="mode.war">
asier@1977
   226
	  <antcall target="compile.complete"/>
asier@1977
   227
		<antcall target="war"/>
asier@1977
   228
	</target>
asier@43
   229
asier@1977
   230
	<target name="compile.deploy">
asier@1977
   231
		<antcall target="compile.war"/>
asier@1977
   232
	  <antcall target="compile.development"/>
asier@1977
   233
	</target>
asier@1977
   234
	
asier@1977
   235
  <target name="compile.development" depends="init" if="mode.class">
juanpablo@536
   236
    <ant dir="${base.src}" target="compile.development" inheritAll="true" inheritRefs="true"/>
asier@43
   237
  </target>
asier@1977
   238
	
asier@1977
   239
	<target name="compile.war" if="mode.war">
asier@1977
   240
		<antcall target="compile"/>
asier@1977
   241
		<antcall target="war"/>
asier@1977
   242
	</target>
asier@43
   243
asier@1929
   244
  <target name="compile.web" depends="init">
asier@1929
   245
    <ant dir="${base.src}" target="compile.web" inheritAll="true" inheritRefs="true"/>
asier@1929
   246
  </target>
asier@1929
   247
asier@1929
   248
  <target name="compile.web.development" depends="init">
asier@1929
   249
    <ant dir="${base.src}" target="compile.web.development" inheritAll="true" inheritRefs="true"/>
asier@1929
   250
  </target>
asier@1929
   251
stefan@124
   252
  <target name="eclipse.compile" depends="init">
juanpablo@536
   253
    <ant dir="${base.src.core}" target="build.jar" inheritAll="true" inheritRefs="true"/>
juanpablo@536
   254
    <ant dir="${base.src.trl}" target="build.jar" inheritAll="true" inheritRefs="true"/>
juanpablo@536
   255
    <ant dir="${base.src.wad}" target="build.jar" inheritAll="true" inheritRefs="true"/>
juanpablo@536
   256
    <ant dir="${base.src}" target="eclipse.compile" inheritAll="true" inheritRefs="true"/>
juanpablo@1548
   257
    <eclipse.refreshLocal resource="openbravo" depth="infinite"/>
juanpablo@1548
   258
    <eclipse.incrementalBuild project="openbravo" kind="incremental"/>
asier@43
   259
  </target>
asier@43
   260
stefan@124
   261
  <target name="eclipse.compile.complete" depends="init">
juanpablo@536
   262
    <ant dir="${base.src.core}" target="build.jar" inheritAll="true" inheritRefs="true"/>
juanpablo@536
   263
    <ant dir="${base.src.trl}" target="build.jar" inheritAll="true" inheritRefs="true"/>
juanpablo@536
   264
    <ant dir="${base.src.wad}" target="build.jar" inheritAll="true" inheritRefs="true"/>
juanpablo@536
   265
    <ant dir="${base.src}" target="eclipse.compile.complete" inheritAll="true" inheritRefs="true"/>
juanpablo@1548
   266
    <eclipse.refreshLocal resource="openbravo" depth="infinite"/>
juanpablo@1548
   267
    <eclipse.incrementalBuild project="openbravo" kind="full"/>
asier@43
   268
  </target>
ivan@1738
   269
  
ivan@1738
   270
  <target name="compile.src.gen" depends="init">
ivan@1738
   271
    <ant dir="${base.src}" target="compile.src.gen" inheritAll="true" inheritRefs="true"/>
ivan@1738
   272
  </target>
ivan@1738
   273
ivan@1738
   274
  <target name="generate.entities" depends="compile.src.gen">
ivan@1738
   275
    <ant dir="${base.src}" target="generate.entities" inheritAll="true" inheritRefs="true"/>
ivan@1738
   276
  </target>
asier@43
   277
stefan@124
   278
  <target name="compile.src" depends="init">
juanpablo@536
   279
    <ant dir="${base.src}" target="compile.src" inheritAll="true" inheritRefs="true"/>
asier@43
   280
  </target>
asier@43
   281
stefan@124
   282
  <target name="war" depends="init">
juanpablo@536
   283
    <ant dir="${base.src}" target="build.war" inheritAll="true" inheritRefs="true"/>
asier@43
   284
  </target>
asier@43
   285
stefan@124
   286
  <target name="core.docs" depends="init">
juanpablo@536
   287
    <ant dir="${base.src.core}" target="doc" inheritAll="true" inheritRefs="true"/>
asier@43
   288
  </target>
juanpablo@131
   289
stefan@124
   290
  <target name="core.lib" depends="init">
juanpablo@536
   291
    <ant dir="${base.src.core}" target="build" inheritAll="true" inheritRefs="true"/>
ivan@1738
   292
    <copy file="${base.src.core}/lib/openbravo-core.jar" todir="${base.lib}/runtime" overwrite="true" failonerror="false"/>
asier@43
   293
  </target>
juanpablo@131
   294
stefan@124
   295
  <target name="eclipse.wad.lib" depends="init">
juanpablo@536
   296
    <ant dir="${base.src.wad}" target="sqlc" inheritAll="true" inheritRefs="true"/>
juanpablo@1548
   297
    <eclipse.refreshLocal resource="OpenbravoWAD" depth="infinite"/>
juanpablo@1548
   298
    <eclipse.incrementalBuild project="OpenbravoWAD" kind="full"/>
asier@43
   299
  </target>
juanpablo@131
   300
stefan@124
   301
  <target name="wad.docs" depends="init">
juanpablo@536
   302
    <ant dir="${base.src.wad}" target="doc" inheritAll="true" inheritRefs="true"/>
asier@43
   303
  </target>
juanpablo@131
   304
stefan@124
   305
  <target name="wad.lib" depends="init">
juanpablo@536
   306
    <ant dir="${base.src.wad}" target="build" inheritAll="true" inheritRefs="true"/>
asier@43
   307
  </target>
juanpablo@131
   308
stefan@124
   309
  <target name="eclipse.trl.lib" depends="init">
juanpablo@536
   310
    <ant dir="${base.src.trl}" target="sqlc" inheritAll="true" inheritRefs="true"/>
juanpablo@1548
   311
    <eclipse.refreshLocal resource="OpenbravoTrl" depth="infinite"/>
juanpablo@1548
   312
    <eclipse.incrementalBuild project="OpenbravoTrl" kind="full"/>
asier@43
   313
  </target>
juanpablo@131
   314
stefan@124
   315
  <target name="trl.docs" depends="init">
juanpablo@536
   316
    <ant dir="${base.src.trl}" target="doc" inheritAll="true" inheritRefs="true"/>
asier@43
   317
  </target>
juanpablo@131
   318
stefan@124
   319
  <target name="trl.lib" depends="init">
juanpablo@536
   320
    <ant dir="${base.src.trl}" target="build" inheritAll="true" inheritRefs="true"/>
asier@43
   321
  </target>
juanpablo@131
   322
stefan@124
   323
  <target name="database.lib" depends="init">
juanpablo@536
   324
    <ant dir="${base.src.db}" target="jar" inheritAll="true" inheritRefs="true"/>
juanpablo@536
   325
    <copy file="${base.src.db}/build/lib/dbmanager.jar" todir="${base.db}/lib" overwrite="true" failonerror="false"/>
asier@43
   326
  </target>
asier@43
   327
juanpablo@179
   328
  <target name="clean" depends="init">
juanpablo@536
   329
    <ant dir="${base.src}" target="clean" inheritAll="true" inheritRefs="true"/>
juanpablo@179
   330
  </target>
juanpablo@179
   331
juanpablo@179
   332
  <target name="trl.clean" depends="init">
juanpablo@536
   333
    <ant dir="${base.src}" target="trl.clean" inheritAll="true" inheritRefs="true"/>
juanpablo@179
   334
  </target>
juanpablo@179
   335
juanpablo@179
   336
  <target name="translate" depends="init">
juanpablo@536
   337
    <ant dir="${base.src}" target="translate" inheritAll="true" inheritRefs="true"/>
juanpablo@179
   338
  </target>
juanpablo@179
   339
stefan@124
   340
  <target name="installWebService" depends="init">
juanpablo@536
   341
    <ant dir="${base.src}" target="installWebService" inheritAll="true" inheritRefs="true">
asier@43
   342
      <property name="wsdd" value="1"/>
asier@43
   343
    </ant>
asier@43
   344
  </target>
asier@43
   345
stefan@124
   346
  <target name="uninstallWebService" depends="init">
juanpablo@536
   347
    <ant dir="${base.src}" target="uninstallWebService" inheritAll="true" inheritRefs="true"/>
asier@43
   348
  </target>
asier@43
   349
stefan@124
   350
  <target name="deploy" depends="init">
asier@43
   351
    <copy file="${base.lib}/${context.name}.war" todir="${jakarta.base}/webapps"/>
asier@43
   352
  </target>
asier@43
   353
antonio@1062
   354
  <target name="install.source" depends="init,code.rev">
asier@43
   355
    <antcall target="database.lib"/>
asier@1929
   356
    <ant dir="${base.db}" antfile="build-create.xml" target="create.database" inheritAll="true" inheritRefs="true"/>
asier@43
   357
    <antcall target="core.lib"/>
asier@43
   358
    <antcall target="wad.lib"/>
asier@43
   359
    <antcall target="trl.lib"/>
asier@43
   360
    <antcall target="compile.complete"/>
asier@43
   361
    <antcall target="war"/>
asier@43
   362
  </target>
juanpablo@131
   363
antonio@1062
   364
  <target name="eclipse.install.source" depends="init,code.rev">
juanpablo@131
   365
    <antcall target="database.lib"/>
martin@1943
   366
    <ant dir="${base.db}" antfile="build-create.xml" target="create.database" inheritAll="true" inheritRefs="true"/>
juanpablo@1548
   367
    <eclipse.incrementalBuild project="OpenbravoCore" kind="full"/>
rafael@1546
   368
    <antcall target="eclipse.wad.lib"/>
rafael@1546
   369
    <antcall target="eclipse.trl.lib"/>
rafael@1546
   370
    <antcall target="eclipse.compile.complete"/>
asier@43
   371
  </target>
asier@43
   372
ivan@812
   373
  <target name="create.database" depends="init,code.rev">
juanpablo@131
   374
    <antcall target="database.lib"/>
asier@1929
   375
    <ant dir="${base.db}" antfile="build-create.xml" target="create.database" inheritAll="true" inheritRefs="true"/>
asier@1929
   376
  	<antcall target="db.apply.modules"/>
antonio@1335
   377
  </target>
antonio@1335
   378
antonio@905
   379
  <target name="update.database" depends="init,code.rev">
antonio@1208
   380
    <antcall target="database.lib"/>
juanpablo@536
   381
    <ant dir="${base.db}" target="update.database" inheritAll="true" inheritRefs="true"/>
asier@1929
   382
  	<antcall target="db.apply.modules"/>
asier@1929
   383
  </target>
asier@1929
   384
asier@1929
   385
  <target name="update.database.mod" depends="init,code.rev">
asier@1929
   386
    <antcall target="database.lib"/>
asier@1929
   387
    <ant dir="${base.db}" target="update.database.mod" inheritAll="true" inheritRefs="true"/>
asier@1929
   388
  	<antcall target="db.apply.modules"/>
juanpablo@131
   389
  </target>
asier@43
   390
antonio@1335
   391
  <target name="update.customized.database" depends="init,code.rev">
antonio@1335
   392
    <antcall target="database.lib"/>
antonio@1335
   393
    <ant dir="${base.db}" target="update.customized.database" inheritAll="true" inheritRefs="true"/>
antonio@1335
   394
  </target>
antonio@1335
   395
juanpablo@131
   396
  <target name="create.database.structure" depends="init">
juanpablo@536
   397
    <ant dir="${base.db}" target="create.database.structure" inheritAll="true" inheritRefs="true"/>
juanpablo@131
   398
  </target>
asier@43
   399
juanpablo@131
   400
  <target name="update.database.structure" depends="init">
juanpablo@536
   401
    <ant dir="${base.db}" target="update.database.structure" inheritAll="true" inheritRefs="true"/>
juanpablo@131
   402
  </target>
asier@43
   403
juanpablo@131
   404
  <target name="create.database.script" depends="init">
juanpablo@536
   405
    <ant dir="${base.db}" target="create.database.script" inheritAll="true" inheritRefs="true"/>
juanpablo@131
   406
  </target>
asier@43
   407
juanpablo@131
   408
  <target name="update.database.script" depends="init">
juanpablo@536
   409
    <ant dir="${base.db}" target="update.database.script" inheritAll="true" inheritRefs="true"/>
juanpablo@131
   410
  </target>
adrian@97
   411
antonio@903
   412
  <target name="export.database" depends="init,code.rev">
antonio@1208
   413
    <antcall target="database.lib"/>
juanpablo@536
   414
    <ant dir="${base.db}" target="export.database.structure" inheritAll="true" inheritRefs="true"/>
juanpablo@536
   415
    <ant dir="${base.db}" target="export.database.data" inheritAll="true" inheritRefs="true"/>
adrian@164
   416
  </target>
adrian@164
   417
antonio@903
   418
  <target name="export.database.structure" depends="init,code.rev">
juanpablo@536
   419
    <ant dir="${base.db}" target="export.database.structure" inheritAll="true" inheritRefs="true"/>
juanpablo@131
   420
  </target>
asier@43
   421
asier@1929
   422
  <target name="export.config.script" depends="init,code.rev">
asier@1929
   423
    <ant dir="${base.db}" target="export.config.script" inheritAll="true" inheritRefs="true"/>
asier@1929
   424
  </target>
asier@1929
   425
antonio@903
   426
  <target name="export.database.data" depends="init,code.rev">
juanpablo@536
   427
    <ant dir="${base.db}" target="export.database.data" inheritAll="true" inheritRefs="true"/>
juanpablo@131
   428
  </target>
asier@43
   429
antonio@879
   430
  <target name="import.database.data" depends="init,code.rev">
juanpablo@536
   431
    <ant dir="${base.db}" target="import.database.data" inheritAll="true" inheritRefs="true"/>
juanpablo@131
   432
  </target>
asier@43
   433
antonio@903
   434
  <target name="export.database.sampledata" depends="init,code.rev">
juanpablo@536
   435
    <ant dir="${base.db}" target="export.database.sampledata" inheritAll="true" inheritRefs="true"/>
juanpablo@131
   436
  </target>
asier@43
   437
antonio@879
   438
  <target name="import.database.sampledata" depends="init,code.rev">
juanpablo@536
   439
    <ant dir="${base.db}" target="import.database.sampledata" inheritAll="true" inheritRefs="true"/>
juanpablo@131
   440
  </target>
juanpablo@131
   441
antonio@903
   442
  <target name="export.database.masterdata" depends="init,code.rev">
juanpablo@536
   443
    <ant dir="${base.db}" target="export.database.masterdata" inheritAll="true" inheritRefs="true"/>
antonio@451
   444
  </target>
antonio@451
   445
antonio@879
   446
  <target name="import.database.masterdata" depends="init,code.rev">
juanpablo@536
   447
    <ant dir="${base.db}" target="import.database.masterdata" inheritAll="true" inheritRefs="true"/>
antonio@451
   448
  </target>
asier@1929
   449
	
asier@1929
   450
	<target name="db.apply.modules" if="apply.modules.on.create">
asier@1929
   451
    <taskdef name="applyModule"
asier@1929
   452
             classname="org.openbravo.erpCommon.modules.ApplyModuleTask">
asier@1929
   453
      <classpath refid="project.class.path"/>
asier@1929
   454
    </taskdef>
asier@1929
   455
    <applyModule/>
asier@1929
   456
	</target>
asier@1977
   457
		
asier@1929
   458
	<target name="apply.modules">
asier@1929
   459
	  <echo>Applying ${module} modules...</echo>
asier@1929
   460
    <taskdef name="applyModule"
asier@1929
   461
             classname="org.openbravo.erpCommon.modules.ApplyModuleTask">
asier@1929
   462
      <classpath refid="project.class.path"/>
asier@1929
   463
    </taskdef>
asier@1929
   464
    <antcall target="update.database.mod"/>
asier@1929
   465
    <antcall target="generate.entities"/>
asier@1929
   466
    <applyModule/>
asier@1977
   467
		<antcall target="compile.deploy"/>
asier@1929
   468
		<!--antcall target="deploy.context"/-->
asier@1929
   469
	</target>
asier@1977
   470
  
asier@1977
   471
	
asier@1929
   472
	<target name="tomcat.list">
asier@1929
   473
		<taskdef name="list"  classname="org.apache.catalina.ant.ListTask">
asier@1929
   474
		  <classpath refid="tomcat.classpath"/>
asier@1929
   475
		</taskdef>
asier@1929
   476
		<list url="${tomcat.manager.url}" username="${tomcat.manager.username}" password="${tomcat.manager.password}"/>
asier@1929
   477
	</target>
asier@1929
   478
	
asier@1929
   479
	<target name="deploy.context">
asier@1929
   480
		<taskdef name="undeploy"  classname="org.apache.catalina.ant.UndeployTask">
asier@1929
   481
		  <classpath refid="tomcat.classpath"/>
asier@1929
   482
	  </taskdef>
asier@1929
   483
		<taskdef name="deploy.tomcat" classname="org.apache.catalina.ant.DeployTask">
asier@1929
   484
		  <classpath refid="tomcat.classpath"/>
asier@1929
   485
		</taskdef>
asier@1929
   486
		<taskdef name="start"    classname="org.apache.catalina.ant.StartTask">
asier@1929
   487
		  <classpath refid="tomcat.classpath"/>
asier@1929
   488
		</taskdef>
asier@1929
   489
		
asier@1929
   490
		<undeploy url="${tomcat.manager.url}" username="${tomcat.manager.username}" password="${tomcat.manager.password}"
asier@1929
   491
      path="/${context.name}" failonerror="false"/>
asier@1929
   492
    <deploy.tomcat url="${tomcat.manager.url}" username="${tomcat.manager.username}" password="${tomcat.manager.password}"
asier@1929
   493
                path="/${context.name}" war="file:${base.lib}/${context.name}.war"/>
asier@1929
   494
		<start url="${tomcat.manager.url}" username="${tomcat.manager.username}" password="${tomcat.manager.password}"
asier@1929
   495
		          path="/${context.name}"/>
asier@1929
   496
	</target>
asier@1929
   497
	
asier@1929
   498
	
asier@1929
   499
  <target name="generate-wsdd">
asier@1929
   500
            <ant dir="${base.src}" target="generate-wsdd" inheritAll="true" inheritRefs="true"/>
asier@1929
   501
    </target>
asier@1929
   502
	
asier@1929
   503
	<target name="obx.export.database" if="obx.exp.DB">
asier@1929
   504
	  <antcall target="export.database"/>
asier@1929
   505
	</target>
asier@1929
   506
	  
asier@1929
   507
  <target name="obx.export.config.script" if="obx.exp.CS">
asier@1929
   508
    <antcall target="export.config.script"/>
asier@1929
   509
  </target>
asier@1929
   510
	
asier@1929
   511
	<target name="extract.module">
asier@1929
   512
  	<taskdef name="extractModule"
asier@1929
   513
  	           classname="org.openbravo.erpCommon.modules.ExtractModuleTask">
asier@1929
   514
  	    <classpath refid="project.class.path"/>
asier@1929
   515
	  </taskdef>
asier@1929
   516
		
asier@1929
   517
    <antcall target="obx.export.database"/>
asier@1929
   518
    <antcall target="obx.export.config.script"/>
antonio@451
   519
asier@1929
   520
		<extractModule moduleName="${module}"
asier@1929
   521
			  userId="0"
asier@1929
   522
			  propertiesFile="${base.config}/Openbravo.properties"
asier@1929
   523
			  exportRD="${obx.export.RD}"/>
asier@1929
   524
	</target>
adrian@171
   525
asier@2005
   526
	 <target name="diagnostic">
asier@2026
   527
	 	  <ant dir="src-diagnostics" antfile="build-create.xml" target="build"/>
asier@2005
   528
	    <ant dir="src-diagnostics" target="check.all"/>
asier@2005
   529
	  </target>
asier@43
   530
</project>