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