-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.xml
2331 lines (2063 loc) · 91.8 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
<!--///////////////////////////////////////////////////////////////////////////
//
// JTOpen (IBM Toolbox for Java - OSS version)
//
// Filename: build.xml
//
// The source code contained herein is licensed under the IBM Public License
// Version 1.0, which has been approved by the Open Source Initiative.
// Copyright (C) 1997-2014 International Business Machines Corporation and
// others. All rights reserved.
//
///////////////////////////////////////////////////////////////////////////////
//
// Getting Started
//
//
// Pre-requisites:
// - JDK 1.4.1 (or JDK 1.5)
// - JDK 1.5 (for JTOpenLite)
// - JDK 1.6 (for java6 version)
// - JDK 1.8 (for java8 version)
// - Apache Ant 1.8
// - CVS client (to download source)
//
// 1. In this file, change the value of the "build" property to be the directory
// where you want the JTOpen files to be downloaded and built to. It
// defaults to "/jtopen_build" (which is C:\jtopen_build on Windows).
// If you are using the shipped source zip file, set build to where the files
// were unzipped.
// An alternative is to start ant using
// > ant -Dbuild=.
//
// 2. In this file, change the values of the "jdkXX" property to be the directory
// where the corresponding JDK is installed.
// An alternative is to start ant with something similar to
// > ant -Djdk14=/usr/local/java/java14 -Djdk15=/usr/local/java/java5
//
// 3. Make sure Ant is installed and in your CLASSPATH, and you are familiar
// with how to run builds using Ant.
// See http://ant.apache.org to download and read up on it.
// For those with less time on their hands, get the binary from:
// http://archive.apache.org/dist/ant/binaries/
// Once installed, add the ant.jar to your CLASSPATH.
// To run a build:
// java org.apache.tools.ant.Main target1 target2 target3 ...
// This assumes that a "build.xml" file (such as this one) exists in your
// current directory. Override this by using the -file flag.
//
// 4. In order to download the source, you need a CVS client installed and in
// your path. If you don't, Ant will not be able to automatically
// download the JTOpen source repository... you will have to do it by hand.
// Most distributions of Linux ship a 'cvs' client. See http://www.wincvs.org
// for a Windows version.
// (Make sure that cvs.exe is in your PATH when you run Ant.
// If you get an "access method is not installed on this system" error,
// try moving cvs.exe to a different directory than where build.xml is located.)
//
// To download the source, run the "source" target for this build.
// This will download the additional Ant tasks that are required,
// and set up the initial directory structure.
// Ironically, this file will get downloaded in his step... so if
// you're reading this, you've already done that, or you've just
// overwritten your own build.xml with this one. :)
//
// 5. Obtain the necessary include files from the list of requisite jars and
// place them in the "/jtopen_build/include" directory. Also obtain the
// necessary executables and place them in the "/jtopen_build/bin" directory.
// See below for these lists. Note that the "clean" target of this build
// does not remove anything in the "/jtopen_build/include" or
// "/jtopen_build/build" directories.
//
// 6. Add the "/jtopen_build/build" directory to your CLASSPATH. This is so
// the Ant build can pick up the tasks it needs to create the PCML files.
//
// 7. Run any of the targets in this file. To build JTOpen cleanly, it is
// suggested that you run it like this:
//
// java org.apache.tools.ant.Main clean clean-source source all
//
// If you do not want the source to be downloaded from CVS, then run it like this:
//
// java org.apache.tools.ant.Main clean all
//
// 8. Output files will appear in the "/jtopen_build/dist" directory, as well as
// "/jtopen_build/javadoc" and the various "/jtopen_build/output*" directories.
//
///////////////////////////////////////////////////////////////////////////////
//
// Requisite jars and packages
//
// The following is a list of jar files and the URLs from which they can be
// obtained. These jar files are required in order to build JTOpen. We cannot
// include these jar files in the JTOpen CVS repository due to licensing issues.
// These files needs to be placed in the /jtopen_build/include directory after
// they are downloaded.
//
// *** Required under JDK 1.4: ***
//
//
// Filename: servlet.jar
// Location: http://java.sun.com/products/servlet/archive.html
// Description: JSDK 2.1 Servlet APIs needed for the com.ibm.as400.util.servlet package.
// Extract the servlet.jar from the jsdk zip file after download.
// Note: As of July 2014, the latest servlet package (3.0) can be obtained from
// http://download.oracle.com/otndocs/jcp/servlet-3.0-fr-eval-oth-JSpec/.
// If you use this version, you will need to use JDK 15 instead of JDK 14
// for the compile, and also change the -target specification from 1.1 to 1.5.
//
// Filename: jui400.jar
// Location: http://jt400.sourceforge.net/
// Description: APIs needed for deprecated com.ibm.as400.vaccess package.
// Extract jui400.jar from the jtopen_X_X.zip file after download.
//
//
// .. The following jars are needed for the micro package, which since July 2014
// is no longer built or maintained.
//
// Filename: midpapi10.jar
// Location: http://java.sun.com/products/sjwtoolkit/
// Description: J2ME Wireless Toolkit MIDP APIs needed for the com.ibm.as400.micro package.
// Note: The J2ME Wireless Toolkit can only be installed on Windows or Linux.
// (The midpapi10.jar file can be found in C:\WTKxx\lib after the install, where "xx" is the J2ME WTK version number.)
//
//
// Filename: cldcapi10.jar
// Location: http://java.sun.com/products/sjwtoolkit/
// Description: J2ME Wireless Toolkit CLDC APIs needed for the com.ibm.as400.micro package.
// Note: The J2ME Wireless Toolkit can only be installed on Windows or Linux.
// (The cldcapi10.jar file can be found in C:\WTKxx\lib after the install, where "xx" is the J2ME WTK version number.)
//
///////////////////////////////////////////////////////////////////////////////
//
// Requisite executables
//
//
// Filename: cvs or cvs.exe
// Location: http://www.wincvs.org
// Description: Required to access the JTOpen CVS repository using the "source" target.
// This file must be in the PATH when this Ant script is run.
// It may need to be in a different directory than the build.xml file.
// Most versions of Linux already include a cvs executable.
// The location link is for Windows users to obtain a CVS client.
//
//
// .. The following executables are needed for the micro package, which since July 2014
// is no longer built or maintained.
//
// Filename: preverify or preverify.exe
// Location: http://java.sun.com/products/sjwtoolkit/
// Description: J2ME Wireless Toolkit preverification tool required to build the
// jt400Micro.jar. This file needs to be in the /jtopen_build/bin directory.
// Note: The J2ME Wireless Toolkit can only be installed on Windows or Linux.
// (The preverify.exe file can be found in C:\WTKxx\bin after the install, where "xx" is the J2ME WTK version number.)
//
//
// Filename: preverify1.1 or preverify1.1.exe
// Location: http://java.sun.com/products/sjwtoolkit/
// Description: J2ME Wireless Toolkit preverification tool required to build the
// jt400Micro.jar. This file needs to be in the /jtopen_build/bin directory.
// Note: The J2ME Wireless Toolkit can only be installed on Windows or Linux.
// (The preverify1.1.exe file can be found in C:\WTKxx\bin after the install, where "xx" is the J2ME WTK version number.)
//
///////////////////////////////////////////////////////////////////////////////
//
// Useful targets
//
// usage - This is the default. Prints information on available targets.
// all - Builds everything (compile, jar, zip, javadoc...),
// assuming the source has been downloaded.
// clean - Removes all built files and javadoc. Does not remove the /include
// or /build subdirectories. This target is not a pre-requisite for any other
// targets.
// clean-source - Removes the source. This target is not a pre-requisite for any other
// targets.
// source - Downloads the JTOpen repository files off of the IBM CVS server
// using an anonymous login. Internet connection required. This target
// is not a pre-requisite for any other targets.
// jar - Builds just the jars (and any pre-requisite targets, such as compile...).
// javadoc - Builds just the javadoc (assuming the source has been downloaded).
// micro - Builds just the jt400Micro.jar (including compiling and pre-verification).
// zip - Builds just the doc.zip and src.zip files, assuming the source has
// been downloaded and the javadoc has been built.
//
// Suggested build invocation:
//
// java org.apache.tools.ant.Main clean clean-source source all
//
// The resulting jar and zip files can be found in the "dist" subdirectory.
// The resulting class files can be found in the various "output" subdirectories.
// The resulting javadoc can be found in the "javadoc" subdirectory.
//
// Note: The xerces-4.0 target has been removed, since the JTOpen source code has been
// updated to use JAXP-compliant APIs.
//
// Note: The javadoc target can build the javadoc to the best of its ability. However,
// many warnings will appear for some of the files that have pre-requisites that are
// not required for compilation. Namely, these pre-requisites are:
//
// jui400.jar - A Graphical Toolbox jar file needed to generate javadoc for the
// AS400JDBCDataSourcePane classes in the com.ibm.as400.vaccess package.
// It is shipped in the main JTOpen download zip file, or as part of
// the IBM Toolbox for Java licensed program download.
//
////////////////////////////////////////////////////////////////////////////-->
<project name="JTOpen" basedir="." default="usage">
<!--///////////////////////////////////////////////////////////////////////////
// PROPERTIES
///////////////////////////////////////////////////////////////////////////-->
<!-- The "build" value is the root directory in which the JTOpen
files will get downloaded and built. All of the other
subdirectories required by this build stem off of this
directory. -->
<!-- This can be overridden on the ant command line using
-Dbuild=/build/JTOpen or -Dbuild=. -->
<condition property="build" value="/root/jtopen">
<not>
<isset property="build"/>
</not>
</condition>
<!-- The "sourceroot" value is the root directory under which the
source files reside. For a normal build, it is ${build}.
Within the eclipse environment, it is set to ${basedir}/..
If the basedir contains workspace, assume we are in eclipse.
Reminder: The rule for setting properties is that a property cannot
be changed after it is set. That's why the setting of sourceroot
is defined as set below. -->
<condition property="inEclipse" value="true">
<contains string="${basedir}" substring="workspace" />
</condition>
<condition property="sourceroot" value="${basedir}/..">
<isset property="inEclipse" />
</condition>
<property name="sourceroot" value="${build}"/>
<!-- Set the properties for the JDKs used to compile the code -->
<property name="jdk14" value="/usr/lib/jvm/java8-openjdk-amd64"/>
<property name="jdk15" value="/usr/lib/jvm/java8-openjdk-amd64"/>
<property name="jdk16" value="/jdk1.6.0"/>
<property name="jdk16windows" value="C:\jdk1.6.0"/>
<property name="jdk18" value="/usr/lib/jvm/java-8-openjdk-amd64"/>
<property name="jdk18windows" value="C:\jdk1.8.0"/>
<!-- Set the id used to access cvs -->
<property name="cvsUserid" value="anonymous"/>
<property name="cvsPassword" value=""/>
<property name="cvsProtocol" value="pserver"/>
<!-- Set the javadoc compiler -->
<property name="javadocExecDefault" value="${jdk15}/bin/javadoc"/>
<property name="javadoc6ExecDefault" value="${jdk16}/bin/javadoc"/>
<property name="javadoc8ExecDefault" value="${jdk18}/bin/javadoc"/>
<property name="ibmjavadocExec" value="${build}/bin/ibmjavadoc.bat"/>
<property name="bin" value="${build}/bin"/>
<property name="source" value="${sourceroot}/src"/>
<property name="source-jdbc40" value="${sourceroot}/jdbc40"/>
<property name="source-jdbc42" value="${sourceroot}/jdbc42"/>
<property name="source-java6" value="${build}/java6"/>
<property name="source-java8" value="${build}/java8"/>
<property name="source-contrib" value="${sourceroot}/contrib"/>
<property name="source-micro" value="${sourceroot}/micro"/>
<property name="source-android" value="${build}/android"/>
<property name="source-android6" value="${build}/android6"/>
<property name="source-androidStubs" value="${sourceroot}/androidStubs"/>
<property name="source-jtopenlite" value="${sourceroot}/jtopenlite"/>
<property name="dist" value="${build}/dist"/>
<property name="dist6" value="${build}/dist6"/>
<property name="dist8" value="${build}/dist8"/>
<property name="include" value="${build}/include"/>
<property name="stubs" value="${build}/stubs"/>
<!-- stubs are classes we need for compiling, but we don't ship. -->
<property name="javadoc" value="${build}/javadoc"/>
<property name="javadoc-micro" value="${build}/javadoc-micro"/>
<property name="javadoc6" value="${build}/javadoc6"/>
<property name="javadoc8" value="${build}/javadoc8"/>
<property name="javadoc-jtopenlite" value="${build}/javadoc-jtopenlite"/>
<property name="output" value="${build}/output"/>
<property name="output6" value="${build}/output6"/>
<property name="output8" value="${build}/output8"/>
<property name="output-android" value="${build}/output-android"/>
<property name="output-android6" value="${build}/output-android6"/>
<property name="output-micro" value="${build}/output-micro"/>
<property name="output-jtopenlite" value="${build}/output-jtopenlite"/>
<property name="output-micro-verified" value="${build}/output-micro-verified"/>
<property name="build.sysclasspath" value="ignore"/>
<property name="doclink" value="http://download.oracle.com/javase/1.5.0/docs/api/"/>
<property name="doclink6" value="http://download.oracle.com/javase/6/docs/api/"/>
<property name="doclink8" value="http://download.java.net/jdk8/docs/"/>
<property name="show-progress" value="false"/>
<property name="shadow-jtopenlite" value="J:\dev2000\as400\v7r1m0t.jacl\usr\cmvc\java.pgm\yjac.jacl\jars"/>
<property name="shadow2-jtopenlite" value="J:\"/>
<!-- These properties can be used to send the updated Jar file to a system -->
<!-- They should be set as properties passed to the ANT invocation -->
<property name="userid" value="userid_NOTDEFINED"/>
<property name="password" value="password_NOTDEFINED"/>
<property name="linuxuserid" value="linuxuserid_NOTDEFINED"/>
<property name="linuxpassword" value="linuxpassword_NOTDEFINED"/>
<property name="v7rXserver" value="v7rXserver_NOTDEFINED"/>
<property name="v7r1server" value="v7r1server_NOTDEFINED"/>
<property name="v6r1server1" value="v6r1server1_NOTDEFINED"/>
<property name="v6r1server2" value="v6r1server2_NOTDEFINED"/>
<property name="linuxserver" value="linuxserver_NOTDEFINED"/>
<!-- These local socket optimizations are only beneficial when running
Java code on OS/400 that connects to localhost. They are not required. -->
<patternset id="exclude.local.socket.implementation">
<exclude name="com/ibm/as400/access/SocketContainerUnix.class"/>
<exclude name="com/ibm/as400/access/UnixSocket.class"/>
<exclude name="com/ibm/as400/access/UnixSocketImpl.class"/>
<exclude name="com/ibm/as400/access/UnixSocketInputStream.class"/>
<exclude name="com/ibm/as400/access/UnixSocketOutputStream.class"/>
<exclude name="com/ibm/as400/access/UnixSocketUser.class"/>
<exclude name="com/ibm/as400/access/SocketContainerUnix2.class"/>
<exclude name="com/ibm/as400/access/SocketContainerUnix2$1.class"/>
<exclude name="com/ibm/as400/access/SocketContainerUnix2$SCUInputStream.class"/>
<exclude name="com/ibm/as400/access/SocketContainerUnix2$SCUOutputStream.class"/>
</patternset>
<!-- These optimizations are for executing certain Toolbox functions on-thread and
in-process when running Java code on OS/400 that connects to localhost.
They use JNI calls instead of socket calls to the Client Access Host Servers.
They are not required for normal operations. -->
<patternset id="exclude.native.optimizations">
<exclude name="com/ibm/as400/access/AS400CertificateUsrPrfUtilImplNative.class"/>
<exclude name="com/ibm/as400/access/AS400CertificateUtilImplNative.class"/>
<exclude name="com/ibm/as400/access/AS400CertificateVldlUtilImplNative.class"/>
<exclude name="com/ibm/as400/access/AS400FileImplNative.class"/>
<exclude name="com/ibm/as400/access/AS400ImplNative.class"/>
<exclude name="com/ibm/as400/access/BaseDataQueueImplNative.class"/>
<exclude name="com/ibm/as400/access/BytesWithOffset.class"/>
<exclude name="com/ibm/as400/access/LocalIOFB.class"/>
<exclude name="com/ibm/as400/access/LocalOpenFeedback.class"/>
<exclude name="com/ibm/as400/access/MessageFBDataFormat.class"/>
<exclude name="com/ibm/as400/access/MessageFBFormat.class"/>
<exclude name="com/ibm/as400/access/NativeVersion.class"/>
<exclude name="com/ibm/as400/access/NLSImplNative.class"/>
<exclude name="com/ibm/as400/access/ProfileHandleImplNative.class"/>
<exclude name="com/ibm/as400/access/ProfileTokenImplNative.class"/>
<exclude name="com/ibm/as400/access/RemoteCommandImplNative.class"/>
<exclude name="com/ibm/as400/access/UserSpaceImplNative.class"/>
</patternset>
<!--///////////////////////////////////////////////////////////////////////////
// TARGETS
///////////////////////////////////////////////////////////////////////////-->
<!--///////////////////////////////////////////////////////////////////////////
// Target: all
///////////////////////////////////////////////////////////////////////////-->
<target name="all" depends="jar,javadoc,zip"/>
<target name="all6" depends="jar6,javadoc6,zip6"/>
<target name="all8" depends="jar8,javadoc8,zip8"/>
<!--///////////////////////////////////////////////////////////////////////////
// Target: clean
///////////////////////////////////////////////////////////////////////////-->
<target name="clean" depends="clean-javadoc,clean-dist,clean-output,clean-javadoc6,clean-dist6,clean-output6,clean-javadoc8,clean-dist8,clean-output8,clean-android,clean-android6"/>
<target name="clean-dist">
<delete dir="${dist}"/>
</target>
<target name="clean-android">
<delete dir="${source-android}"/>
</target>
<target name="clean-android6">
<delete dir="${source-android6}"/>
</target>
<target name="clean-javadoc">
<delete dir="${javadoc}"/>
<delete dir="${javadoc-jtopenlite}"/>
</target>
<target name="clean-output">
<delete dir="${output}"/>
<delete dir="${output-micro}"/>
<delete dir="${output-jtopenlite}"/>
<delete dir="${output-micro-verified}"/>
</target>
<target name="clean-dist6">
<delete dir="${dist6}"/>
</target>
<target name="clean-javadoc6">
<delete dir="${javadoc6}"/>
</target>
<target name="clean-output6">
<delete dir="${output6}"/>
</target>
<target name="clean-dist8">
<delete dir="${dist8}"/>
</target>
<target name="clean-javadoc8">
<delete dir="${javadoc8}"/>
</target>
<target name="clean-output8">
<delete dir="${output8}" />
</target>
<!--///////////////////////////////////////////////////////////////////////////
// Target: clean-source
///////////////////////////////////////////////////////////////////////////-->
<target name="clean-source">
<fail message="Trying to clean eclipse" if="inEclipse"/>
<delete dir="${source}"/>
<delete dir="${source-contrib}"/>
<delete dir="${source-jdbc40}"/>
<delete dir="${source-jdbc42}"/>
<delete dir="${source-java6}"/>
<delete dir="${source-java8}"/>
<delete dir="${source-micro}"/>
<delete dir="${source-jtopenlite}"/>
<delete dir="${source-android}"/>
<delete dir="${source-android6}"/>
<delete dir="${build}/CVS"/>
<delete file="${build}/license.html"/>
<delete file="${build}/readme.html"/>
<delete file="${build}/changes.html"/>
</target>
<!--///////////////////////////////////////////////////////////////////////////
// Target: compile6
///////////////////////////////////////////////////////////////////////////-->
<target name="compile6" depends="source6">
<fail message="Can't find ${include}/servlet.jar." unless="servletJarExists"/>
<javac nowarn="on" srcdir="${source-java6}:${source-contrib}"
destdir="${output6}"
memoryMaximumSize="256m"
failonerror="true"
debug="on"
debuglevel="lines,source"
fork="true"
source="5"
target="5"
executable="${jdk16}/bin/javac">
<classpath>
<pathelement path="${include}"/>
<pathelement location="${include}/servlet.jar"/>
<!-- Need the JSDK classes to compile the com.ibm.as400.util.servlet package. -->
<pathelement location="${include}/jui400.jar"/>
<!-- Need this for the AS400JDBCDataSourcePane in the com.ibm.as400.vaccess package. -->
<pathelement location="${stubs}"/>
</classpath>
</javac>
<copy file="${source}/utilities/INMRI.pro"
preservelastmodified="yes"
tofile="${output6}/utilities/INMRI.properties"/>
<copy file="${source}/utilities/UTMRI.pro"
preservelastmodified="yes"
tofile="${output6}/utilities/UTMRI.properties"/>
</target>
<!--///////////////////////////////////////////////////////////////////////////
// Target: compile8
///////////////////////////////////////////////////////////////////////////-->
<target name="compile8" depends="source8">
<fail message="Can't find ${include}/servlet.jar." unless="servletJarExists"/>
<javac nowarn="on" srcdir="${source-java8}:${source-contrib}"
destdir="${output8}"
memoryMaximumSize="256m"
failonerror="true"
debug="on"
debuglevel="lines,source"
fork="true"
source="5"
target="5"
executable="${jdk18}/bin/javac">
<classpath>
<pathelement path="${include}"/>
<pathelement location="${include}/servlet.jar"/>
<!-- Need the JSDK classes to compile the com.ibm.as400.util.servlet package. -->
<pathelement location="${include}/jui400.jar"/>
<!-- Need this for the AS400JDBCDataSourcePane in the com.ibm.as400.vaccess package. -->
<pathelement location="${stubs}"/>
</classpath>
</javac>
<copy file="${source}/utilities/INMRI.pro"
preservelastmodified="yes"
tofile="${output8}/utilities/INMRI.properties"/>
<copy file="${source}/utilities/UTMRI.pro"
preservelastmodified="yes"
tofile="${output8}/utilities/UTMRI.properties"/>
</target>
<!--///////////////////////////////////////////////////////////////////////////
// Target: compile
///////////////////////////////////////////////////////////////////////////-->
<target name="compile" depends="init">
<fail message="Can't find ${include}/servlet.jar." unless="servletJarExists"/>
<tstamp/>
<echo message="compiling jtopen on ${DSTAMP}"/>
<replaceregexp file="${source}/com/ibm/as400/access/Copyright.java"
match="built=[^ ]*"
replace="built=${DSTAMP}"
byline="true"
/>
<javac srcdir="${source}:${source-contrib}"
destdir="${output}"
memoryMaximumSize="256m"
failonerror="true"
debug="on"
debuglevel="lines,source"
fork="true"
encoding="iso-8859-1"
target="1.8"
executable="${jdk14}/bin/javac" >
<classpath>
<pathelement path="${include}"/>
<pathelement location="${include}/servlet.jar"/>
<!-- Need the JSDK classes to compile the com.ibm.as400.util.servlet package. -->
<pathelement location="${include}/jui400.jar"/>
<!-- Need this for the AS400JDBCDataSourcePane in the com.ibm.as400.vaccess package. -->
<pathelement location="${stubs}"/>
</classpath>
</javac>
<copy file="${source}/utilities/INMRI.pro"
preservelastmodified="yes"
tofile="${output}/utilities/INMRI.properties"/>
<copy file="${source}/utilities/UTMRI.pro"
preservelastmodified="yes"
tofile="${output}/utilities/UTMRI.properties"/>
</target>
<!--///////////////////////////////////////////////////////////////////////////
// Target: compile-android
///////////////////////////////////////////////////////////////////////////-->
<target name="compile-android" depends="source-android">
<tstamp/>
<echo message="compiling jtopen on ${DSTAMP}"/>
<replaceregexp file="${source-android}/com/ibm/as400/access/Copyright.java"
match="built=[^ ]*"
replace="built=${DSTAMP}"
byline="true"
/>
<javac srcdir="${source-android}:${source-androidStubs}"
destdir="${output-android}"
memoryMaximumSize="256m"
failonerror="true"
debug="on"
debuglevel="lines,source"
fork="true"
encoding="iso-8859-1"
target="1.1"
executable="${jdk14}/bin/javac"
>
</javac>
<copy file="${source}/utilities/INMRI.pro"
preservelastmodified="yes"
tofile="${output}/utilities/INMRI.properties"/>
<copy file="${source}/utilities/UTMRI.pro"
preservelastmodified="yes"
tofile="${output}/utilities/UTMRI.properties"/>
</target>
<!--///////////////////////////////////////////////////////////////////////////
// Target: compile-android6
///////////////////////////////////////////////////////////////////////////-->
<target name="compile-android6" depends="source-android6">
<tstamp/>
<echo message="compiling jtopen on ${DSTAMP}"/>
<replaceregexp file="${source-android6}/com/ibm/as400/access/Copyright.java"
match="built=[^ ]*"
replace="built=${DSTAMP}"
byline="true"
/>
<javac srcdir="${source-android6}:${source-androidStubs}"
destdir="${output-android6}"
memoryMaximumSize="256m"
failonerror="true"
debug="on"
debuglevel="lines,source"
fork="true"
encoding="iso-8859-1"
target="1.6"
executable="${jdk16}/bin/javac"
>
</javac>
<copy file="${source}/utilities/INMRI.pro"
preservelastmodified="yes"
tofile="${output}/utilities/INMRI.properties"/>
<copy file="${source}/utilities/UTMRI.pro"
preservelastmodified="yes"
tofile="${output}/utilities/UTMRI.properties"/>
</target>
<target name="compile-micro" depends="init">
<fail message="Can't find ${include}/midpapi10.jar." unless="midpapiJarExists"/>
<fail message="Can't find ${include}/cldcapi10.jar." unless="cldcapiJarExists"/>
<javac srcdir="${source-micro}:${source}"
destdir="${output-micro}"
failonerror="true"
debug="on"
debuglevel="lines,source"
fork="true"
encoding="iso-8859-1"
target="1.1"
executable="${jdk14}/bin/javac" >
<include name="com/ibm/as400/micro/*.java"/>
<include name="java/sql/*.java"/>
<include name="java/math/*.java"/>
<include name="java/net/*.java"/>
<include name="java/util/*.java"/>
<!-- These classes only belong in the ME server, not the client. -->
<exclude name="com/ibm/as400/micro/ConnectionHandler.java"/>
<exclude name="com/ibm/as400/micro/JdbcMeService.java"/>
<exclude name="com/ibm/as400/micro/MEServer.java"/>
<exclude name="com/ibm/as400/micro/MicroDataInputStream.java"/>
<exclude name="com/ibm/as400/micro/MicroDataOutputStream.java"/>
<exclude name="com/ibm/as400/micro/ResourceBundleLoader_m.java"/>
<exclude name="com/ibm/as400/micro/ResultSetHandler.java"/>
<exclude name="com/ibm/as400/micro/Service.java"/>
<exclude name="com/ibm/as400/micro/StatementHandler.java"/>
<bootclasspath>
<pathelement path="${include}/midpapi10.jar:${include}/cldcapi10.jar:${include}"/>
</bootclasspath>
</javac>
</target>
<target name="compile-jtopenlite" depends="init">
<tstamp/>
<echo message="compiling jtopenlite on ${DSTAMP}"/>
<replaceregexp file="${source-jtopenlite}/com/ibm/jtopenlite/About.java"
match="INTERFACE_LEVEL=".*""
replace="INTERFACE_LEVEL="${DSTAMP}""
byline="true"
/>
<mkdir dir="${output-jtopenlite}"/>
<javac srcdir="${source-jtopenlite}"
destdir="${output-jtopenlite}"
failonerror="true"
debug="on"
debuglevel="lines,source"
fork="true"
encoding="iso-8859-1"
target="1.5"
executable="${jdk15}/bin/javac" >
<include name="com/ibm/jtopenlite/*.java"/>
<include name="com/ibm/jtopenlite/**/*.java"/>
</javac>
</target>
<!--///////////////////////////////////////////////////////////////////////////
// Target: init
///////////////////////////////////////////////////////////////////////////-->
<target name="init">
<tstamp/>
<mkdir dir="${build}"/>
<mkdir dir="${source-jdbc40}"/>
<mkdir dir="${source-jdbc42}"/>
<mkdir dir="${dist}"/>
<mkdir dir="${dist6}"/>
<mkdir dir="${dist8}"/>
<mkdir dir="${javadoc}"/>
<mkdir dir="${javadoc6}"/>
<mkdir dir="${javadoc8}"/>
<mkdir dir="${javadoc-jtopenlite}"/>
<!-- mkdir dir="${include}"/ -->
<mkdir dir="${output}"/>
<mkdir dir="${output6}"/>
<mkdir dir="${output8}"/>
<mkdir dir="${output-jtopenlite}"/>
<mkdir dir="${output-micro}"/>
<mkdir dir="${output-micro-verified}"/>
<mkdir dir="${output-android}"/>
<mkdir dir="${source-android}"/>
<mkdir dir="${output-android6}"/>
<mkdir dir="${source-android6}"/>
<mkdir dir="${bin}"/>
<condition property="servletJarExists">
<available file="${include}/servlet.jar" type="file"/>
</condition>
<condition property="midpapiJarExists">
<available file="${include}/midpapi10.jar" type="file"/>
</condition>
<condition property="cldcapiJarExists">
<available file="${include}/cldcapi10.jar" type="file"/>
</condition>
<condition property="javadocIncludesExist">
<and>
<available file="${include}/servlet.jar" type="file"/>
<available file="${include}/midpapi10.jar" type="file"/>
<available file="${include}/cldcapi10.jar" type="file"/>
<available file="${include}/jui400.jar" type="file"/>
</and>
</condition>
</target>
<!--///////////////////////////////////////////////////////////////////////////
// Target: jar
///////////////////////////////////////////////////////////////////////////-->
<target name="jar" depends="jar-jt400,jar-jt400Native,jar-jt400Proxy,jar-jt400Servlet,jar-jtopenlite,jar-jt400android"/>
<target name="jar6" depends="jar-jt4006,jar-jt400Native6,jar-jt400Proxy6,jar-jt400Servlet6,jar-jt400android6"/>
<target name="jar8" depends="jar-jt4008,jar-jt400Native8,jar-jt400Proxy8,jar-jt400Servlet8"/>
<!-- Note that the utilities package is now included in the jt400.jar. -->
<target name="jar-jt400" depends="init,compile8,pcml8,copyright8">
<jar jarfile="${dist}/jt400.jar" manifest="${sourceroot}/build/jt400_manifest.txt">
<fileset dir="${output}">
<patternset refid="exclude.native.optimizations"/>
<patternset refid="exclude.local.socket.implementation"/>
<patternset>
<exclude name="com/ibm/as400/util/html/**"/>
<exclude name="com/ibm/as400/util/servlet/**"/>
</patternset>
</fileset>
<fileset dir="${include}"
includes="com/ibm/as400/**,utilities/**"
excludes="**/*.java">
<patternset refid="exclude.native.optimizations"/>
<patternset refid="exclude.local.socket.implementation"/>
</fileset>
<fileset dir="${source}"
includes="**/*.gif,**/*.ser,**/*.dtd,**/*.xsl,**/*.xsd"
excludes="com/ibm/as400/util/html/**,com/ibm/as400/util/servlet/**"/>
<fileset dir="${build}" includes="license.html"/>
</jar>
<checksum file="${dist}/jt400.jar"/>
</target>
<!-- micro-preverify removed since source is not changing -->
<target name="jar-jt400Micro" depends="init,compile-micro">
<jar jarfile="${dist}/jt400Micro.jar" manifest="${sourceroot}/build/jt400Micro_manifest.txt">
<fileset dir="${output-micro-verified}" includesfile="${sourceroot}/build/micro.includes"/>
<fileset dir="${build}" includes="license.html"/>
</jar>
<checksum file="${dist}/jt400Micro.jar"/>
</target>
<target name="shadow-jtopenlite" depends="jar-jtopenlite">
<copy file="${dist}/jtopenlite.jar" tofile="${shadow-jtopenlite}/jtopenlite.jar"/>
<copy file="${dist}/jtopenlite.jar" tofile="${shadow2-jtopenlite}/jtopenlite.jar"/>
</target>
<target name="jar-jtopenlite" depends="init,compile-jtopenlite">
<jar jarfile="${dist}/jtopenlite.jar">
<fileset dir="${output-jtopenlite}" />
<fileset dir="${build}" includes="license.html"/>
</jar>
<checksum file="${dist}/jtopenlite.jar"/>
</target>
<target name="jar-jt400android" depends="init,compile-android,pcml-android,copyright-android">
<jar jarfile="${dist}/jt400android.jar" manifest="${sourceroot}/build/jt400_manifest.txt">
<fileset dir="${output-android}">
<patternset refid="exclude.native.optimizations"/>
<patternset refid="exclude.local.socket.implementation"/>
</fileset>
<fileset dir="${source}"
includes="**/*.ser,**/*.dtd,**/*.xsl,**/*.xsd"
excludes="com/ibm/as400/util/html/**,com/ibm/as400/util/servlet/**"/>
<fileset dir="${build}" includes="license.html"/>
</jar>
<checksum file="${dist}/jt400android.jar"/>
</target>
<target name="jar-jt400android6" depends="init,compile-android6,pcml-android6,copyright-android6">
<jar jarfile="${dist6}/jt400android6.jar" manifest="${sourceroot}/build/jt400_manifest.txt">
<fileset dir="${output-android6}">
<patternset refid="exclude.native.optimizations"/>
<patternset refid="exclude.local.socket.implementation"/>
</fileset>
<fileset dir="${source}"
includes="**/*.ser,**/*.dtd,**/*.xsl,**/*.xsd"
excludes="com/ibm/as400/util/html/**,com/ibm/as400/util/servlet/**"/>
<fileset dir="${build}" includes="license.html"/>
</jar>
<checksum file="${dist6}/jt400android6.jar"/>
</target>
<target name="jar-jt4006" depends="init,compile6,pcml6,copyright6">
<jar jarfile="${dist6}/jt400.jar" manifest="${sourceroot}/build/jt400_manifest.txt">
<fileset dir="${output6}">
<patternset refid="exclude.native.optimizations"/>
<patternset refid="exclude.local.socket.implementation"/>
<patternset>
<!-- These are shipped in jt400Servlet.jar -->
<exclude name="com/ibm/as400/util/html/**"/>
<exclude name="com/ibm/as400/util/servlet/**"/>
</patternset>
</fileset>
<fileset dir="${include}"
includes="com/ibm/as400/**,utilities/**"
excludes="**/*.java">
<patternset refid="exclude.native.optimizations"/>
<patternset refid="exclude.local.socket.implementation"/>
</fileset>
<fileset dir="${source}"
includes="**/*.gif,**/*.ser,**/*.dtd,**/*.xsl,**/*.xsd"
excludes="com/ibm/as400/util/html/**,com/ibm/as400/util/servlet/**"/>
<fileset dir="${build}" includes="license.html"/>
<fileset dir="${sourceroot}/build" includes="META-INF/services/java.sql.Driver"/>
<!-- jdbc 4.0 driver manifest -->
</jar>
<checksum file="${dist6}/jt400.jar"/>
</target>
<target name="jar-jt400Native6" depends="init,compile6,pcml6,copyright6">
<jar jarfile="${dist6}/jt400Native.jar" manifest="${sourceroot}/build/jt400Native_manifest.txt">
<fileset dir="${output6}">
<patternset>
<!-- Exclude everything in the 'utilities' package except the AboutToolbox class. -->
<exclude name="utilities/*Installer*"/>
<!-- <exclude name="utilities/*JarMaker*"/> -->
<!-- <exclude name="utilities/*JPing*"/> -->
<exclude name="utilities/*RunJava*"/>
<exclude name="utilities/*.properties"/>
<exclude name="com/ibm/as400/vaccess/**"/>
</patternset>
</fileset>
<fileset dir="${include}">
<patternset>
<include name="com/ibm/as400/**"/>
<exclude name="com/ibm/as400/vaccess/**"/>
<exclude name="**/*.java"/>
</patternset>
</fileset>
<fileset dir="${source}"
includes="**/*.gif,**/*.ser,**/*.dtd,**/*.xsl,**/*.xsd"
excludes="com/ibm/as400/vaccess/**"/>
<fileset dir="${build}" includes="license.html"/>
</jar>
<checksum file="${dist6}/jt400Native.jar"/>
</target>
<target name="jar-jt4008" depends="init,compile8,pcml8,copyright8">
<jar jarfile="${dist8}/jt400.jar" manifest="${sourceroot}/build/jt400_manifest.txt">
<fileset dir="${output8}">
<patternset refid="exclude.native.optimizations"/>
<patternset refid="exclude.local.socket.implementation"/>
<patternset>
<!-- These are shipped in jt400Servlet.jar -->
<exclude name="com/ibm/as400/util/html/**"/>
<exclude name="com/ibm/as400/util/servlet/**"/>
</patternset>
</fileset>
<fileset dir="${include}"
includes="com/ibm/as400/**,utilities/**"
excludes="**/*.java">
<patternset refid="exclude.native.optimizations"/>
<patternset refid="exclude.local.socket.implementation"/>
</fileset>
<fileset dir="${source}"
includes="**/*.gif,**/*.ser,**/*.dtd,**/*.xsl,**/*.xsd"
excludes="com/ibm/as400/util/html/**,com/ibm/as400/util/servlet/**"/>
<fileset dir="${build}" includes="license.html"/>
<fileset dir="${sourceroot}/build" includes="META-INF/services/java.sql.Driver"/>
<!-- jdbc 4.0 driver manifest -->
</jar>
<checksum file="${dist8}/jt400.jar"/>
</target>
<target name="jar-jt400Native8" depends="init,compile8,pcml8,copyright8">
<jar jarfile="${dist8}/jt400Native.jar" manifest="${sourceroot}/build/jt400Native_manifest.txt">
<fileset dir="${output8}">
<patternset>
<!-- Exclude everything in the 'utilities' package except the AboutToolbox class. -->
<exclude name="utilities/*Installer*"/>
<!-- <exclude name="utilities/*JarMaker*"/> -->
<!-- <exclude name="utilities/*JPing*"/> -->
<exclude name="utilities/*RunJava*"/>
<exclude name="utilities/*.properties"/>
<exclude name="com/ibm/as400/vaccess/**"/>
</patternset>
</fileset>
<fileset dir="${include}">
<patternset>
<include name="com/ibm/as400/**"/>
<exclude name="com/ibm/as400/vaccess/**"/>
<exclude name="**/*.java"/>
</patternset>
</fileset>
<fileset dir="${source}"
includes="**/*.gif,**/*.ser,**/*.dtd,**/*.xsl,**/*.xsd"
excludes="com/ibm/as400/vaccess/**"/>
<fileset dir="${build}" includes="license.html"/>
</jar>
<checksum file="${dist8}/jt400Native.jar"/>
</target>
<target name="jar-jt400Native" depends="init,compile,pcml,copyright">
<jar jarfile="${dist}/jt400Native.jar" manifest="${sourceroot}/build/jt400Native_manifest.txt">
<fileset dir="${output}">
<patternset>
<!-- Exclude everything in the 'utilities' package except the AboutToolbox class. -->
<exclude name="utilities/*Installer*"/>
<!-- <exclude name="utilities/*JarMaker*"/> -->
<!-- <exclude name="utilities/*JPing*"/> -->
<exclude name="utilities/*RunJava*"/>
<exclude name="utilities/*.properties"/>
<exclude name="com/ibm/as400/vaccess/**"/>
</patternset>
</fileset>
<fileset dir="${include}">
<patternset>
<include name="com/ibm/as400/**"/>
<exclude name="com/ibm/as400/vaccess/**"/>
<exclude name="**/*.java"/>
</patternset>
</fileset>
<fileset dir="${source}"
includes="**/*.gif,**/*.ser,**/*.dtd,**/*.xsl,**/*.xsd"
excludes="com/ibm/as400/vaccess/**"/>
<fileset dir="${build}" includes="license.html"/>
</jar>
<checksum file="${dist}/jt400Native.jar"/>
</target>
<target name="jar-jt400Proxy" depends="init,compile">
<jar jarfile="${dist}/jt400Proxy.jar" manifest="${sourceroot}/build/jt400Proxy_manifest.txt">
<fileset dir="${output}" includesfile="${sourceroot}/build/proxy.includes"/>
<fileset dir="${include}" includesfile="${sourceroot}/build/proxy.includes"/>
<fileset dir="${source}" includesfile="${sourceroot}/build/proxy.includes"/>
<fileset dir="${build}" includes="license.html"/>
</jar>
<checksum file="${dist}/jt400Proxy.jar"/>
</target>
<target name="jar-jt400Proxy6" depends="init,compile6">
<jar jarfile="${dist6}/jt400Proxy.jar" manifest="${sourceroot}/build/jt400Proxy_manifest.txt">
<fileset dir="${output6}" includesfile="${sourceroot}/build/proxy.includes"/>
<fileset dir="${include}" includesfile="${sourceroot}/build/proxy.includes"/>
<fileset dir="${source}" includesfile="${sourceroot}/build/proxy.includes"/>
<fileset dir="${build}" includes="license.html"/>
</jar>
<checksum file="${dist6}/jt400Proxy.jar"/>
</target>
<target name="jar-jt400Proxy8" depends="init,compile8">
<jar jarfile="${dist8}/jt400Proxy.jar" manifest="${sourceroot}/build/jt400Proxy_manifest.txt">
<fileset dir="${output8}" includesfile="${sourceroot}/build/proxy.includes"/>
<fileset dir="${include}" includesfile="${sourceroot}/build/proxy.includes"/>
<fileset dir="${source}" includesfile="${sourceroot}/build/proxy.includes"/>
<fileset dir="${build}" includes="license.html"/>
</jar>
<checksum file="${dist8}/jt400Proxy.jar"/>
</target>
<target name="jar-jt400Servlet" depends="init,compile">