Repository navigation
Expand file tree
/
Copy pathbuild.xml
More file actions
747 lines (650 loc) · 27.3 KB
/
Copy pathbuild.xml
File metadata and controls
747 lines (650 loc) · 27.3 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
<project name="magellan"
default="distribute_install4j"
xmlns:if="ant:if"
xmlns:unless="ant:unless">
<description>
This is the ANT compile script for magellan. This script helps you
to compile a distributable version of magellan.
Please call one of the following public targets:
- distribute
- print_version
- run_tests
- test_and_distribute
- javadoc (not implemented yet)
</description>
<property environment="env" />
<property name="VERSION.MAJOR" value="2" />
<property name="VERSION.MINOR" value="1" />
<property name="VERSION.SUB" value="0" />
<!-- possible values include stable, rc, and betaX -->
<property name="VERSION.POST" value=".rc" />
<property name="VERSION.POINTED"
value="${VERSION.MAJOR}.${VERSION.MINOR}.${VERSION.SUB}" />
<!-- Some properties -->
<property name="src.library" location="${basedir}/src-library" />
<property name="src.client" location="${basedir}/src-client" />
<property name="src.plugins" location="${basedir}/src-plugins" />
<property name="src.test" location="${basedir}/src-test" />
<property name="classes" location="${basedir}/classes" />
<property name="help" location="${basedir}/help" />
<property name="etc" location="${basedir}/etc" />
<property name="doc" location="${basedir}/doc" />
<property name="javadoc.api" location="${basedir}/doc/api" />
<property name="lib" location="${basedir}/lib" />
<property name="lib_internal" location="${basedir}/lib/internal" />
<property name="bin" location="${basedir}/bin" />
<property name="release" location="${basedir}/release" />
<property name="sandbox" location="${basedir}/sandbox" />
<property name="installer" location="${basedir}/installer" />
<property name="install4j" location="${basedir}/installer/install4j" />
<property name="macos" location="${basedir}/macos" />
<property name="MAGELLAN.NAME" value="Magellan 2" />
<property name="MAGELLAN.SHORTNAME" value="Magellan" />
<property name="MAGELLAN.DEVELOPER" value="Magellan Development Team" />
<property name="MAGELLAN.WEBSITE" value="https://magellan2.github.io" />
<property name="MAGELLAN.UPDATE_URL" value="https://github.com/magellan2/magellan2/releases/download/v2.1-latest/updates.xml" />
<property name="MAGELLAN.LAUNCHER" value="magellan_launcher" />
<property name="junit.output.dir" value="${basedir}/test/junit" />
<!-- Compile Settings -->
<property name="debug" value="on" />
<property name="optimize" value="off" />
<!-- -release includes -source -target -bootclasspath -->
<property name="compile.release" value="11" />
<property name="compile.encoding" value="ISO-8859-1" />
<!-- If you choose "true", then at least you know that your build classpath will include the Ant runtime. If you choose "false" then you are accepting the fact that the build behavior will change between older versions and 1.8+. -->
<presetdef name="my-javac">
<javac includeantruntime="false" encoding="${compile.encoding}" />
</presetdef>
<path id="magellan.class.path">
<pathelement path="${java.class.path}/" />
<fileset dir="${lib}">
<include name="**/*.jar" />
<exclude name="internal/*" />
<exclude name="javadocking.jar" />
</fileset>
<pathelement location="installer/install4j/install4j9.0.4/resource/i4jruntime.jar" />
<pathelement location="${release}/magellan-library.jar" />
<pathelement location="${release}/magellan-client.jar" />
</path>
<path id="magellan.class.path.test">
<pathelement path="${java.class.path}/" />
<fileset dir="${lib}">
<include name="**/*.jar" />
<exclude name="internal/*" />
<exclude name="javadocking.jar" />
</fileset>
<pathelement location="${lib_internal}/junit-4.13.jar" />
<pathelement location="${lib_internal}/hamcrest-core-1.3.jar" />
<pathelement location="${classes}" />
</path>
<target name="update_version">
<property file=".build.number" />
<property name="VERSION.FULL"
value="${VERSION.POINTED}-${build.number}${VERSION.POST}" />
<property name="VERSION.COMPAT"
value="${VERSION.POINTED} (build ${build.number})" />
<copy file="${etc}/VERSION.template"
tofile="${release}/etc/VERSION"
overwrite="yes">
<filterset>
<filter token="VERSION" value="${VERSION.COMPAT}" />
<filter token="SEMANTIC_VERSION" value="${VERSION.FULL}" />
</filterset>
</copy>
<copy file="${release}/etc/VERSION"
tofile="${basedir}/VERSION"
overwrite="yes" />
</target>
<target name="print_version" depends="update_version">
<echo message="${VERSION.FULL}" />
</target>
<!-- *************************************************************** -->
<!-- * * -->
<!-- * This target compiles and packs the magellan library. * -->
<!-- * * -->
<!-- *************************************************************** -->
<target name="build_library">
<echo message="Compiling Library..." />
<mkdir dir="${classes}" />
<my-javac srcdir="${src.library}/"
destdir="${classes}"
includes="**"
release="${compile.release}"
encoding="${compile.encoding}"
optimize="${optimize}"
fork="true"
memoryInitialSize="128m"
memoryMaximumSize="256m"
debug="${debug}">
<!--<compilerarg value="-Xlint:unchecked"/>-->
<!--<compilerarg value="-Xlint:deprecation"/>-->
<classpath refid="magellan.class.path" />
</my-javac>
</target>
<target name="build_library_jar">
<echo message="Building Magellan Library JAR file" />
<!-- delete old library -->
<delete file="${release}/magellan-library.jar" failonerror="false" />
<!-- JAR File erzeugen -->
<jar jarfile="${release}/magellan-library.jar"
basedir="${classes}"
includes="magellan/library/**">
<manifest>
<attribute name="Built-By" value="${user.name}" />
<attribute name="Specification-Title"
value="Magellan Library [build ${build.number}]" />
<attribute name="Specification-Vendor"
value="Magellan Development Team" />
</manifest>
</jar>
</target>
<!-- *************************************************************** -->
<!-- * * -->
<!-- * This target compiles and packs the magellan client. * -->
<!-- * * -->
<!-- *************************************************************** -->
<target name="build_client">
<echo message="Compiling Client..." />
<mkdir dir="${classes}" />
<my-javac srcdir="${src.client}/magellan"
destdir="${classes}"
includes="**"
release="${compile.release}"
encoding="${compile.encoding}"
optimize="${optimize}"
fork="true"
memoryInitialSize="128m"
memoryMaximumSize="256m"
debug="${debug}">
<!--<compilerarg value="-Xlint:unchecked"/>-->
<!--<compilerarg value="-Xlint:deprecation"/>-->
<classpath refid="magellan.class.path" />
</my-javac>
</target>
<target name="build_client_jar">
<echo message="Building Magellan Client JAR file" />
<!-- delete old library -->
<delete file="${release}/magellan-client.jar" failonerror="false" />
<copy file="${etc}/manifest.mf.template"
tofile="${etc}/manifest.mf"
overwrite="yes">
<filterset>
<filter token="VERSION" value="${VERSION.FULL}" />
<filter token="BUILD" value="${build.number}" />
<filter token="USER" value="${user.name}" />
</filterset>
</copy>
<!-- JAR File erzeugen -->
<jar jarfile="${release}/magellan-client.jar"
basedir="${classes}"
includes="magellan/client/**"
manifest="${etc}/manifest.mf" />
<delete file="${etc}/manifest.mf" failonerror="false" />
</target>
<!-- *************************************************************** -->
<!-- * * -->
<!-- * This target compiles and packs the magellan plugin. * -->
<!-- * * -->
<!-- *************************************************************** -->
<target name="build_plugins">
<echo message="Compiling PlugIns..." />
<mkdir dir="${classes}" />
<my-javac srcdir="${src.plugins}/magellan"
destdir="${classes}"
includes="**"
release="${compile.release}"
encoding="${compile.encoding}"
optimize="${optimize}"
fork="true"
memoryInitialSize="128m"
memoryMaximumSize="256m"
debug="${debug}">
<!--<compilerarg value="-Xlint:unchecked"/>-->
<!--<compilerarg value="-Xlint:deprecation"/>-->
<classpath refid="magellan.class.path" />
</my-javac>
</target>
<target name="build_plugins_jar">
<echo message="Building Magellan PlugIns JAR file" />
<!-- delete old library -->
<delete file="${release}/magellan-plugins.jar" failonerror="false" />
<!-- JAR File erzeugen -->
<jar jarfile="${release}/magellan-plugins.jar"
basedir="${classes}"
includes="magellan/plugin/**">
<manifest>
<attribute name="Built-By" value="${user.name}" />
<attribute name="Specification-Title"
value="Magellan PlugIns [build ${build.number}]" />
<attribute name="Specification-Vendor"
value="Magellan Development Team" />
</manifest>
</jar>
</target>
<!-- *************************************************************** -->
<!-- * * -->
<!-- * This target compiles and packs the magellan help files. * -->
<!-- * * -->
<!-- *************************************************************** -->
<target name="build_help">
<echo message="Building Magellan Help JAR file" />
<antcall target="index_help">
<param name="help.lang" value="de" />
</antcall>
<antcall target="index_help">
<param name="help.lang" value="en" />
</antcall>
<!-- delete old library -->
<delete file="${release}/magellan-help.jar" failonerror="false" />
<!-- JAR File erzeugen -->
<jar jarfile="${release}/magellan-help.jar"
manifest="${help}/META-INF/MANIFEST.MF">
<fileset dir="${help}" />
</jar>
</target>
<target name="index_help">
<echo message="indexing help for '${help.lang}'" />
<fileset id="help.set"
dir="${help}/${help.lang}"
casesensitive="yes">
<include name="**/*.html" />
</fileset>
<pathconvert refid="help.set"
property="help.files"
pathsep="' '">
<map from="${help}/${help.lang}/" to="" />
</pathconvert>
<java classname="com.sun.java.help.search.Indexer"
dir="${help}/${help.lang}"
fork="true"
failonerror="true"
maxmemory="512m">
<arg line="'${help.files}'" />
<classpath>
<pathelement location="${lib}/javahelp-2.0.05.jar" />
</classpath>
</java>
</target>
<!-- *************************************************************** -->
<!-- * * -->
<!-- * This target compiles and packs the magellan library. * -->
<!-- * * -->
<!-- *************************************************************** -->
<target name="build_test" unless="${quick_mode}">
<echo message="Compiling tests..." />
<mkdir dir="${classes}" />
<my-javac srcdir="${src.test}/"
destdir="${classes}"
includes="**"
release="${compile.release}"
encoding="${compile.encoding}"
optimize="${optimize}"
fork="true"
memoryInitialSize="128m"
memoryMaximumSize="256m"
debug="${debug}">
<!--<compilerarg value="-Xlint:unchecked"/>-->
<!--<compilerarg value="-Xlint:deprecation"/>-->
<classpath refid="magellan.class.path.test" />
</my-javac>
</target>
<!-- *************************************************************** -->
<!-- * * -->
<!-- * * -->
<!-- * * -->
<!-- *************************************************************** -->
<target name="copy_release_data">
<echo message="Copying application data to ${release}..." />
<mkdir dir="${release}/lib" />
<copy todir="${release}/lib" overwrite="true">
<fileset dir="${lib}">
<include name="**" />
<exclude name="internal/*" />
<exclude name="javadocking.jar" />
</fileset>
</copy>
<mkdir dir="${release}/doc" />
<copy todir="${release}/doc" overwrite="true">
<fileset dir="${doc}">
<include name="**" />
</fileset>
</copy>
<mkdir dir="${release}/etc" />
<copy todir="${release}/etc" overwrite="true">
<fileset dir="${etc}">
<include name="*.properties" />
<include name="*.ini" />
</fileset>
</copy>
<mkdir dir="${release}/etc/images" />
<copy todir="${release}/etc/images" overwrite="true">
<fileset dir="${etc}/images">
<include name="**" />
</fileset>
</copy>
<mkdir dir="${release}/etc/rules" />
<copy todir="${release}/etc/rules" overwrite="true">
<fileset dir="${etc}/rules">
<include name="**" />
</fileset>
</copy>
<mkdir dir="${release}/etc/plugins" />
<copy todir="${release}/etc/plugins" overwrite="true">
<fileset dir="${etc}/plugins">
<include name="**" />
</fileset>
</copy>
<mkdir dir="${release}/plugins" />
<echo file="${release}/plugins/README.txt" append="false">
This folder contains external plugins. Do not delete...Thanks.
</echo>
<copy todir="${release}/" overwrite="true">
<fileset dir="${basedir}">
<include name="CHANGELOG.txt" />
<include name="COPYING.txt" />
<include name="LICENSE.txt" />
<include name="README.md" />
<include name="RELEASENOTES.txt" />
</fileset>
<fileset dir="${installer}">
<include name="*.bat" />
<include name="*.sh" />
</fileset>
</copy>
</target>
<!-- *************************************************************** -->
<!-- * * -->
<!-- * This target runs all the unit tests * -->
<!-- * * -->
<!-- *************************************************************** -->
<target name="run_tests"
description="This target runs the unit tests."
depends="update_version, build_library, build_client, build_plugins, build_test"
unless="${quick_mode}">
<mkdir dir="${junit.output.dir}" />
<echo message="Running all unit tests" />
<junit fork="yes"
failureProperty="test.failure"
printsummary="withOutAndErr">
<test name="magellan.test.AFirstTest" todir="${junit.output.dir}" />
<classpath refid="magellan.class.path.test" />
</junit>
<junit fork="yes"
failureProperty="test.failure"
haltonfailure="true"
printsummary="withOutAndErr">
<batchtest todir="${junit.output.dir}">
<!-- E3CommandParser is not part of the release -->
<fileset dir="${src.test}"
includes="**/*Test.java"
excludes="**/E3CommandParserTest.java" />
</batchtest>
<formatter type="brief" usefile="true" />
<classpath refid="magellan.class.path.test" />
</junit>
<delete includeEmptyDirs="true" failonerror="false">
<fileset dir="${basedir}">
<filename name="default????*/**" />
</fileset>
</delete>
<fail message="test failed" if="test.failure" />
</target>
<target name="increase_build_number">
<buildnumber file=".build.number" />
<echo message="increased build number to ${build.number}" />
</target>
<target name="prepare_build"
depends="clear-all, increase_build_number, update_version">
</target>
<target name="zip_release">
<echo message="Creating ZIP Distribution" />
<delete file="${basedir}/magellan_v${VERSION.FULL}.zip"
failonerror="false" />
<zip destfile="${basedir}/magellan_v${VERSION.FULL}.zip">
<fileset dir="${release}" includes="**" />
</zip>
</target>
<target name="build_jar_and_distribute"
depends="build_library_jar, build_client_jar, build_plugins_jar, build_help, copy_release_data">
<copy file="${installer}/izpack-install.template.xml"
tofile="${installer}/izpack-install.xml"
encoding="${compile.encoding}"
overwrite="yes">
<filterset>
<filter token="VERSION" value="${VERSION.FULL}" />
<filter token="BUILD" value="${build.number}" />
<filter token="USER" value="${user.name}" />
</filterset>
</copy>
<!-- izpack 4.3.5 -->
<java jar="${installer}/izpack/standalone-compiler.jar"
fork="true"
failonerror="true">
<arg value="${installer}/izpack-install.xml" />
<arg value="-b" />
<arg value="." />
<arg value="-o" />
<arg value="magellan_v${VERSION.FULL}.jar" />
<arg value="-k" />
<arg value="standard" />
<classpath>
<pathelement path="${java.class.path}/" />
<fileset dir="${installer}/izpack/">
<include name="**/*.jar" />
</fileset>
</classpath>
</java>
<!-- izpack 5.1
<java classname="com.izforge.izpack.compiler.bootstrap.CompilerLauncher" maxmemory="512M" fork="true" failonerror="true">
<jvmarg value="-Dizpack.home=${installer}/IzPack-5.1" />
<arg value="-b" />
<arg value="." />
<arg value="-o" />
<arg value="magellan_v${VERSION.FULL}.jar" />
<arg value="-k" />
<arg value="standard" />
<arg value="-h" />
<arg value="${installer}/IzPack-5.1" />
<arg value="${installer}/izpack-install-5.1.xml" />
<classpath>
<pathelement path="${java.class.path}/" />
<fileset dir="${installer}/IzPack-5.1/lib">
<include name="**/*.jar" />
</fileset>
</classpath>
</java>
-->
<antcall target="zip_release" />
<echo message="Creating MacOS Distribution" />
<delete file="${basedir}/magellan_v${VERSION.FULL}_macos.zip"
failonerror="false" />
<mkdir dir="${macos}/Magellan.app" />
<mkdir dir="${macos}/Magellan.app" />
<mkdir dir="${macos}/Magellan.app/Contents" />
<copy file="${installer}/macos/PkgInfo"
todir="${macos}/Magellan.app/Contents/"
overwrite="yes" />
<copy file="${installer}/macos/Info.plist"
todir="${macos}/Magellan.app/Contents/"
overwrite="yes" />
<mkdir dir="${macos}/Magellan.app/Contents/MacOS" />
<copy file="${installer}/macos/JavaApplicationStub"
todir="${macos}/Magellan.app/Contents/MacOS/"
overwrite="yes" />
<chmod dir="${macos}/Magellan.app/Contents/MacOS"
perm="ugo+rx"
includes="**" />
<mkdir dir="${macos}/Magellan.app/Contents/Resources" />
<copy file="${installer}/macos/icon/Magellan.icns"
todir="${macos}/Magellan.app/Contents/Resources/"
overwrite="yes" />
<mkdir dir="${macos}/Magellan.app/Contents/Resources/Java" />
<copy todir="${macos}/Magellan.app/Contents/Resources/Java/"
overwrite="true">
<fileset dir="${release}/" includes="**" />
</copy>
</target>
<!-- *************************************************************** -->
<!-- * * -->
<!-- * This target compiles and packs the whole magellan app. * -->
<!-- * * -->
<!-- *************************************************************** -->
<target name="distribute"
description=" This target compiles, tests and packs the whole magellan application."
depends="prepare_build, run_tests, doc, build_jar_and_distribute">
<antcall target="clear-all" />
</target>
<!-- *************************************************************** -->
<!-- * * -->
<!-- * This target just compiles and packs. * -->
<!-- * * -->
<!-- *************************************************************** -->
<target name="quick_build"
description=" Quickly compile and pack."
depends="prepare_build, build_library, build_client, build_plugins, doc,
build_library_jar, build_client_jar, build_plugins_jar, build_help,
copy_release_data, zip_release">
<antcall target="clear-all" />
</target>
<!-- *************************************************************** -->
<!-- * * -->
<!-- * This target just compiles the whole magellan app. * -->
<!-- * * -->
<!-- *************************************************************** -->
<target name="distributeNoPack"
description=" This target just compiles the whole magellan application."
depends="prepare_build, build_library, build_client, build_plugins, build_help, doc, copy_release_data">
<copy file="${installer}/izpack-install.template.xml"
tofile="${installer}/izpack-install.xml"
encoding="${compile.encoding}"
overwrite="yes">
<filterset>
<filter token="VERSION" value="${VERSION.FULL}" />
<filter token="BUILD" value="${build.number}" />
<filter token="USER" value="${user.name}" />
</filterset>
</copy>
<java jar="${installer}/izpack/standalone-compiler.jar"
fork="true"
failonerror="true">
<arg value="${installer}/izpack-install.xml" />
<arg value="-b" />
<arg value="." />
<arg value="-o" />
<arg value="magellan_v${VERSION.FULL}.jar" />
<arg value="-k" />
<arg value="standard" />
<classpath>
<pathelement path="${java.class.path}/" />
<fileset dir="${installer}/izpack/">
<include name="**/*.jar" />
</fileset>
</classpath>
</java>
</target>
<!-- *************************************************************** -->
<!-- * CREATE JAVADOC * -->
<!-- *************************************************************** -->
<target name="doc" description="==> Creates the JavaDocs" unless="${quick_mode}">
<echo message="Running JavaDoc" />
<jar jarfile="magellan-src.jar"
basedir="${basedir}"
includes="**/*.java">
<manifest>
<attribute name="Built-By" value="${user.name}" />
<attribute name="Specification-Title"
value="Magellan Sources [build ${build.number}]" />
<attribute name="Specification-Vendor"
value="Magellan Development Team" />
</manifest>
</jar>
<javadoc encoding="${compile.encoding}"
packagenames="magellan.*"
destdir="${javadoc.api}"
author="true"
version="false"
use="true"
private="false"
windowtitle="Magellan ${VERSION.POINTED}"
doctitle="Magellan ${VERSION.POINTED}"
maxmemory="256M"
useexternalfile="Yes"
locale="de_DE">
<classpath refid="magellan.class.path" />
<link href="https://docs.oracle.com/en/java/javase/11/docs/api" />
<fileset dir="${basedir}">
<include name="**/*.java" />
<!-- src-test causes javadoc to crash. Could have something to do with this: http://forums.sun.com/thread.jspa?threadID=5333060&tstart=0
if you need javadoc for src-test, please investigate! -->
<exclude name="src-test/**" />
<exclude name="installer/**" />
</fileset>
</javadoc>
</target>
<!-- *************************************************************** -->
<!-- * CLEAR CLASSES * -->
<!-- *************************************************************** -->
<target name="clear-directory">
<!-- cleaning classes directory by creating&deleting and creating it -->
<echo message="Cleaning ${dir} folder" />
<mkdir dir="${dir}" />
<delete includeEmptyDirs="true" failonerror="false">
<fileset dir="${dir}" includes="**" />
</delete>
<mkdir dir="${dir}" />
</target>
<!-- *************************************************************** -->
<!-- * CLEAR ALL * -->
<!-- *************************************************************** -->
<target name="clear-all" unless="${quick_mode}">
<antcall target="clear-directory">
<param name="dir" value="${classes}" />
</antcall>
<antcall target="clear-directory">
<param name="dir" value="${release}" />
</antcall>
<antcall target="clear-directory">
<param name="dir" value="${macos}" />
</antcall>
<echo message="Cleaning default" />
<delete includeEmptyDirs="true" failonerror="false">
<fileset dir="${basedir}" includes="default-??????*/**" />
<fileset dir="${basedir}" includes="default??????*/**" />
</delete>
</target>
<taskdef name="install4j"
classname="com.install4j.Install4JTask"
classpath="${install4j}/install4j9.0.4/bin/ant.jar" />
<target name="checkinstall4j" >
<fail unless:set="env.INSTALL4J_KEY" message="INSTALL4J_KEY not set; run export INSTALL4J_KEY=L..."/>
<fail unless:set="build.number" message="build.number not defined"/>
</target>
<target name="installer4j" depends="prepare_build, checkinstall4j">
<install4j projectFile="${install4j}/magellan2.install4j"
buildIds="28,29,30"
license="${env.INSTALL4J_KEY}">
<variable name="version.major" value="${VERSION.MAJOR}" />
<variable name="version.minor" value="${VERSION.MINOR}" />
<variable name="version.sub" value="${VERSION.SUB}" />
<variable name="version.build" value="${build.number}" />
<variable name="version.post" value="${VERSION.POST}" />
<variable name="magellan.name" value="${MAGELLAN.NAME}" />
<variable name="magellan.shortname" value="${MAGELLAN.SHORTNAME}" />
<variable name="magellan.launcher" value="${MAGELLAN.LAUNCHER}" />
<variable name="magellan.developer" value="${MAGELLAN.DEVELOPER}" />
<variable name="magellan.website" value="${MAGELLAN.WEBSITE}" />
<variable name="java.version.min" value="${compile.release}" />
<variable name="magellan.update_url" value="${MAGELLAN.UPDATE_URL}" />
</install4j>
<move todir="." overwrite="true">
<fileset dir="${install4j}">
<include name="Magellan_installer*" />
</fileset>
</move>
</target>
<target name="distribute_install4j"
description=" This target compiles, tests and packs the whole magellan application."
depends="prepare_build, checkinstall4j, run_tests, doc, build_library_jar, build_client_jar, build_plugins_jar, build_help, copy_release_data, installer4j, zip_release">
<antcall target="clear-all"/>
</target>
</project>