Project

General

Profile

build.xml

Lorian Sandu, 06/04/2025 08:21 AM

Download (45.3 KB)

 
1
<project name="hotel" default="dist" basedir=".">
2

    
3
   <description>Hotel Management</description>
4

    
5
   <property name="conversionHeap"  value="4G" />
6
   <property name="compileMemory"   value="4G" />
7
   <property name="ant.contrib.dir" value="${basedir}/build/ant.contrib/" />
8
   <property name="ant.contrib.url" value="https://proj.goldencode.com/downloads/ant_contrib/ant-contrib-1.0b5.zip" />
9
   <condition property="java_11_spi">
10
       <javaversion atleast="11"/>
11
   </condition>
12

    
13
   <!-- ANT-CONTRIB autoinstaller -->
14
   <available property="ant-contrib-exists" file="${ant.contrib.dir}/ant-contrib-1.0b5-SNAPSHOT.jar" />
15
   <target name="download-ant-contrib" unless="ant-contrib-exists">
16
      <mkdir dir="${ant.contrib.dir}" />
17
      <get src="${ant.contrib.url}"
18
           dest="${ant.contrib.dir}/ant-contrib-1.0b5.zip"
19
           username="true" />
20
      <unzip src="${ant.contrib.dir}/ant-contrib-1.0b5.zip"
21
             dest="${ant.contrib.dir}"
22
             overwrite="no" />
23
      <delete file="${ant.contrib.dir}/ant-contrib-1.0b5.zip" />
24
   </target>
25
   
26
   <target name="init-ant-contrib" depends="download-ant-contrib">
27
      <taskdef resource="net/sf/antcontrib/antcontrib.properties">
28
         <classpath>
29
            <fileset dir="${ant.contrib.dir}">
30
               <include name="*.jar"/>
31
            </fileset>
32
            <fileset dir="${ant.library.dir}">
33
               <include name="*.jar"/>
34
            </fileset>
35
         </classpath>
36
      </taskdef>
37
   </target>
38
      
39
   <property file="build.properties"/>
40
   
41
   <!-- a link named "p2j/" to the FWD project location must exist for this to work -->
42
   
43
   <!-- set global properties for this build -->
44
   
45
   <property name="build.home"           value="${basedir}/build" />
46
   <property name="cvt.home"             value="${basedir}/cvt" />
47
   <property name="cvt.rel"              value="cvt" />  <!-- relative path to cvt folder -->
48
   <property name="dist.home"            value="${basedir}/distribution" /> 
49
   <property name="data.rel"             value="data" /> <!-- relative path to data folder -->
50
   <property name="src.home"             value="${basedir}/src" />
51
   <property name="srcnew.home"          value="${basedir}/srcnew" />
52
   <property name="lib.home"             value="${basedir}/lib" />
53
   <property name="cfg.home"             value="${basedir}/cfg" />
54
   <property name="manifest.dir"         value="${basedir}/manifest" />
55

    
56
   <property name="fwd.home"             value="." />
57
   <property name="fwd.build.home"       value="${fwd.home}/p2j/build" />
58
   <property name="fwd.lib.home"         value="${fwd.home}/p2j/build/lib" />
59
   <property name="fwd.src.home"         value="${fwd.home}/p2j/src" />
60

    
61
   <property name="appname"              value="hotel" />
62
   <property name="zfile"                value="zfile_set.txt" />
63
   <property name="pkgroot"              value="com/goldencode/${appname}" />   
64
   <property name="app.4gl.src"          value="./abl/" />   
65
   <property name="ade.4gl.src"          value="./abl/ade" />
66
   <property name="possenet.4gl.src"     value="./abl/possenet*" />
67
   <property name="app.4gl.pattern"      value="*.[pPwW]" />
68
   <property name="destination.package"  value="${build.home}/classes/${pkgroot}"/>
69
   <property name="deploy.home"          value="${basedir}/deploy" />
70
   <property name="deploy.home.abs"      location="${deploy.home}" />
71
   <property name="rpt.home"             value="${basedir}/rpt" />
72
   <property name="cg.home"              value="${basedir}/callgraph" />
73
   
74
   <!-- enable database type(s) -->
75
   <property name="db.h2"                value="true" />
76
   <property name="db.postgresql"        value="false" />
77
   <property name="db.mariadb"           value="false" />
78
   <property name="db.sql.udfs"          value="true" />
79
   <property name="db.import_threads"    value="${db.import_threads}" />
80
   <property name="db.export_threads"    value="${db.export_threads}" />
81
   <property name="db.batch_size"        value="${db.batch_size}" />
82
   
83
   <!-- sql global properties  -->
84
   <property name="db.home"              value="${deploy.home}/db" />
85
   <property name="db.host"              value="localhost" />
86
   <property name="db.port"              value="5433" />
87
   <property name="sql.user"             value="fwd_user" />
88
   <property name="sql.admin"            value="fwd_admin" />
89
   <property name="sql.user.pass"        value="user" />
90
   <property name="sql.admin.pass"       value="admin" />
91

    
92
   <!-- webspeed embedded 4GL pattern signifying in a pre-processed source file (.w or .i) -->
93
   <property name="e4gl.pattern"         value="'^/\*E4GL\-[IW]\*/'" />
94
   <property name="e4gl-ps1.pattern"     value="'^/\\*E4GL-[IW]\\*/'" />
95
   <property name="e4gl-noclean"         value="-not -path '${ade.4gl.src}/*' -not -path '${possenet.4gl.src}/*'" />
96

    
97
   <condition property="isWindows">
98
      <os family="windows" />
99
   </condition>
100

    
101
   <condition property="isUnix">
102
      <os family="unix" />
103
   </condition>
104

    
105
   <condition property="escaped.quotes" value="&quot;&quot;&quot;" else="&quot;">
106
      <isset property="isWindows"  />
107
   </condition>
108

    
109
   
110
   <!--  ==================== Compilation Control Options ==================== -->
111

    
112
   <!--
113

114
     These properties control option settings on the Javac compiler when it
115
     is invoked using the <javac> task.
116

117
     compile.debug        Should compilation include the debug option?
118
     compile.deprecation  Should compilation include the deprecation option?
119
     compile.optimize     Should compilation include the optimize option?
120

121
   -->
122

    
123
   <property name="compile.debug"       value="true"/>
124
   <property name="compile.deprecation" value="false"/>
125
   <property name="compile.optimize"    value="true"/>
126
   
127
   <!-- path used when compiling Java classes -->
128
   <path id="compile.classpath">
129
      <fileset dir="${fwd.lib.home}"    includes="*.jar"/>
130
   </path>
131
   
132
   <!-- path used when running application related tasks -->
133
   <path id="app.classpath">
134
      <fileset dir="${fwd.lib.home}"    includes="*.jar"/>
135
      <fileset dir="${deploy.home}/lib" includes="*.jar"/>
136
   </path>
137
   
138
   <!-- path used when running database import tasks -->
139
   <path id="import.classpath">
140
      <fileset dir="${fwd.lib.home}"    includes="*.jar"/>
141
      <fileset dir="${deploy.home}/lib" includes="*.jar"/>
142
      <fileset dir="${build.home}/lib"  includes="*.jar"/>
143
   </path>
144
   
145
   <!-- path used when running database export tasks -->
146
   <path id="export.classpath">
147
      <fileset dir="${fwd.lib.home}"    includes="*.jar"/>
148
      <fileset dir="${deploy.home}/lib" includes="*.jar"/>
149
      <fileset dir="${build.home}/lib"  includes="*.jar"/>
150
   </path>
151

    
152
   <tstamp>
153
      <format property="DSTAMP" pattern="yyyyMMdd" />
154
   </tstamp>
155

    
156
   <tstamp>
157
      <format property="LOG_STAMP" pattern="yyyyMMdd_HHmmss" />
158
   </tstamp>
159

    
160
   <!-- create the time stamp -->
161
   <target name="init" depends="check.fwd.dir">
162
      <tstamp/>
163
   </target>
164

    
165
   <!-- generate call graph -->
166
   <target name="callgraph" depends="convert.front, convert.front.zset" description="Parse the project and create the call graph.">
167
      <record name="callgraph_${LOG_STAMP}.log" action="start"/>
168
      <java classname="com.goldencode.p2j.uast.CallGraphGenerator"
169
            fork="true"
170
            failonerror="true"
171
            dir="${basedir}" >
172
         <jvmarg value="-server"/>
173
         <jvmarg value="-Xmx2G"/>
174
         <jvmarg value="-XX:-OmitStackTraceInFastThrow"/>
175
         <jvmarg value="-DP2J_HOME=${fwd.home}"/>
176
         <arg value ="-d2"/>
177
         <classpath refid="compile.classpath"/>
178
      </java>
179
      <record name="callgraph_${LOG_STAMP}.log" action="stop"/>
180
   </target>
181

    
182
   <!-- generate call graph, without parsing -->
183
   <target name="callgraph-no-front" depends="init" description="Parse the project and create the call graph.">
184
      <record name="callgraph_${LOG_STAMP}.log" action="start"/>
185
      <java classname="com.goldencode.p2j.uast.CallGraphGenerator"
186
            fork="true"
187
            failonerror="true"
188
            dir="${basedir}" >
189
         <jvmarg value="-server"/>
190
         <jvmarg value="-Xmx8G"/>
191
         <jvmarg value="-XX:-OmitStackTraceInFastThrow"/>
192
         <jvmarg value="-DP2J_HOME=${fwd.home}"/>
193
         <arg value ="-d2"/>
194
         <classpath refid="compile.classpath"/>
195
      </java>
196
      <record name="callgraph_${LOG_STAMP}.log" action="stop"/>
197
   </target>
198

    
199
   <!-- update the call graph, without parsing -->
200
   <target name="callgraph-update" depends="init" description="Parse the project and create the call graph.">
201
      <record name="callgraph_${LOG_STAMP}.log" action="start"/>
202
      <java classname="com.goldencode.p2j.uast.CallGraphGenerator"
203
            fork="true"
204
            failonerror="true"
205
            dir="${basedir}" >
206
         <jvmarg value="-server"/>
207
         <jvmarg value="-Xmx8G"/>
208
         <jvmarg value="-XX:-OmitStackTraceInFastThrow"/>
209
         <jvmarg value="-DP2J_HOME=${fwd.home}"/>
210
         <arg value ="-d2"/>
211
         <arg value ="-u"/>
212
         <classpath refid="compile.classpath"/>
213
      </java>
214
      <record name="callgraph_${LOG_STAMP}.log" action="stop"/>
215
   </target>
216

    
217
   <!-- generate all reports, old syntax, deprecated -->
218
   <target name="rpt-no-front"
219
           depends="init, init-ant-contrib"
220
           description="Generate code and schema reports from the already parsed project.">
221
      <record name="rpt_schema_${LOG_STAMP}.log" action="start"/>
222
      <var name="db.schema.files" value=""/>
223
      <for list="${db.names}" param="db.name">
224
         <sequential>
225
            <var name="db.schema.files" value="${db.schema.files} data/namespace/@{db.name}.dict"/>
226
         </sequential>
227
      </for>
228
      
229
      <java classname="com.goldencode.p2j.report.ReportDriver"
230
            fork="true"
231
            failonerror="true"
232
            dir="${basedir}" >
233
         <jvmarg value="-server"/>
234
         <jvmarg value="-Xmx4G"/>
235
         <jvmarg value="-XX:-OmitStackTraceInFastThrow"/>
236
         <jvmarg value="-DP2J_HOME=${fwd.home}"/>
237
         <jvmarg value="-DappAdminPass=${appname}"/>
238
         <arg value="-Td1"/>
239
         <arg value="reports/schema"/>
240
         <arg value="${app.4gl.src}"/>
241
         <arg value="*.dict"/>
242
         <arg line="${db.schema.files}"/>
243
         <classpath refid="compile.classpath"/>
244
      </java>
245
      <record name="rpt_schema_${LOG_STAMP}.log" action="stop"/>
246
      <record name="rpt_code_${LOG_STAMP}.log" action="start"/>
247
      <java classname="com.goldencode.p2j.report.ReportDriver"
248
            fork="true"
249
            failonerror="true"
250
            dir="${basedir}" >
251
         <jvmarg value="-server"/>
252
         <jvmarg value="-Xmx4G"/>
253
         <jvmarg value="-XX:-OmitStackTraceInFastThrow"/>
254
         <jvmarg value="-DP2J_HOME=${fwd.home}"/>
255
         <arg value="-Sd1"/>
256
         <arg value="reports/profile"/>
257
         <arg value="${app.4gl.src}"/>
258
         <arg value="*.ast"/>
259
         <classpath refid="compile.classpath"/>
260
      </java>
261
      <record name="rpt_code_${LOG_STAMP}.log" action="stop"/>
262

    
263
      <echo message="Report generation finished."/>
264
   </target>
265

    
266
   <!-- generate all reports -->
267
   <target name="rpt-new"
268
           depends="init, init-ant-contrib"
269
           description="Generate code and schema reports from the already parsed project.">
270
      <record name="rpt_${LOG_STAMP}.log" action="start"/>
271
      <java classname="com.goldencode.p2j.report.ReportDriver"
272
            fork="true"
273
            failonerror="true"
274
            dir="${basedir}" >
275
         <arg value="-D2"/>
276
         <jvmarg value="-server"/>
277
         <jvmarg value="-Xmx4G"/>
278
         <jvmarg value="-XX:-OmitStackTraceInFastThrow"/>
279
         <jvmarg value="-DP2J_HOME=${fwd.home}"/>
280
         <jvmarg value="-DappAdminPass=${appname}"/>
281
         <classpath refid="compile.classpath"/>
282
      </java>
283
      <record name="rpt_${LOG_STAMP}.log" action="stop"/>
284
   </target>
285

    
286
   <target name="rpt"
287
           depends="convert.front, convert.front.zset, rpt-new"
288
           description="Parse the project and generate code and schema reports.">
289
   </target>
290
   
291
   <!-- generate everything that the report server can support -->
292
   <target name="report_server" depends="clean, rpt, callgraph" description="Parse the project, generate schema/code reports and create the call graph." />
293
   
294
   <target name="check-zfile-set">
295
      <available file="${zfile}" property="zfile-set"/>
296
   </target>
297

    
298
   <condition property="no-list-mode">
299
      <available file="${zfile}"/>
300
   </condition>
301

    
302
   <!-- convert 4GL code from ${app.4gl.src} into ${src}, using ${app.4gl.pattern} pattern -->
303
   <target name="convert"
304
           depends="init, check-zfile-set"
305
           description="Convert the 4GL source code to Java source code, using a pattern as input."
306
           unless="no-list-mode">
307
      <record name="cvt_${LOG_STAMP}.log" action="start"/>
308
      <java classname="com.goldencode.p2j.convert.ConversionDriver"
309
            fork="true"
310
            failonerror="true"
311
            dir="${basedir}">
312
         <jvmarg value="-server"/>
313
         <jvmarg value="-Xmx${conversionHeap}"/>
314
         <jvmarg value="-XX:-OmitStackTraceInFastThrow"/>
315
         <jvmarg value="-DP2J_HOME=${fwd.home}"/>
316
         <arg value="-SId2"/>
317
         <arg value="f2+m0+cb"/>
318
         <arg value="${app.4gl.src}"/>
319
         <arg value="${app.4gl.pattern}"/>
320
         <classpath refid="compile.classpath"/>
321
      </java>
322
      <record name="cvt_${LOG_STAMP}.log" action="stop"/>
323
   </target>
324
        
325
   <!-- convert 4GL code from ${app.4gl.src} into ${src}, using a fileset -->
326
   <target name="convert.zset"
327
           depends="init, check-zfile-set"
328
           description="Convert the 4GL source code to Java source code, using the z-file set file as input."
329
           if="zfile-set">
330
      <record name="cvt_${LOG_STAMP}.log" action="start"/>
331
      <echo message="fileset in use: ${zfile}"/>
332
      <java classname="com.goldencode.p2j.convert.ConversionDriver"
333
            fork="true"
334
            failonerror="true"
335
            dir="${basedir}">
336
         <jvmarg value="-server"/>
337
         <jvmarg value="-Xmx${conversionHeap}"/>
338
         <jvmarg value="-XX:-OmitStackTraceInFastThrow"/>
339
         <jvmarg value="-DP2J_HOME=${fwd.home}"/>
340
         <arg value="-ZId2"/>
341
         <arg value="f2+m0+cb"/>
342
         <arg value="${zfile}"/>
343
         <classpath refid="compile.classpath"/>
344
      </java>
345
      <record name="cvt_${LOG_STAMP}.log" action="stop"/>
346
   </target>
347
   
348
   <target name="convert.front"
349
           depends="init, check-zfile-set"
350
           description="Execute the parse phase of the conversion process, using a pattern as input."
351
           unless="no-list-mode">
352
      <record name="cvt_f2_${LOG_STAMP}.log" action="start"/>
353
      <java classname="com.goldencode.p2j.convert.ConversionDriver"
354
            fork="true"
355
            failonerror="true"
356
            dir="${basedir}">
357
         <jvmarg value="-server"/>
358
         <jvmarg value="-Xmx${conversionHeap}"/>
359
         <jvmarg value="-XX:-OmitStackTraceInFastThrow"/>
360
         <jvmarg value="-DP2J_HOME=${fwd.home}"/>
361
         <arg value="-ISd2"/>
362
         <arg value="f2"/>
363
         <arg value="${app.4gl.src}"/>
364
         <arg value="${app.4gl.pattern}"/>
365
         <classpath refid="compile.classpath"/>
366
      </java>
367
      <record name="cvt_f2_${LOG_STAMP}.log" action="stop"/>
368
   </target>
369

    
370
   <target name="convert.front.zset"
371
           depends="init, check-zfile-set"
372
           description="Execute the parse phase of the conversion process, using the z-file set file as input."
373
           if="zfile-set">
374
      <record name="cvt_f2_${LOG_STAMP}.log" action="start"/>
375
      <echo message="fileset in use: ${zfile}"/>
376
      <java classname="com.goldencode.p2j.convert.ConversionDriver"
377
            fork="true"
378
            failonerror="true"
379
            dir="${basedir}">
380
         <jvmarg value="-server"/>
381
         <jvmarg value="-Xmx${conversionHeap}"/>
382
         <jvmarg value="-XX:-OmitStackTraceInFastThrow"/>
383
         <jvmarg value="-DP2J_HOME=${fwd.home}"/>
384
         <arg value="-IZd2"/>
385
         <arg value="f2"/>
386
         <arg value="${zfile}"/>
387
         <classpath refid="compile.classpath"/>
388
      </java>
389
      <record name="cvt_f2_${LOG_STAMP}.log" action="stop"/>
390
   </target>
391
   
392
   <target name="convert.middle" depends="init, check-zfile-set"
393
           description="Execute the parse and schema conversion phases of the conversion process, using a pattern as input."
394
           unless="no-list-mode">
395
      <record name="cvt_f2m0_${LOG_STAMP}.log" action="start"/>
396
      <java classname="com.goldencode.p2j.convert.ConversionDriver"
397
            fork="true"
398
            failonerror="true"
399
            dir="${basedir}">
400
         <jvmarg value="-server"/>
401
         <jvmarg value="-Xmx${conversionHeap}"/>
402
         <jvmarg value="-XX:-OmitStackTraceInFastThrow"/>
403
         <jvmarg value="-DP2J_HOME=${fwd.home}"/>
404
         <arg value="-ISd2"/>
405
         <arg value="f2+m0"/>
406
         <arg value="${app.4gl.src}"/>
407
         <arg value="${app.4gl.pattern}"/>
408
         <classpath refid="compile.classpath"/>
409
      </java>
410
      <record name="cvt_f2m0_${LOG_STAMP}.log" action="stop"/>
411
   </target>
412
   
413
   <target name="convert.middle.zset"
414
           depends="init, check-zfile-set"
415
           description="Execute the parse and schema conversion phases of the conversion process, using the ${zfile} set file as input."
416
           if="zfile-set">
417
      <record name="cvt_f2m0_${LOG_STAMP}.log" action="start"/>
418
      <echo message="fileset in use: ${zfile}"/>
419
      <java classname="com.goldencode.p2j.convert.ConversionDriver"
420
            fork="true"
421
            failonerror="true"
422
            dir="${basedir}">
423
         <jvmarg value="-server"/>
424
         <jvmarg value="-Xmx${conversionHeap}"/>
425
         <jvmarg value="-XX:-OmitStackTraceInFastThrow"/>
426
         <jvmarg value="-DP2J_HOME=${fwd.home}"/>
427
         <arg value="-IZd2"/>
428
         <arg value="f2+m0"/>
429
         <arg value="${zfile}"/>
430
         <classpath refid="compile.classpath"/>
431
      </java>
432
      <record name="cvt_f2m0_${LOG_STAMP}.log" action="stop"/>
433
   </target>
434

    
435
   <!-- make sure the FWD project code is compiled -->
436
   <target name="fwd-build" depends="check.fwd.dir" description="Compile the FWD project." >
437
      <!-- compile the java code from ${src} into ${build} 
438
      <ant antfile="build.xml" target="all" dir="p2j" inheritall="false" inheritrefs="false"/>
439
      -->
440
   </target>
441
  
442
   <!-- compile -->
443
   <target name="compile"
444
           depends="init, check.fwd.dir, clean.build, fwd-build, prepare"
445
           description="Compiles the converted application Java source code.  Does NOT convert, create jars or deploy." >
446
           
447
      <record name="build_${LOG_STAMP}.log" action="start"/>
448
      <!-- Compile DMO and UI classes only -->
449
      <javac srcdir="${src.home}"
450
             destdir="${build.home}/classes"
451
             includes="${pkgroot}/dmo/**
452
                       ${pkgroot}/ui/**"
453
             debug="${compile.debug}"
454
             deprecation="${compile.deprecation}"
455
             memoryMaximumSize="${compileMemory}"
456
             fork="true"
457
             optimize="${compile.optimize}"
458
             includeantruntime="false" >   
459
         <classpath refid="compile.classpath"/>
460
         <compilerarg value="-Xmaxerrs"/>
461
         <compilerarg value="5000"/>
462
      </javac>
463

    
464
      <!-- Compile all other classes -->
465
      <javac srcdir="${src.home}"
466
             destdir="${build.home}/classes"
467
             debug="${compile.debug}"
468
             deprecation="${compile.deprecation}"
469
             memoryMaximumSize="${compileMemory}"
470
             fork="true"
471
             optimize="${compile.optimize}"
472
             includeantruntime="false" >   
473
         <classpath refid="compile.classpath"/>
474
         <compilerarg value="-Xmaxerrs"/>
475
         <compilerarg value="5000"/>
476
      </javac>
477

    
478
      <record name="build_${LOG_STAMP}.log" action="stop"/>
479
      <echo message="Compiling Java Sources Done."/>
480
   </target>
481
   
482
   <target name="prepare.embedded">
483
      <!-- copy custom embedded sources and data to the main app -->
484
      <copy todir="src/${pkgroot}/">
485
         <fileset dir="embedded/src/${pkgroot}/" />
486
      </copy>
487

    
488
      <!-- copy embedded resources -->
489
      <copy todir="${build.home}/classes">
490
         <fileset dir="${src.home}" includes="${pkgroot}/embedded/**" />
491
      </copy>
492

    
493
   </target>
494

    
495
   <target name="prepare" depends="prepare.embedded">
496

    
497
      <!-- create build directories as needed -->
498
      
499
      <mkdir dir="${build.home}" />
500
      <mkdir dir="${build.home}/lib" />
501
      <mkdir dir="${build.home}/classes" />
502
      
503
      <!-- create distribution directory as needed -->
504
      
505
      <mkdir dir="${dist.home}" />
506
      <mkdir dir="${dist.home}/docs/api" />
507
      
508
      <!-- copy external jars -->
509
      
510
      <mkdir dir="${lib.home}" />
511
      <copy todir="${build.home}/lib">
512
         <fileset dir="${lib.home}" />
513
      </copy>
514

    
515
      <!-- copy base web res dir -->
516
      <copy todir="${build.home}/classes/${pkgroot}">
517
         <fileset dir="${fwd.home}">
518
            <include name="webres/**"/>
519
         </fileset>
520
      </copy>
521

    
522
      <!-- create src dir -->
523
      <mkdir dir="${src.home}" />
524
      
525
      <!-- copy application graphics -->
526
      <copy todir="${build.home}/classes/${pkgroot}">
527
         <fileset dir="${app.4gl.src}" includes="**/*.png **/*.jpg **/*.bmp **/*.ico **/*.gif" casesensitive="false" />
528
      </copy>
529

    
530
      <!-- copy jrxml templates -->
531
      <copy todir="${build.home}/classes/${pkgroot}">
532
         <fileset dir="${app.4gl.src}" includes="**/*.jrxml" />
533
      </copy>
534

    
535
      <!-- copy all XML and WSDL documents -->
536
      <copy todir="${build.home}/classes">
537
         <fileset dir="${src.home}" includes="**/*.xml **/*.wsdl" />
538
      </copy>
539
      
540
      <!-- Copy ehcache production config file into classpath -->
541
      <copy file="${cfg.home}/ehcache.xml"
542
            tofile="${build.home}/classes/ehcache.xml" />   
543

    
544
      <!-- Copy SQL scripts from src to equivalent location in build -->
545
      <copy todir="${build.home}/classes">
546
         <fileset dir="${src.home}" includes="**/*.sql" />
547
      </copy>
548

    
549
      <!-- Copy name_map.cache file to root of build -->
550
      <copy file="${basedir}/name_map.cache" failonerror="false" todir="${build.home}/classes" />
551

    
552
      <!-- Copy p2j.cfg.xml* from src to equivalent location in build -->
553
      <copy todir="${build.home}/classes/cfg">
554
         <fileset dir="${cfg.home}" includes="p2j.cfg.xml* registry.xml" />
555
      </copy>
556

    
557
      <!-- Copy data/ from src to equivalent location in build -->
558
      <copy todir="${build.home}/classes/${data.rel}">
559
         <fileset dir="${cvt.home}/${data.rel}" includes="*.dict" />
560
         <fileset dir="${cvt.home}/${data.rel}" includes="*.p2o" />
561
      </copy>
562

    
563
      <!-- copy the DDL so we can build the DB from the application jar -->
564
      <copy todir="${build.home}/classes/ddl">
565
         <fileset dir="ddl" />
566
      </copy>
567
   </target>
568
   
569
   <!-- jar -->  
570
   <target name="jar"
571
           depends="check.fwd.dir,compile"
572
           description="Compiles and Jars the converted application Java source code.  Does NOT convert or deploy." >
573
      <jar jarfile="${build.home}/lib/${appname}.jar"
574
           basedir="${build.home}/classes"
575
           excludes="**/*.template"
576
           includes="**/${pkgroot}/**
577
                     dir_schema_ext.xml
578
                     ehcache.xml
579
                     *.jasper
580
                     **.xml
581
                     cfg/**
582
                     ${data.rel}/**
583
                     **/*.wrx
584
                     **/*.png
585
                     **/*.jpg
586
                     **/*.gif
587
                     **/*.bmp
588
                     **/*.ico
589
                     app/**
590
                     ddl/**"
591
           manifest="${manifest.dir}/${appname}.mf"
592
           zip64Mode="as-needed"
593
           index="true"   />
594
   </target>      
595

    
596
   <!-- zip-hints -->
597
   <target name="zip-hints" description="Creates a zip archive with all the .hints files in the abl/ and data/ folders." >
598
      <delete file="${appname}_hints.zip"/>
599
      <zip destfile="${appname}_hints.zip"
600
           basedir="."
601
           includes="abl/**/*.hints" />
602
      <zip destfile="${appname}_hints.zip"
603
           basedir="."
604
           includes="data/**/*.hints" 
605
           update="true"/>
606
   </target>
607

    
608
   <!-- Archiving targets to build zip files -->
609
   <target name="archive" depends="archive.prepare, archive.deploy, archive.debug, archive.incremental, archive.dumps" 
610
           description="Perform all the archive tasks"/>
611

    
612
   <!-- Prepare the properties that will be used. Make sure the setup_version.sh runs first. -->
613
   <target name="archive.prepare">
614
      <!-- Setup the version.properties -->
615
      <exec executable="./setup_version.sh" dir="." failonerror="true" osfamily="unix">
616
         <arg value="-no"/>
617
      </exec>
618

    
619
      <exec executable="pwsh" dir="." failonerror="true" osfamily="windows">
620
         <arg value="-ExecutionPolicy"/>
621
         <arg value="Bypass"/>
622
         <arg value="-File"/>
623
         <arg value="setup_version.ps1"/>
624
         <arg value="-n"/>
625
         <arg value="-o"/>
626
      </exec>
627

    
628
      <property file="version.properties"/>
629

    
630
      <echo>Using this version info:</echo>
631
      <echo>  App type: ${app_type}</echo>
632
      <echo>  App project revision: ${app_rev}</echo>
633
      <echo>  Conversion date: ${app_date}</echo>
634
      <echo>  FWD conversion version: ${fwd_branch}-${fwd_rev}</echo>
635
   </target>
636

    
637
   <!-- gather the artifacts for deployment -->
638
   <target name="archive.deploy" depends="archive.prepare"
639
           description="Create an archive with the application jars and other files required for deployment on other systems.">
640
      <mkdir dir="${dist.home}/"/>
641
      <property name="archive.dist_destfile"
642
                value="${dist.home}/${projname}_deploy_${app_rev}_${fwd_branch}-${fwd_rev}_${app_date}.zip" />
643
      <zip destfile="${archive.dist_destfile}" >
644
         <zipfileset dir="${basedir}" 
645
                     excludes="**/*.sh **/*.zip **/*.so **/*.log"
646
                     includes="build/lib/**
647
                               ddl/**
648
                               ${data.rel}/*.df
649
                               ${cvt.rel}/${data.rel}/*.dict
650
                               ${cvt.rel}/${data.rel}/*.p2o
651
                               cfg/*.xml
652
                               deploy/client/**
653
                               deploy/server/**
654
                               *.xml
655
                               *.properties" />
656
         <zipfileset dir="${basedir}"
657
                     filemode="755" 
658
                     includes="deploy/client/*.sh
659
                               deploy/server/*.sh
660
                               deploy/*.sh
661
                               install_spawner.sh" />
662
      </zip>
663
      <chmod file="${archive.dist_destfile}" perm="755"/>
664
   </target>
665

    
666
   <!-- gather some helpful artifacts for debugging -->
667
   <target name="archive.debug" depends="archive.prepare"
668
           description="Create an archive with the artifacts helpful for debugging.">
669
      <mkdir dir="${dist.home}/"/>
670
      <property name="archive.debug_destfile"
671
                value="${dist.home}/${projname}_debug_${app_rev}_${fwd_branch}-${fwd_rev}_${app_date}.zip" />
672
      <zip destfile="${archive.debug_destfile}"
673
           basedir="${basedir}" 
674
           excludes="cfg/registry.xml"
675
           includes="src/com/**
676
                     abl/WebHelp/**
677
                     abl/**/*.ico
678
                     abl/**/*.wrx
679
                     abl/**/*.cache
680
                     abl/**/*.pphints
681
                     *.log" />
682
      <chmod file="${archive.debug_destfile}" perm="755"/>
683
   </target>
684

    
685
   <!-- gather artifacts for incremental builds -->
686
   <target name="archive.incremental" depends="archive.prepare"
687
           description="Create an archive with the artifacts necessary for an incremental build.">
688
      <mkdir dir="${dist.home}/"/>
689
      <property name="archive.incremental_destfile"
690
                value="${dist.home}/${projname}_incremental_${app_rev}_${fwd_branch}-${fwd_rev}_${app_date}.zip" />
691
      <zip destfile="${archive.incremental_destfile}"
692
           basedir="${basedir}" 
693
           excludes="cfg/registry.xml"
694
           includes="${cvt.rel}/cvtdb/
695
                     src/**
696
                     ddl/**
697
                     *.txt
698
                     abl/wsa/**
699
                     abl/**/*.p2o
700
                     abl/**/*.dict
701
                     abl/**/*.ast
702
                     abl/**/*.jast
703
                     abl/**/*.schema" />
704
      <chmod file="${archive.incremental_destfile}" perm="755"/>
705
   </target>
706

    
707
   <target name="archive.dumps" depends="archive.prepare"
708
           description="Create an archive with the dumps for testing." >
709
      <echo message="Creating dump archives"/> 
710
      <mkdir dir="${dist.home}/"/>
711
      <property name="archive.dumps_destfile"
712
                value="${dist.home}/${projname}_dumps_${app_rev}_${fwd_branch}-${fwd_rev}_${app_date}.zip" />
713
      <zip destfile="${archive.dumps_destfile}"
714
           basedir="${basedir}" 
715
           includes="${data.rel}/dump/**/*" />
716
      <chmod file="${archive.dumps_destfile}" perm="755"/>
717
   </target>
718

    
719
   <!-- deploy the application jars and database, not FWD -->
720
   <target name="deployapp"
721
           depends="clean, convert, convert.zset, jar, deployapp.prepare"
722
           description="Convert, compile the converted Java sources, create jars, deploys the jars (not FWD).  Does NOT create/import the database." >
723
   </target>
724
   
725
   <!-- deploy the application jars and database, not FWD -->
726
   <target name="deployapp.all"
727
           depends="deployapp, import.db"
728
           description="Convert, compile the converted Java sources, create jars, deploys the jars (not FWD) and creates/imports the database." >
729
   </target>
730
   
731
   <!-- deploy the application jars, but NOT database -->
732
   <target name="deploy"
733
           depends="clean, convert, convert.zset, jar, deploy.prepare"
734
           description="Convert, compile the converted Java sources, create jars, deploys the jars.  Does NOT create/import the database." >
735
   </target>
736
   
737
   <!-- deploy the application jars AND database -->
738
   <target name="deploy.all"
739
           depends="deploy, import.db "
740
           description="Convert, compile the converted Java sources, create jars, deploys the jars and creates/imports the database." >
741
   </target>
742
   
743
   <target name="rpt.dist" depends="archive.prepare"
744
           description="Create an archive with the files required for deployment or reports on other systems.">
745
      <mkdir dir="${dist.home}/"/>
746
      <property name="archive.reports_destfile"
747
                value="${dist.home}/${projname}_reports_${app_rev}_${fwd_branch}-${fwd_rev}_${app_date}.zip" />
748
      <zip destfile="${archive.reports_destfile}" >
749
         <zipfileset dir="${basedir}" 
750
                     excludes="**/*.zip **/*.so"
751
                     includes="deploy/server/report.sh
752
                               abl/**
753
                               cfg/*
754
                               rpt/*
755
                               rptdb/*
756
                               callgraph/*"
757
                     filemode="755" />
758
      </zip>
759
   </target>
760

    
761
   <target name="deploy.dist" description="Create an archive with the application jars and other files required for deployment on other systems.">
762
      <mkdir dir="${dist.home}/"/>
763
      <zip destfile="${dist.home}/${appname}_deploy_${DSTAMP}.zip" >
764
         <zipfileset dir="${basedir}" 
765
                     excludes="**/*.sh **/*.zip **/*.so"
766
                     includes="build/lib/**
767
                               ddl/**
768
                               data/*.df
769
                               data/dump/**
770
                               data/**/*.dict
771
                               data/**/*.p2o
772
                               cfg/*.xml
773
                               deploy/lib/**
774
                               deploy/client/**
775
                               deploy/server/**
776
                               *.xml
777
                               *.properties" />
778
         <zipfileset dir="${basedir}" 
779
                     filemode="755" 
780
                     includes="docker/*.sh
781
                               deploy/*.sh
782
                               deploy/client/*.sh
783
                               deploy/server/*.sh" />
784
      </zip>
785
      <chmod file="${archive.dist_destfile}" perm="755"/>
786
   </target>
787

    
788
   <target name="deploy.prepare" depends="prepare.embedded,deployapp.prepare"
789
           description="Deploys the FWD *and* generated jars by copying them to the location expected by the runtime scripts." >
790
     
791
      <!-- Copy external jars -->
792
      <copy todir="${deploy.home}/lib">
793
        <!--  exclude the AspectJ tools -->
794
        <fileset dir="${fwd.lib.home}" excludes="aspectjtools.jar,fwdspi.jar"/>
795
      </copy>
796
   </target>
797

    
798
   <!-- deploy the application jars, NOT FWD -->
799
   <target name="deployapp.prepare" depends="deployapp.prepare.java8,deployapp.prepare.java11"
800
           description="Deploys the generated jars for the application (not FWD) by copying them to the location expected by the runtime scripts." >
801
           
802
      <!-- copy the required jars to the distribution directory -->
803
      <copy file="${build.home}/lib/${appname}.jar" todir="${deploy.home}/lib"/>      
804
   </target>
805
   <target name="deployapp.prepare.java8" unless="java_11_spi"
806
           description="Deploys the FWD *and* generated jars by copying them to the location expected by the runtime scripts, Java 8 version." >
807
           
808
      <!-- create the deploy lib folder -->
809
      <delete dir="${deploy.home}/lib" />
810
      <mkdir dir="${deploy.home}/lib"/>
811

    
812
      <!-- create and populate the extension lib folder -->
813
      <mkdir dir="${deploy.home}/lib/spi"/>
814
      <copy file="${fwd.lib.home}/fwdspi.jar" todir="${deploy.home}/lib/spi/"/>
815
   </target>
816
   <target name="deployapp.prepare.java11" if="java_11_spi"
817
           description="Deploys the FWD *and* generated jars by copying them to the location expected by the runtime scripts for Java 11+" >
818

    
819
      <!-- create the deploy lib folder -->
820
      <delete dir="${deploy.home}/lib" />
821
      <mkdir dir="${deploy.home}/lib"/>
822
      <copy file="${fwd.lib.home}/fwdspi.jar" todir="${deploy.home}/lib/"/>
823
   </target>
824

    
825
   <target name="distapp" depends="deployapp.all" description="Does a deployapp.all and then tars the result." >
826
      <mkdir dir="${dist.home}"/>
827
      <tar destfile="${dist.home}/${appname}-${DSTAMP}.tar" basedir="${deploy.home}" />
828
   </target>
829
   
830
   <target name="dist" depends="deploy.all" description="Does a deploy.all and then tars the result." >
831
      <mkdir dir="${dist.home}"/>
832
      <tar destfile="${dist.home}/${appname}-${DSTAMP}.tar" basedir="${deploy.home}" />
833
   </target>
834
   
835
   <target name="dist.abl" depends="init" description="Create a zip archive with the files needed to run the sample on OpenEdge" >
836
      <mkdir dir="${dist.home}/"/>
837
      <zip destfile="${dist.home}/${appname}-abl-${DSTAMP}.zip" basedir="${basedir}" 
838
           includes="abldb/
839
                     *.bat
840
                     *.ini
841
                     *.pf
842
                     start_*_abl.sh
843
                     start_*_abl.cmd
844
                     abl/**/*
845
                     data/*.df
846
                     data/dump/**/*.d"/>
847
   </target>
848
   
849
   <target name="check.fwd.dir" depends="dir.check" unless="dir.exists">
850
      <echo>"${fwd.home}/p2j directory is missing."</echo>
851
      <fail message="Build failed: Please add a link to the FWD directory location."/>
852
   </target>
853

    
854
   <target name="clean" depends="clean.convert, clean.build, clean.dist" description="Remove all clean.build, clean.convert, clean.dist files." />
855

    
856
   <target name="clean.build" description="Remove all built files from the conversion process." >
857
      <delete includeemptydirs="true" failonerror="false">
858
         <fileset dir="${build.home}">
859
            <include name="**/*"/>
860
            <exclude name="ant.contrib/**"/>
861
         </fileset>
862
      </delete>
863

    
864
      <delete dir="${deploy.home}/spawner"/>
865
      <delete dir="${deploy.home}/lib" />
866
      <delete>
867
         <fileset dir="${deploy.home}/client/" includes="**/*.log" />
868
      </delete>
869
      <delete>
870
         <fileset dir="${deploy.home}/server/" includes="**/*.log" />
871
      </delete>
872
      <delete dir="${dist.home}"/>
873
   </target>
874

    
875
   <!-- Delete embedded 4GL files created by pre-processing of HTML files -->
876
   <target name="clean-e4gl" description="Clean files with the /*E4GL-W*/ or /*E4GL-I*/ markers (exclude ADE and possenet)">
877
      <exec executable="sh" failonerror="true" osfamily="unix">
878
         <arg value="-c" />
879
         <arg value="find ${app.4gl.src} -type f -name '*.w' ${e4gl-noclean} -exec grep -l ${e4gl.pattern} {} \; -exec rm -f {} +" />
880
      </exec>
881

    
882
      <exec executable="powershell" failonerror="true" osfamily="windows">
883
         <arg value="-Command"/>
884
         <arg value="Get-ChildItem -Path '${app.4gl.src}' -Filter '*.w' -Recurse | Select-String -Pattern ${e4gl-ps1.pattern} | ForEach-Object { Remove-Item $_.Path -Force }"/>
885
      </exec>
886
   </target>
887
   
888
   <target name="clean.convert" depends="clean-e4gl" description="Remove all generated files from the conversion process." >
889
      <delete includeemptydirs="true" failonerror="false">
890
         <fileset dir="${basedir}/src"
891
            includes="**/*"
892
            excludes="text-metrics.xml
893
                      font-metrics-ext.xml" /> 
894
      </delete>
895
      <!-- only delete the src dir if it is empty -->
896
      <delete includeemptydirs="true" failonerror="false">
897
        <fileset dir="${src.home}" excludes="**/*" />
898
      </delete>
899
      <delete dir="${cvt.home}"/>
900
      <delete dir="${basedir}/ddl"/>
901
      <delete dir="${basedir}/local"/>
902
      <delete dir="${basedir}/com"/>
903
      <delete dir="${basedir}/lib"/>
904
      <delete dir="${basedir}/rptdb"/>
905
      <delete>
906
         <fileset dir="${app.4gl.src}" 
907
                  includes="**/*.pphints 
908
                            **/*.cache
909
                            **/*.lexer 
910
                            **/*.parser 
911
                            **/*.ast
912
                            **/*.ast.original
913
                            **/*.jast 
914
                            **/*.dict
915
                            **/*.p2o
916
                            **/*.schema
917
                            **/*.log" />
918
      </delete>
919
      <delete failonerror="false">
920
         <fileset dir="${basedir}/data/namespace" includes="*.dict *.p2o *.schema" />
921
      </delete>
922
      <delete failonerror="false">
923
         <fileset dir="${basedir}" includes="schema_names*.rpt *.log" />
924
      </delete>
925
      <delete file="ui_strings.txt"/>
926
      <delete file="orphan-frames.dat"/>
927
      <delete file="schema-triggers.xml"/>
928
      <delete file="internal_procedures.xml"/>
929
      <delete file="name_map.cache"/>
930
      <delete file="file_sys.xml"/>
931
      <delete file="name_map.xml"/>
932
      <delete file="function_return_types.xml"/>
933
      <delete file="duplicate_function_return_types.xml"/>
934
      <delete file="cfg/registry.xml"/>
935
      <delete file="unindexed_queries.txt"/>
936
      <delete file="unused_database_indices.txt"/>
937
      <delete file="indeterminate_sort_queries.csv" />
938
      <delete file="unreferenced_database_fields.txt" />
939
      <delete file="unused_database_indices.txt" />
940
     </target>
941
   
942
   <!-- delete the ${build} and ${dist} directory trees -->
943
   <target name="clean.dist" description="Remove the distribution (docs and tar files) directories." >
944
      <delete dir="${dist.home}"/>
945
   </target>   
946
   
947
   <target name="dir.check">
948
      <condition property="dir.exists">
949
         <available file="${fwd.home}/p2j" type="dir"/>
950
      </condition>
951
   </target>
952

    
953
   <!-- delete the ${rpt.home} directory trees -->
954
   <target name="clean.rpt" description="Remove generated reports directory.">
955
      <delete dir="${rpt.home}" /> 
956
   </target>
957
   
958
   <!-- delete the ${cg.home} directory trees -->
959
   <target name="clean.cg" description="Remove generated call graph.">
960
      <delete dir="${cg.home}" /> 
961
      <delete file="callgraph.graphml" /> 
962
   </target>
963
   
964
   <!-- Remove all traces of conversion, import or execution of the result (generated files, logs, imported dbs). -->
965
   <target name="clean.all"
966
           depends="clean, clean.build, clean.db, clean.rpt, clean.cg"
967
           description="Remove all traces of conversion, reporting, callgraph analysis, import or execution of the result (generated files, logs, imported dbs)." >
968
   </target>
969
   
970
   <target name="clean.db" description="Drop all databases."
971
           depends="clean.db.h2, clean.db.pg, clean.db.mariadb" />
972

    
973
   <target name="create.db" depends="create.db.h2, create.db.pg, create.db.mariadb"
974
           description="Create empty database instance for all enabled database types." />
975
   
976
   <target name="import.db" depends="import.db.h2, import.db.pg, import.db.mariadb"
977
           description="Create empty database instance and import data for all enabled database types." />
978

    
979
   <target name="export.db" depends="export.db.h2, export.db.pg, export.db.mariadb"
980
           description="Export data for all enabled database types into .d files." />
981

    
982
   <target name="db.task" depends="init-ant-contrib">
983
      <if>
984
         <available file="${fwd.lib.home}/spi/fwdspi.jar" />
985
         <then>
986
            <property name="db.spi.lib" value="${fwd.lib.home}/spi" />
987
         </then>
988
         <else>
989
            <property name="db.spi.lib" value="${deploy.home}/lib/spi" />
990
         </else>
991
      </if>
992
      <for list="${db.names}" param="db.name">
993
         <sequential>
994
            <var name="db.sql.name" value="@{db.name}" />
995
            <if>
996
               <isset property="db.sql.@{db.name}"  />
997
               <then>
998
                  <var name="db.sql.name" value="${db.sql.@{db.name}}" />
999
               </then>
1000
            </if>
1001
            <ant antfile="build_db.xml" inheritRefs="true" target="${db.task}">
1002
               <property name="db.name" value="@{db.name}"/>
1003
               <property name="db.sql.name" value="${db.sql.name}"/>
1004
            </ant>
1005
         </sequential>
1006
      </for>
1007
   </target>
1008

    
1009
   <!-- drop the H2 database by deleting the ${db.home} directory -->
1010
   <target name="clean.db.h2" description="Remove generated database directory." if="${db.h2}">
1011
      <antcall target="db.task" inheritRefs="true">
1012
         <param name="db.task" value="clean.db.h2"/>
1013
      </antcall>
1014
   </target>
1015

    
1016
   <target name="create.db.h2" depends="check.fwd.dir, init, clean.db.h2"
1017
           description="Creates an empty H2 database instance using the DDL generated during conversion."
1018
           if="${db.h2}">
1019
      <antcall target="db.task" inheritRefs="true">
1020
         <param name="db.task" value="create.db.h2"/>
1021
      </antcall>
1022
   </target>
1023
   
1024
   <target name="import.db.h2" depends="create.db.h2"
1025
           description="Import data (.d files) into database."
1026
           if="${db.h2}">
1027
      <antcall target="db.task" inheritRefs="true">
1028
         <param name="db.task" value="import.db.h2"/>
1029
      </antcall>
1030
   </target>
1031

    
1032
   <target name="export.db.h2" depends="check.fwd.dir, init, setup-package-name"
1033
           description="Export data from H2 database into (.d files) ."
1034
           if="${db.h2}">
1035
      <antcall target="db.task" inheritRefs="true">
1036
         <param name="db.task" value="export.db.h2"/>
1037
      </antcall>
1038
   </target>
1039

    
1040
   <!-- drop the PostgreSQL database -->
1041
   <target name="clean.db.pg" description="Drop PostgreSQL database." if="${db.postgresql}">
1042
      <antcall target="db.task" inheritRefs="true">
1043
         <param name="db.task" value="clean.db.pg"/>
1044
      </antcall>
1045
   </target>
1046
   
1047
   <target name="create.db.pg" depends="check.fwd.dir, init, clean.db.pg"
1048
           description="Create an empty PostgreSQL database instance using the DDL generated during conversion."
1049
           if="${db.postgresql}">
1050
      <antcall target="db.task" inheritRefs="true">
1051
         <param name="db.task" value="create.db.pg"/>
1052
      </antcall>
1053
   </target>
1054
   
1055
   <target name="import.db.pg" depends="create.db.pg"
1056
           description="Import data (.d files) into PostgreSQL database."
1057
           if="${db.postgresql}">
1058
      <antcall target="db.task" inheritRefs="true">
1059
         <param name="db.task" value="import.db.pg"/>
1060
      </antcall>
1061
   </target>
1062

    
1063
   <target name="export.db.pg" depends="check.fwd.dir, init, setup-package-name"
1064
           description="Export data from PostgreSQL database into (.d files) ."
1065
           if="${db.postgresql}">
1066
      <antcall target="db.task" inheritRefs="true">
1067
         <param name="db.task" value="export.db.pg"/>
1068
      </antcall>
1069
   </target>
1070
   
1071
   <!-- drop the MariaDb database -->
1072
   <target name="clean.db.mariadb" description="Drop MariaDb database." if="${db.mariadb}">
1073
      <antcall target="db.task" inheritRefs="true">
1074
         <param name="db.task" value="clean.db.mariadb"/>
1075
      </antcall>
1076
   </target>
1077
   
1078
   <target name="create.db.mariadb" depends="check.fwd.dir, init, clean.db.mariadb"
1079
           description="Create an empty MariaDb database instance using the DDL generated during conversion."
1080
           if="${db.mariadb}">
1081
      <antcall target="db.task" inheritRefs="true">
1082
         <param name="db.task" value="create.db.mariadb"/>
1083
      </antcall>
1084
   </target>
1085
   
1086
   <target name="import.db.mariadb" depends="create.db.mariadb"
1087
           description="Import data (.d files) into MariaDb database."
1088
           if="${db.mariadb}">
1089
      <antcall target="db.task" inheritRefs="true">
1090
         <param name="db.task" value="import.db.mariadb"/>
1091
      </antcall>
1092
   </target>
1093

    
1094
   <target name="export.db.mariadb" depends="check.fwd.dir, init, setup-package-name"
1095
           description="Export data from MariaDb database into (.d files) ."
1096
           if="${db.mariadb}">
1097
      <antcall target="db.task" inheritRefs="true">
1098
         <param name="db.task" value="export.db.mariadb"/>
1099
      </antcall>
1100
   </target>
1101

    
1102
   <target name="setup-package-name" depends="init-ant-contrib">
1103
      <!-- Convert slashes to dots -->
1104
      <propertyregex 
1105
         property="pkgroot.dot" 
1106
         input="${pkgroot}" 
1107
         regexp="/" 
1108
         replace="." />
1109
   </target>
1110
</project>