build.xml
author Asier Lostalé <asier.lostale@openbravo.com>
Wed, 12 Nov 2008 13:14:11 +0000
changeset 1929 ad0353d93b0f
parent 1738 d8dcb2ecfd14
child 1943 f59449272eaa
permissions -rw-r--r--
Merge back modularity branch to trunk.

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