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