forked from TMSWhite/Dialogix_1.x
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.xml
1157 lines (932 loc) · 44.3 KB
/
build.xml
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
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<!-- A "project" describes a set of targets that may be requested
when Ant is executed. The "default" attribute defines the
target which is executed if no specific target is requested,
and the "basedir" attribute defines the current working directory
from which Ant executes the requested task. This is normally
set to the current working directory.
-->
<project name="dialogix" default="compile" basedir=".">
<!-- ===================== Property Definitions =========================== -->
<!--
Each of the following properties are used in the build script.t
Values for these properties are set by the first place they are
defined, from the following list:
* Definitions on the "ant" command line (ant -Dtomcat.home=xyz compile)
* Definitions from a "build.properties" file in the top level
source directory
* Definitions from a "build.properties" file in the developer's
home directory
* Default definitions in this build.xml file
You will note below that property values can be composed based on the
contents of previously defined properties. This is a powerful technique
that helps you minimize the number of changes required when your development
environment is modified. Note that property composition is allowed within
"build.properties" files as well as in the "build.xml" script.
-->
<!-- ==================== File and Directory Names ======================== -->
<!--
These properties generally define file and directory names (or paths) that
affect where the build process stores its outputs.
app.name Base name of this application, used to
construct filenames and directories.
Defaults to "myapp".
app.version Version identifier for this application.
build.home The directory into which the "prepare" and
"compile" targets will generate their output.
Defaults to "build".
tomcat.home The directory in which you have installed
a binary distribution of Tomcat 4. This will
be used by the "deploy" target.
deploy.home The name of the directory into which the
deployment hierarchy will be created, and into
which the build directory will be copied.
Defaults to "${tomcat.home}/webapps/${app.name}".
dist.home The name of the base directory in which
distribution files are created.
Defaults to "dist".
tomcat.version The version of tomcat to use: tomcat_3_2_x, tomcat_3_3_x, tomcat_4_0_x, tomcat_4_1_x
they all have different directory structures for bin, lib, and conf
-->
<property file="build.properties" />
<property file="${build.license_file}" />
<!-- Static properties - Do not change these -->
<property name="dialogix.version_major" value="2.9"/>
<property name="dialogix.version_minor" value="9.3.5"/>
<property name="tomcat.home" value="/${zip.basedir}"/>
<property name="dialogix.dir" value="${tomcat.home}/webapps/"/>
<property name="win98.desktop" value="Windows/Desktop"/>
<property name="win2000.desktop" value="Documents and Settings/All Users/Desktop"/>
<property name="app.name" value="dialogix"/>
<property name="build.home" value="build"/>
<property name="deploy.home" value="${tomcat.home}/webapps/"/>
<property name="dist.home" value="dist"/>
<property name="app.version" value="${dialogix.version_major}.${dialogix.version_minor}"/>
<!-- Note that .basedir must not include initial /, else zip file doesn't match it -->
<!--
<property name="tomcat.version" value="3.2"/>
<property name="tomcat.home" value="/usr/local/dialogix"/>
<property name="zip.basedir" value="usr/local/dialogix" />
<property name="cvs.basedir" value="cvs2/Dialogix" />
<property name="dialogix.dir" value="${tomcat.home}/webapps/"/>
<property name="floppy.dir" value="../archive/" />
<property name="compile.target" value="1.2"/>
-->
<!-- ==================== Compilation Control Options ==================== -->
<!--
These properties control option settings on the Javac compiler when it
is invoked using the <javac> task.
compile.debug Should compilation include the debug option?
compile.deprecation Should compilation include the deprecation option?
compile.optimize Should compilation include the optimize option?
-->
<property name="compile.debug" value="true"/>
<property name="compile.deprecation" value="false"/>
<property name="compile.optimize" value="true"/>
<!--
<property name="build.compiler" value="jikes"/>
-->
<!-- ==================== External Dependencies =========================== -->
<!--
Use property values to define the locations of external JAR files on which
your application will depend. In general, these values will be used for
two purposes:
* Inclusion on the classpath that is passed to the Javac compiler
* Being copied into the "/WEB-INF/lib" directory during execution
of the "deploy" target.
Because we will automatically include all of the Java classes that Tomcat 4
exposes to web applications, we will not need to explicitly list any of those
dependencies. You only need to worry about external dependencies for JAR
files that you are going to include inside your "/WEB-INF/lib" directory.
-->
<!-- ==================== Compilation Classpath =========================== -->
<!--
Rather than relying on the CLASSPATH environment variable, Ant includes
features that makes it easy to dynamically construct the classpath you
need for each compilation. The example below constructs the compile
classpath to include the servlet.jar file, as well as the other components
that Tomcat makes available to web applications automatically, plus anything
that you explicitly added.
-->
<path id="compile.classpath">
<!-- Include all JAR files that will be included in /WEB-INF/lib -->
<fileset dir="src/tomcat_4_1_x/common/lib">
<include name="*.jar" if="using.tomcat_4_1"/>
</fileset>
<!-- these are for Tomcat 4.0 -->
<fileset dir="src/tomcat_4_0_x/common/lib">
<include name="*.jar" if="using.tomcat_4_0"/>
</fileset>
<!-- these are for Tomcat 3.3 -->
<fileset dir="src/tomcat_3_3_x/lib/common">
<include name="*.jar" if="using.tomcat_3_3"/>
</fileset>
<fileset dir="src/tomcat_3_3_x/lib/apps">
<include name="*.jar" if="using.tomcat_3_3"/>
</fileset>
<!-- these are for Tomcat 3.2 -->
<fileset dir="src/tomcat_3_2_x/lib">
<include name="*.jar" if="using.tomcat_3_2"/>
</fileset>
<!-- these are used for all -->
<fileset dir="src/share-lib">
<include name="*.jar"/>
</fileset>
</path>
<!-- ==================== All Target ====================================== -->
<!--
The "all" target is a shortcut for running the "clean" target followed
by the "compile" target, to force a complete recompile.
-->
<target name="all" depends="clean,compile,deploy"
description="Clean build and dist, then compile and deploy"/>
<!-- ==================== Clean Target ==================================== -->
<!--
The "clean" target deletes any previous "build" and "dist" directory,
so that you can be ensured the application can be built from scratch.
-->
<target name="clean"
description="Delete old build and dist directories">
<delete dir="${build.home}"/>
<delete dir="${deploy.home}"/>
<delete dir="${tomcat.home}"/>
<delete dir="/Dialogix"/>
</target>
<!-- ==================== Compile Target ================================== -->
<!--
The "compile" target transforms source files (from your "src" directory)
into object files in the appropriate location in the build directory.
This example assumes that you will be including your classes in an
unpacked directory hierarchy under "/WEB-INF/classes".
-->
<target name="compile" depends="prepare"
description="Compile Java sources">
<!-- remove source files, since always re-parsed -->
<copy todir="${build.home}/src/" filtering="true">
<fileset dir="src/share">
<include name="**/*.java" />
</fileset>
<filterset begintoken="@@" endtoken="@@">
<filter token="DIALOGIX.AUTHORABLE" value="${dialogix.authorable}"/>
<filter token="DIALOGIX.DEPLOYABLE" value="${dialogix.deployable}"/>
<filter token="DIALOGIX.WEB_SERVER" value="${dialogix.web_server}"/>
<filter token="DIALOGIX.XML" value="${dialogix.xml}"/>
<filter token="DIALOGIX.VERSION_MAJOR" value="${dialogix.version_major}"/>
<filter token="DIALOGIX.VERSION_MINOR" value="${dialogix.version_minor}"/>
<filter token="LICENSE.STUDY_ALIAS" value="${LICENSE.STUDY_ALIAS}"/>
<filter token="LICENSE.STUDY_NAME" value="${LICENSE.STUDY_NAME}"/>
<filter token="LICENSE.STUDY_ICON" value="${LICENSE.STUDY_ICON}"/>
<filter token="LICENSE.PRINCIPAL_INVESTIGATOR" value="${LICENSE.PRINCIPAL_INVESTIGATOR}"/>
<filter token="LICENSE.GRANT_NAME" value="${LICENSE.GRANT_NAME}"/>
<filter token="LICENSE.GRANT_TITLE" value="${LICENSE.GRANT_TITLE}"/>
<filter token="SUPPORT.PHONE" value="${SUPPORT.PHONE}"/>
<filter token="SUPPORT.EMAIL" value="${SUPPORT.EMAIL}"/>
<filter token="SUPPORT.PERSON" value="${SUPPORT.PERSON}"/>
<filter token="DIALOGIX.DB_FOR_LOGIN" value="${dialogix.db_for_login}"/>
<filter token="DIALOGIX.DB_TRACK_LOGINS" value="${dialogix.db_track_logins}"/>
<filter token="DIALOGIX.DB_LOG_RESULTS" value="${dialogix.db_log_results}"/>
</filterset>
</copy>
<!-- By default, copy the JDK1.1 compatible files -->
<copy todir="${build.home}/src/">
<fileset dir="src/jdk11">
<include name="**/*.java" if="jdk11.present" />
</fileset>
</copy>
<!-- Then, overwrite them with the JDK1.2 compatible files -->
<copy todir="${build.home}/src/">
<fileset dir="src/jdk12">
<include name="**/*.java" if="jdk12.present" />
</fileset>
</copy>
<mkdir dir="${build.home}/classes"/>
<javac srcdir="${build.home}/src"
destdir="${build.home}/classes"
debug="${compile.debug}"
deprecation="${compile.deprecation}"
optimize="${compile.optimize}"
compiler="modern"
source="1.3"
target="${compile.target}">
<classpath refid="compile.classpath"/>
</javac>
<!-- Copy associated resource files -->
<copy todir="${build.home}/classes">
<fileset dir="src/share" includes="**/*.properties"/>
</copy>
<copy todir="${build.home}/xml">
<fileset dir="xml" />
</copy>
<!--
<copy todir="${build.home}/perl">
<fileset dir="perl" />
</copy>
-->
</target>
<!-- ==================== Deploy Target =================================== -->
<!--
The "deploy" target copies the contents of the build directory into a
location required by our servlet container, and picks up any external
dependencies along the way. AFter restarting the servlet container, you
can now test your web application.
-->
<target name="deploy" depends="compile"
description="Deploy application to servlet container">
<mkdir dir="${deploy.home}"/>
<mkdir dir="${tomcat.home}"/>
<!-- copy tomcat specific files to the appropriate target locations -->
<copy todir="${tomcat.home}/archive">
<fileset dir="src/archive" includes="**"/>
</copy>
<copy todir="${tomcat.home}/logs">
<fileset dir="src/logs" includes="**"/>
</copy>
<!-- Copy the contents of the build directory -->
<copy toDir="${deploy.home}/" filtering="true">
<fileset dir="${build.home}/web">
<include name="ROOT/**/web.xml"/>
<include name="images/**/web.xml"/>
<include name="${LICENSE.PACKAGE_DIR}/**/web.xml"/>
</fileset>
<filterset begintoken="@@" endtoken="@@">
<filter token="DIALOGIX.DIR" value="${dialogix.dir}"/>
<filter token="FLOPPY.DIR" value="${floppy.dir}"/>
<filter token="TOMCAT.HOME" value="${tomcat.home}"/>
<filter token="DB.COMMENT_START" value="${DB.COMMENT_START}"/>
<filter token="DB.COMMENT_END" value="${DB.COMMENT_END}"/>
</filterset>
</copy>
<!-- allow customization of htm(l) and jsp pages - especially for switching between SSL and regular access -->
<copy toDir="${deploy.home}/" filtering="true">
<fileset dir="${build.home}/web">
<include name="${LICENSE.PACKAGE_DIR}/*.htm"/>
<include name="${LICENSE.PACKAGE_DIR}/*.html"/>
<include name="${LICENSE.PACKAGE_DIR}/*.jsp"/>
</fileset>
<filterset begintoken="@@" endtoken="@@">
<filter token="HTTP.PORT" value="${http.port}"/>
<filter token="HTTPS.PORT" value="${https.port}"/>
<filter token="DEPLOY.HOSTNAME" value="${deploy.hostname}"/>
<filter token="DIALOGIX.VERSION" value="${app.version}"/>
</filterset>
</copy>
<copy toDir="${deploy.home}/" >
<fileset dir="${build.home}/web" >
<include name="ROOT/**"/>
<include name="images/**"/>
<include name="${LICENSE.PACKAGE_DIR}/**"/>
<exclude name="**/web.xml"/>
</fileset>
</copy>
<!-- copy the server.xml files, converting the port values as needed -->
<copy toDir="${tomcat.home}/conf" filtering="true">
<fileset dir="src/tomcat_3_2_x/conf">
<include name="server.xml" if="using.tomcat_3_2"/>
</fileset>
<fileset dir="src/tomcat_3_3_x/conf">
<include name="server.xml" if="using.tomcat_3_3"/>
</fileset>
<fileset dir="src/tomcat_4_0_x/conf">
<include name="server.xml" if="using.tomcat_4_0"/>
</fileset>
<fileset dir="src/tomcat_4_1_x/conf">
<include name="server.xml" if="using.tomcat_4_1"/>
</fileset>
<filterset begintoken="@@" endtoken="@@">
<filter token="HTTP.PORT" value="${http.port}"/>
<filter token="HTTPS.PORT" value="${https.port}"/>
<filter token="AJP12.PORT" value="${ajp12.port}"/>
<filter token="AJP13.PORT" value="${ajp13.port}"/>
<filter token="SSL.COMMENT_START" value="${SSL.COMMENT_START}"/>
<filter token="SSL.COMMENT_END" value="${SSL.COMMENT_END}"/>
<filter token="SSL.KEYSTORE" value="${SSL.KEYSTORE}"/>
<filter token="SSL.KEYPASS" value="${SSL.KEYPASS}"/>
<filter token="TOMCAT.HOME" value="${tomcat.home}"/>
<filter token="DB.COMMENT_START" value="${DB.COMMENT_START}"/>
<filter token="DB.COMMENT_END" value="${DB.COMMENT_END}"/>
</filterset>
</copy>
<!-- copy tomcat specific files to the appropriate target locations -->
<copy todir="${tomcat.home}/">
<fileset dir="src/tomcat_3_2_x">
<include name="**" if="using.tomcat_3_2"/>
</fileset>
<fileset dir="src/tomcat_3_3_x">
<include name="**" if="using.tomcat_3_3"/>
</fileset>
<fileset dir="src/tomcat_4_0_x">
<include name="**" if="using.tomcat_4_0"/>
</fileset>
<fileset dir="src/tomcat_4_1_x">
<include name="**" if="using.tomcat_4_1"/>
</fileset>
</copy>
<!-- Copy external dependencies as required -->
<!-- Tomcat 3.3 puts common jar files into /lib/app -->
<mkdir dir="${tomcat.home}/lib/apps"/>
<jar jarfile="${tomcat.home}/lib/apps/${app.name}.jar" whenempty="skip">
<fileset dir="${build.home}/classes">
<include name="**" if="using.tomcat_3_3"/>
</fileset>
</jar>
<!-- Copy shared libraries -->
<copy todir="${tomcat.home}/lib/apps">
<fileset dir="src/share-lib">
<include name="*.jar" if="using.tomcat_3_3"/>
</fileset>
</copy>
<copy todir="${tomcat.home}/lib">
<fileset dir="src/share-lib">
<include name="*.jar" if="using.tomcat_3_2"/>
<include name="*.jar" if="using.tomcat_4_0"/>
<include name="*.jar" if="using.tomcat_4_1"/>
</fileset>
</copy>
<!-- Make Tomcat-specific directories (so that build doesn't fail) - delete them later if empty -->
<mkdir dir="${tomcat.home}/lib/common"/> <!-- in case needed for Tomcat 3.3 -->
<mkdir dir="${tomcat.home}/common/lib"/> <!-- in case needed for Tomcat 4.0 -->
<!-- Copy ssl libraries -->
<copy todir="${tomcat.home}/lib/common">
<fileset dir="src/ssl-lib">
<include name="*.jar" if="using.tomcat_3_3.ssl"/>
</fileset>
</copy>
<copy todir="${tomcat.home}/lib">
<fileset dir="src/ssl-lib">
<include name="*.jar" if="using.tomcat_3_2.ssl"/>
</fileset>
</copy>
<copy todir="${tomcat.home}/common/lib">
<fileset dir="src/ssl-lib">
<include name="*.jar" if="using.tomcat_4_0.ssl"/>
<include name="*.jar" if="using.tomcat_4_1.ssl"/>
</fileset>
</copy>
<!-- delete dirs that are not pertinent to a given distro -->
<delete includeEmptyDirs="true">
<fileset dir="${tomcat.home}/lib/apps">
<include name="**" if="using.tomcat_3_2"/>
<include name="**" if="using.tomcat_4_0"/>
</fileset>
</delete>
<delete includeEmptyDirs="true">
<fileset dir="${tomcat.home}/common/lib">
<include name="**" if="using.tomcat_3_2"/>
<include name="**" if="using.tomcat_3_3"/>
</fileset>
</delete>
<!-- Tomcat 3.2 puts common jar files into /lib -->
<!-- Tomcat 4.0 puts common jar files into /lib -->
<jar jarfile="${tomcat.home}/lib/${app.name}.jar" whenempty="skip">
<fileset dir="${build.home}/classes">
<include name="**" if="using.tomcat_3_2"/>
<include name="**" if="using.tomcat_4_0"/>
</fileset>
</jar>
<!-- Tomcat 4.1 puts common jar files into /common/lib -->
<jar jarfile="${tomcat.home}/common/lib/${app.name}.jar" whenempty="skip">
<fileset dir="${build.home}/classes">
<include name="**" if="using.tomcat_4_1"/>
</fileset>
</jar>
<delete includeEmptyDirs="true">
<fileset dir="${tomcat.home}/lib/common">
<include name="**" if="using.tomcat_3_2"/>
<include name="**" if="using.tomcat_4_0"/>
</fileset>
</delete>
<delete includeEmptyDirs="true">
<fileset dir="${tomcat.home}/lib">
<include name="${app.name}.jar" if="using.tomcat_3_3"/>
<include name="**" if="using.tomcat_4_1"/>
</fileset>
</delete>
<!-- make Windows desktop links -->
<mkdir dir="/${win98.desktop}"/>
<copy todir="/${win98.desktop}/">
<fileset dir="src/Win98/Desktop">
<include name="**" if="using.win98"/>
</fileset>
</copy>
<mkdir dir="/${win2000.desktop}"/>
<copy todir="/${win2000.desktop}/">
<fileset dir="src/Win2000/Desktop">
<include name="**" if="using.win2000"/>
</fileset>
</copy>
<copy todir="${tomcat.home}" filtering="true">
<fileset dir="src">
<include name="License.txt" />
</fileset>
<filterset begintoken="@@" endtoken="@@">
<filter token="DIALOGIX.VERSION_MAJOR" value="${dialogix.version_major}"/>
<filter token="DIALOGIX.VERSION_MINOR" value="${dialogix.version_minor}"/>
<filter token="LICENSE.STUDY_ALIAS" value="${LICENSE.STUDY_ALIAS}"/>
<filter token="LICENSE.STUDY_NAME" value="${LICENSE.STUDY_NAME}"/>
<filter token="LICENSE.STUDY_ICON" value="${LICENSE.STUDY_ICON}"/>
<filter token="LICENSE.PRINCIPAL_INVESTIGATOR" value="${LICENSE.PRINCIPAL_INVESTIGATOR}"/>
<filter token="LICENSE.GRANT_NAME" value="${LICENSE.GRANT_NAME}"/>
<filter token="LICENSE.GRANT_TITLE" value="${LICENSE.GRANT_TITLE}"/>
</filterset>
</copy>
<copy todir="${tomcat.home}">
<fileset dir="src">
<include name="*.ico"/>
</fileset>
</copy>
<copy todir="${tomcat.home}">
<fileset dir="src/Win98">
<include name="*.pif" if="using.win98"/>
</fileset>
</copy>
<mkdir dir="/Dialogix/${LICENSE.STUDY_ALIAS}/perl"/>
<copy todir="/Dialogix/${LICENSE.STUDY_ALIAS}/perl" filtering="true">
<fileset dir="/${cvs.basedir}/perl">
<include name="dat2sas.pl" />
<include name="evt2sas.pl" />
<include name="sched2sas.pl" />
<include name="unjar.pl" />
<include name="validate_inst.pl" />
<include name="helptrans2.pl" />
<include name="webalize4.pl" />
<include name="checkDataFileVersion.pl" />
<include name="inst2xml.pl" />
<include name="showlogic.pl" />
<include name="Dialogix/Utils.pm" />
<include name="process_files.bat" />
<include name="_study.conf" />
<include name="README.txt" />
<include name="diff.exe" />
<include name="tidy.exe" />
</fileset>
<filterset begintoken="@@" endtoken="@@">
<filter token="LICENSE.STUDY_ALIAS" value="${LICENSE.STUDY_ALIAS}"/>
<filter token="LICENSE.STUDY_NAME" value="${LICENSE.STUDY_NAME}"/>
<filter token="LICENSE.STUDY_ICON" value="${LICENSE.STUDY_ICON}"/>
<filter token="LICENSE.PRINCIPAL_INVESTIGATOR" value="${LICENSE.PRINCIPAL_INVESTIGATOR}"/>
<filter token="LICENSE.PACKAGE_DIR" value="${LICENSE.PACKAGE_DIR}"/>
</filterset>
</copy>
<!--
<copy todir="${tomcat.home}/bin">
<fileset dir=".">
<include name="jikes.exe" if="using.win98" />
<include name="jikes.exe" if="using.win2000" />
</fileset>
</copy>
-->
<!-- Copy the custom keystores to the proper location -->
<copy todir="${tomcat.home}">
<fileset dir="./keystores">
<include name="*.keystore"/>
</fileset>
</copy>
<copy todir="${tomcat.home}" filtering="true">
<fileset dir="src">
<include name="dialogix.bat" />
<include name="README.txt" />
<include name="view_working_dir.bat" />
<include name="view_completed_dir.bat" />
</fileset>
<filterset begintoken="@@" endtoken="@@">
<filter token="DIALOGIX.START_DIR" value="${dialogix.start_dir}"/>
<filter token="DIALOGIX.VERSION_MAJOR" value="${dialogix.version_major}"/>
<filter token="DIALOGIX.VERSION_MINOR" value="${dialogix.version_minor}"/>
<filter token="LICENSE.STUDY_ALIAS" value="${LICENSE.STUDY_ALIAS}"/>
<filter token="LICENSE.STUDY_NAME" value="${LICENSE.STUDY_NAME}"/>
<filter token="LICENSE.STUDY_ICON" value="${LICENSE.STUDY_ICON}"/>
<filter token="LICENSE.PRINCIPAL_INVESTIGATOR" value="${LICENSE.PRINCIPAL_INVESTIGATOR}"/>
<filter token="LICENSE.GRANT_NAME" value="${LICENSE.GRANT_NAME}"/>
<filter token="LICENSE.GRANT_TITLE" value="${LICENSE.GRANT_TITLE}"/>
<filter token="DIALOGIX.HOME" value="${DIALOGIX.HOME}"/>
<filter token="LICENSE.PACKAGE_DIR" value="${LICENSE.PACKAGE_DIR}"/>
<filter token="ARCHIVE.DIR" value="${ARCHIVE.DIR}"/>
<filter token="ZIP.NAME" value="${zip.name}"/>
<filter token="WORKING.DIR" value="${WORKING.DIR}"/>
<filter token="COMPLETED.DIR" value="${COMPLETED.DIR}"/>
<filter token="HTTP.PORT" value="${http.port}"/>
<filter token="HTTPS.PORT" value="${https.port}"/>
<filter token="TOMCAT.HOME" value="${tomcat.home}"/>
</filterset>
</copy>
</target>
<!--
The "war" target creates the test WAR file for Dialogix
-->
<target name="war" depends="clean,remove,compile"
description="Create War application in catalina servlet container">
<!-- remove dependent files to ensure that rebuilds what is needed
<delete file="${build.home}/${LICENSE.PACKAGE_DIR}.war"/>
<delete file="${build.home}/lib/${app.name}_${app.version}-bin.jar"/>
<delete file="${build.home}/context.xml"/>
<delete file="${build.home}/web.xml"/>
-->
<!-- Make Jar file for Dialogix -->
<mkdir dir="${build.home}/lib"/>
<jar jarfile="${build.home}/lib/${app.name}_${app.version}-bin.jar">
<fileset dir="${build.home}/classes">
<include name="**"/>
</fileset>
</jar>
<!-- Copy master web.xml to the build directory -->
<copy filtering="true" file="src/war/dialogix-webxml.xml" tofile="${build.home}/web.xml">
<filterset begintoken="@@" endtoken="@@">
<filter token="DIALOGIX.DIR" value="${dialogix.dir}"/>
<filter token="FLOPPY.DIR" value="${floppy.dir}"/>
<filter token="CATALINA.DIR" value="${catalina.home}"/>
<filter token="DB.COMMENT_START" value="${DB.COMMENT_START}"/>
<filter token="DB.COMMENT_END" value="${DB.COMMENT_END}"/>
<filter token="SUPPORT.PHONE" value="${SUPPORT.PHONE}"/>
<filter token="SUPPORT.EMAIL" value="${SUPPORT.EMAIL}"/>
<filter token="SUPPORT.PERSON" value="${SUPPORT.PERSON}"/>
<filter token="LICENSE.STUDY_NAME" value="${LICENSE.STUDY_NAME}"/>
<filter token="LICENSE.STUDY_ICON" value="${LICENSE.STUDY_ICON}"/>
<filter token="LICENSE.PACKAGE_DIR" value="${dialogix.package_name}"/>
<filter token="REQUIRES.LOGIN" value="${REQUIRES.LOGIN}"/>
</filterset>
</copy>
<!-- Copy master context.xml to the build directory -->
<copy filtering="true" file="src/war/dialogix-context.xml" tofile="${build.home}/context.xml">
<filterset begintoken="@@" endtoken="@@">
<filter token="DB.COMMENT_START" value="${DB.COMMENT_START}"/>
<filter token="DB.COMMENT_END" value="${DB.COMMENT_END}"/>
<filter token="DB.HOST" value="${DB.HOST}"/>
<filter token="DB.PORT" value="${DB.PORT}"/>
<filter token="DB.NAME" value="${DB.NAME}"/>
<filter token="DB.USERNAME" value="${DB.USERNAME}"/>
<filter token="DB.PASSWORD" value="${DB.PASSWORD}"/>
</filterset>
</copy>
<copy filtering="true" file="src/war/index.htm" tofile="${build.home}/index.htm">
<filterset begintoken="@@" endtoken="@@">
<filter token="DIALOGIX.DIR" value="${dialogix.dir}"/>
<filter token="FLOPPY.DIR" value="${floppy.dir}"/>
<filter token="CATALINA.DIR" value="${catalina.home}"/>
<filter token="DB.COMMENT_START" value="${DB.COMMENT_START}"/>
<filter token="DB.COMMENT_END" value="${DB.COMMENT_END}"/>
<filter token="SUPPORT.PHONE" value="${SUPPORT.PHONE}"/>
<filter token="SUPPORT.EMAIL" value="${SUPPORT.EMAIL}"/>
<filter token="SUPPORT.PERSON" value="${SUPPORT.PERSON}"/>
<filter token="LICENSE.STUDY_NAME" value="${LICENSE.STUDY_NAME}"/>
<filter token="LICENSE.STUDY_ICON" value="${LICENSE.STUDY_ICON}"/>
<filter token="LICENSE.PACKAGE_DIR" value="${dialogix.package_name}"/>
<filter token="LICENSE.PRINCIPAL_INVESTIGATOR" value="${LICENSE.PRINCIPAL_INVESTIGATOR}"/>
<filter token="LICENSE.GRANT_NAME" value="${LICENSE.GRANT_NAME}"/>
<filter token="LICENSE.GRANT_TITLE" value="${LICENSE.GRANT_TITLE}"/>
</filterset>
</copy>
<mkdir dir="${build.home}/thirdpartylibs"/>
<copy toDir="${build.home}/thirdpartylibs">
<fileset file="${build.home}/lib/${app.name}_${app.version}-bin.jar"/>
<fileset file="src/share-lib/jakarta-oro-2.0.8.jar"/>
<fileset file="src/share-lib/mysql-connector-java-3.0.16-ga-bin.jar"/>
</copy>
<mkdir dir="${build.home}/flatweb/schedules"/>
<copy toDir="${build.home}/flatweb/schedules" flatten="true" preservelastmodified="true">
<fileset dir="${build.home}/web" includes="*/WEB-INF/schedules/*"/>
</copy>
<mkdir dir="${build.home}/flatweb/completed"/>
<copy toDir="${build.home}/flatweb/completed" flatten="true" preservelastmodified="true">
<fileset dir="${build.home}/web" includes="*/WEB-INF/completed/*"/>
</copy>
<mkdir dir="${build.home}/flatweb/working"/>
<copy toDir="${build.home}/flatweb/working" flatten="true" preservelastmodified="true">
<fileset dir="${build.home}/web" includes="*/WEB-INF/working/*"/>
</copy>
<war destfile="${build.home}/${dialogix.package_name}.war" webxml="${build.home}/web.xml" update="true">
<fileset dir="${build.home}/web">
<include name="images/*"/>
</fileset>
<fileset dir="${build.home}">
<include name="index.htm"/>
</fileset>
<lib dir="${build.home}/thirdpartylibs">
<include name="*.jar"/>
</lib>
<webinf dir="${build.home}/flatweb">
<include name="*/*.txt"/>
<include name="*/*.jar"/>
</webinf>
<metainf dir="${build.home}">
<include name="context.xml"/>
</metainf>
</war>
<copy toDir="${catalina.home}/webapps" file="${build.home}/${dialogix.package_name}.war"/>
</target>
<!-- ==================== Dist Target ===================================== -->
<!--
The "dist" target creates a binary distribution of your application
in a directory structure ready to be archived in a tar.gz or zip file.
Note that this target depends on two others:
* "deploy" so that the entire web application (including external
dependencies) will have been assembled
* "javadoc" so that the application Javadocs will have been created
-->
<target name="dist" depends="deploy,javadoc"
description="Create binary distribution">
<mkdir dir="${dist.home}"/>
<!-- Create application Zip file -->
<zip zipfile="${dist.home}/${zip.name}.zip"
basedir="/">
<include name="${zip.basedir}/**"/>
<include name="${win98.desktop}/Dialogix/**" if="using.win98"/>
<include name="${win2000.desktop}/Dialogix/**" if="using.win2000"/>
</zip>
<!-- Create INNO installer script -->
<mkdir dir="${dist.home}/${zip.name}"/>
<copy todir="${dist.home}/${zip.name}" filtering="true" flatten="true">
<fileset dir="src">
<include name="Win98/Dialogix-install-script.iss" if="using.win98"/>
<include name="Win2000/Dialogix-install-script.iss" if="using.win2000"/>
</fileset>
<filterset begintoken="@@" endtoken="@@">
<filter token="DIALOGIX.HOME" value="${DIALOGIX.HOME}"/>
<filter token="DIALOGIX.VERSION_MAJOR" value="${dialogix.version_major}"/>
<filter token="DIALOGIX.VERSION_MINOR" value="${dialogix.version_minor}"/>
<filter token="LICENSE.STUDY_ALIAS" value="${LICENSE.STUDY_ALIAS}"/>
<filter token="LICENSE.STUDY_NAME" value="${LICENSE.STUDY_NAME}"/>
<filter token="LICENSE.STUDY_ICON" value="${LICENSE.STUDY_ICON}"/>
<filter token="LICENSE.PRINCIPAL_INVESTIGATOR" value="${LICENSE.PRINCIPAL_INVESTIGATOR}"/>
<filter token="LICENSE.GRANT_NAME" value="${LICENSE.GRANT_NAME}"/>
<filter token="LICENSE.GRANT_TITLE" value="${LICENSE.GRANT_TITLE}"/>
</filterset>
</copy>
<move file="${dist.home}/${zip.name}/Dialogix-install-script.iss" tofile="${dist.home}/${zip.name}/${zip.name}-install-script.iss"/>
<!-- this is hard-coded to the default Inno Setup install directory -->
<exec dir="${dist.home}/${zip.name}" executable="C:\Program Files\Inno Setup 5\Compil32.exe" os="Windows 98,Windows 2000,Windows XP"
failonerror="true" timeout="60000">
<arg line="/cc ${zip.name}-install-script.iss"/>
</exec>
<move file="${dist.home}/${zip.name}/Output/setup.exe" tofile="${dist.home}/${zip.name}/${zip.name}.exe"/>
<delete dir="${dist.home}/${zip.name}/Output"/>
</target>
<target name="zip_dist" depends="deploy,javadoc"
description="Create binary distribution for Unix platforms">
<mkdir dir="${dist.home}"/>
<!-- Create application Zip file -->
<zip zipfile="${dist.home}/${zip.name}.zip"
basedir="/">
<include name="${zip.basedir}/archive/**"/>
<include name="${zip.basedir}/bin/**"/>
<include name="${zip.basedir}/conf/**"/>
<include name="${zip.basedir}/lib/**"/>
<include name="${zip.basedir}/webapps/${LICENSE.PACKAGE_DIR}/**"/>
<include name="${zip.basedir}/webapps/ROOT/**"/>
<include name="${zip.basedir}/webapps/images/**"/>
<include name="${win98.desktop}/Dialogix/**" if="using.win98"/>
<include name="${win2000.desktop}/Dialogix/**" if="using.win2000"/>
<include name="/Dialogix/${LICENSE.PACKAGE_DIR}/perl/**"/>
</zip>
</target>
<!-- ==================== Src Target ===================================== -->
<!--
The "src" target creates a jar of all of the source files for the package
-->
<target name="src" depends=""
description="Create src distribution">
<!-- backup project source -->
<mkdir dir="${dist.home}"/>
<jar jarfile="${dist.home}/${app.name}_${app.version}-src.jar" basedir="/">
<include name="${cvs.basedir}/**"/>
<exclude name="${cvs.basedir}/${build.home}/**"/>
<exclude name="${cvs.basedir}/${dist.home}/**"/>
</jar>
</target>
<!-- ==================== Javadoc Target ================================== -->
<!--
The "javadoc" target creates Javadoc API documentation for the Java
classes included in your application. Normally, this is only required
when preparing a distribution release, but is available as a separate
target in case the developer wants to create Javadocs independently.
-->
<target name="javadoc" depends="compile"
description="Create Javadoc API documentation">
<!--
<mkdir dir="${dist.home}/docs/api"/>
<javadoc sourcepath="src"
destdir="${dist.home}/docs/api"
packagenames="mypackage.*"/>
-->
</target>
<!-- ==================== Prepare Target ================================== -->
<!--
The "prepare" target is used to create the "build" destination directory,
and copy the static contents of your web application to it. If you need
to copy static files from external dependencies, you can customize the
contents of this task.
Normally, this task is executed indirectly when needed.
-->
<target name="prepare" depends="detect">
<!-- Create build directory and copy static content -->
<mkdir dir="${build.home}"/>
<mkdir dir="${build.home}/web"/>
<echo message="compile.target=${compile.target}"/>
<echo message="tomcat.home=${tomcat.home}"/>
<echo message="dialogix.dir=${dialogix.dir}"/>
<echo message="floppy.dir=${floppy.dir}"/>
<echo message="tomcat.version=${tomcat.version}"/>
<echo message="zip.basedir=${zip.basedir}"/>
<echo message="cvs.basedir=${cvs.basedir}"/>
<echo message="deploy.hostname=${deploy.hostname}"/>
<echo message="deploy.os=${deploy.os}"/>
<echo message="dialogix.authorable=${dialogix.authorable}"/>
<echo message="dialogix.deployable=${dialogix.deployable}"/>
<echo message="dialogix.web_server=${dialogix.web_server}"/>
<echo message="dialogix.version_major=${dialogix.version_major}"/>
<echo message="dialogix.version_minor=${dialogix.version_minor}"/>
<echo message="dialogix.xml=${dialogix.xml}"/>
<echo message="http.port=${http.port}"/>
<echo message="https.port=${https.port}"/>
<echo message="ajp12.port=${ajp12.port}"/>
<echo message="ajp13.port=${ajp13.port}"/>
<echo message="SSL.KEYSTORE=${SSL.KEYSTORE}"/>
<echo message="SUPPORT.PHONE=${SUPPORT.PHONE}"/>
<echo message="SUPPORT.EMAIL=${SUPPORT.EMAIL}"/>
<echo message="SUPPORT.PERSON=${SUPPORT.PERSON}"/>
<echo message="LICENSE.PACKAGE_DIR=${LICENSE.PACKAGE_DIR}"/>
<echo message="LICENSE.STUDY_ALIAS=${LICENSE.STUDY_ALIAS}"/>
<echo message="LICENSE.STUDY_NAME=${LICENSE.STUDY_NAME}"/>
<echo message="LICENSE.STUDY_ICON=${LICENSE.STUDY_ICON}"/>
<echo message="LICENSE.PRINCIPAL_INVESTIGATOR=${LICENSE.PRINCIPAL_INVESTIGATOR}"/>
<echo message="LICENSE.GRANT_NAME=${LICENSE.GRANT_NAME}"/>
<echo message="LICENSE.GRANT_TITLE=${LICENSE.GRANT_TITLE}"/>
<echo message="DIALOGIX.HOME=${DIALOGIX.HOME}"/>
<!-- Copy static files from external dependencies as needed -->
<copy toDir="${build.home}/web" >
<fileset dir="web" >
<include name="ROOT/**"/>
<include name="images/**"/>
<include name="${LICENSE.PACKAGE_DIR}/**"/>
</fileset>
</copy>
<copy toDir="${build.home}/web" >
<fileset dir="web-test" >
<include name="${LICENSE.PACKAGE_DIR}/**"/>
</fileset>
</copy>
</target>
<target name="detect">
<condition property="jdk12.present">
<and>
<available classname="java.security.PrivilegedAction"/>
<not>
<equals arg1="${compile.target}" arg2="1.1" />
</not>
</and>
</condition>
<condition property="jdk11.present">
<equals arg1="${compile.target}" arg2="1.1" />
</condition>
<condition property="using.tomcat_3_2">
<equals arg1="${tomcat.version}" arg2="3.2" />
</condition>
<condition property="using.tomcat_3_3">
<equals arg1="${tomcat.version}" arg2="3.3" />
</condition>
<condition property="using.tomcat_4_0">
<equals arg1="${tomcat.version}" arg2="4.0" />
</condition>
<condition property="using.tomcat_4_1">
<equals arg1="${tomcat.version}" arg2="4.1" />
</condition>
<!-- these address SSL needs-->
<condition property="dialogix.ssl_role" value="with_ssl">
<equals arg1="${SSL.USE}" arg2="true" />
</condition>
<condition property="dialogix.ssl_role" value="no_ssl">
<equals arg1="${SSL.USE}" arg2="false" />
</condition>
<condition property="SSL.COMMENT_START" value="<!--">
<equals arg1="${SSL.USE}" arg2="false" />
</condition>