File: build.xml

package info (click to toggle)
libxpp2-java 2.1.10-8
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster, sid
  • size: 1,752 kB
  • ctags: 1,757
  • sloc: java: 10,309; xml: 601; makefile: 4
file content (786 lines) | stat: -rw-r--r-- 31,483 bytes parent folder | download | duplicates (2)
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
<project name="XPP2" default="compile" basedir=".">

  <!-- to build J2ME make modify  those properties to fit your environment -->

  <!--property name="j2mewtk.home" value="c:/j2mewtk" /-->
  <!--property name="midp4palm.home" value="c:\palm\OLD-midp4palm" /-->
  <property name="j2mewtk.home" value="c:/util/j2mewtk" />
  <!--property name="midp4palm.home" value="D:\palm\OLD-midp4palm" /-->
  <property name="midp4palm.home" value="c:/util/midp4palm1.0" />


  <property name="target" value="1.2" />
  <!-- set global properties for this build -->

  <property name="name" value="XML Pull Parser"/>
  <property name="year" value="2003"/>
  <property name="version" value="2.1.10"/>
  <property name="copyright"
    value="Copyright (c) ${year} IU Extreme! Lab  http://www.extreme.indiana.edu/ All Rights Reserved."/>

  <property name="debug" value="on"/>
  <property name="deprecation" value="off"/>

  <property name="doc" value="doc"/>
  <property name="src" value="src/java"/>
  <property name="src_intf" value="${src}/intf"/>
  <property name="src_impl_factory" value="${src}/impl/factory"/>
  <property name="src_impl_small" value="${src}/impl/small"/>
  <property name="src_impl_tag" value="${src}/impl/tag"/>
  <property name="src_impl_pp" value="${src}/impl/pullparser"/>
  <property name="src_impl_node" value="${src}/impl/node"/>
  <property name="src_impl_format" value="${src}/impl/format"/>
  <property name="src_x2impl" value="${src}/x2"/>
  <property name="src_x2impl_factory" value="${src_x2impl}/factory"/>
  <property name="src_x2impl_pp" value="${src_x2impl}/pullparser"/>
  <property name="src_apis" value="${src}/apis"/>
  <property name="src_api_jaxp11" value="${src_apis}/jaxp11"/>
  <property name="src_api_sax2" value="${src_apis}/sax2"/>
  <property name="src_drivers" value="${src}/drivers"/>
  <property name="src_driver_jaxp11" value="${src_drivers}/jaxp11"/>
  <property name="src_driver_sax2" value="${src_drivers}/sax2"/>
  <property name="src_tests" value="${src}/tests"/>
  <property name="src_samples" value="${src}/samples"/>
  <property name="src_samples.midlet" value="${src}/samples/midlet"/>
  <property name="src_etc" value="src/etc"/>

  <property name="build" value="build"/>
  <property name="build_dist" value="${build}/dist"/>
  <property name="build_lib" value="${build}/lib"/>
  <property name="build_intf" value="${build}/intf"/>
  <property name="build_impl_factory" value="${build}/impl/factory"/>
  <property name="build_impl_tag" value="${build}/impl/tag"/>
  <property name="build_impl_pp" value="${build}/impl/pullparser"/>
  <property name="build_impl_node" value="${build}/impl/node"/>
  <property name="build_impl_format" value="${build}/impl/format"/>
  <property name="build_impl_small" value="${build}/impl/small"/>
  <property name="build_x2impl" value="${build}/x2impl"/>
  <property name="build_x2impl_factory" value="${build_x2impl}/factory"/>
  <property name="build_x2impl_pp" value="${build_x2impl}/pullparser"/>
  <property name="build_apis" value="${build}/apis"/>
  <property name="build_api_jaxp11" value="${build_apis}/jaxp11"/>
  <property name="build_api_sax2" value="${build_apis}/sax2"/>
  <property name="build_drivers" value="${build}/drivers"/>
  <property name="build_driver_jaxp11" value="${build_drivers}/jaxp11"/>
  <property name="build_driver_sax2" value="${build_drivers}/sax2"/>
  <property name="build_j2me" value="${build}/j2me"/>
  <property name="build_tests" value="${build}/tests"/>
  <property name="src_impl_tiny" value="${build}/tiny/src"/>
  <property name="build_impl_tiny" value="${build}/tiny/classes"/>
  <property name="build_tiny_tests" value="${build}/tiny/tests"/>
  <property name="build_samples" value="${build}/samples"/>
  <property name="build_apidoc" value="${doc}/api"/>
  <property name="build_javadoc" value="${doc}/api_impl"/>
  <property name="apidoc_packages" value="org.gjt.xpp"/>
  <property name="javadoc_packages" value="org.gjt.xpp.*"/>
  <property name="dist" value="${build}/dist/PullParser${version}"/>
  <!--property name="dist_zip" value="${build}/dist/PullParser${version}.zip"/-->
  <property name="dist_tar" value="${build}/dist/PullParser${version}.tar"/>
  <property name="dist_tgz" value="${build}/dist/PullParser${version}.tgz"/>
  <property name="jar_intf" value="${build_lib}/PullParser-intf-${version}.jar"/>
  <property name="jar"  value="${build_lib}/PullParser-${version}.jar"/>
  <property name="jar_standard"    value="${build_lib}/PullParser-standard-${version}.jar"/>
  <property name="jar_small"    value="${build_lib}/PullParser-small-${version}.jar"/>
  <property name="jar_tiny"     value="${build_lib}/PullParser-tiny-${version}.jar"/>
  <property name="jar_x2" value="${build_lib}/PullParser-x2-${version}.jar"/>


  <patternset id="small.impl.source.files">
    <include name="**/*.java"/>
    <include name="**/*SmallImpl.java"/>
    <exclude name="**/*FullImpl.java"/>
    <exclude name="**/*Node*.java"/>
    <exclude name="**/*Formatter*.java"/>
    <exclude name="**/*Recorder*.java"/>
  </patternset>

  <patternset id="full.impl.source.files">
    <include name="**/*.java"/>
    <include name="**/*FullImpl.java"/>
    <exclude name="**/*SmallImpl.java"/>
  </patternset>

  <patternset id="samples.source.files">
     <include name="**/*.java"/>
     <exclude name="**/midlet/**"/>
     <exclude name="**/soap/**"/>
  </patternset>

  <patternset id="all.source.files">
        <exclude name="**/*-"/>
        <exclude name="**/*.mcp"/>
        <exclude name="**/*_Data/**"/>
  </patternset>

  <!-- =================================================================== -->
  <!-- Preparing build environment                                         -->
  <!-- =================================================================== -->
  <target name="clean">
    <delete dir="${build_lib}"/>
    <delete dir="${build_intf}"/>
    <delete dir="${build_impl_tag}"/>
    <delete dir="${build_impl_pp}"/>
    <delete dir="${build_impl_node}"/>
    <delete dir="${build_impl_factory}"/>
    <delete dir="${build_impl_format}"/>
    <delete dir="${build_impl_small}"/>
    <delete dir="${build_impl_tiny}"/>
    <delete dir="${build_tiny_tests}"/>
    <delete dir="${build}/impl"/>
    <delete dir="${build_x2impl}"/>
    <delete dir="${build_apis}"/>
    <delete dir="${build_drivers}"/>
    <delete dir="${build_j2me}"/>
    <delete dir="${build_tests}"/>
    <delete dir="${build_samples}"/>
    <delete dir="${build_apidoc}"/>
    <delete dir="${build_javadoc}"/>
    <delete dir="${dist}"/>
    <!--delete file="${dist_zip}"/-->
    <delete file="${dist_tar}"/>
  </target>

  <target name="prepare">
    <mkdir dir="${build}"/>
    <mkdir dir="${build_dist}"/>
    <mkdir dir="${build_lib}"/>
    <mkdir dir="${build_apidoc}"/>
    <mkdir dir="${build_javadoc}"/>
    <available property="junit.present" classname="junit.framework.TestCase" />
    <available property="j2mewtk_present" file="${j2mewtk.home}" />
    <available property="x2_present" classname="org.apache.xerces.xni.parser.XMLPullParserConfiguration" />
    <uptodate property="intf_jar_notRequired" targetfile="${jar_intf}">
      <srcfiles dir="${src_intf}" includes="**/*.java"/>
    </uptodate>
  </target>

  <!-- =================================================================== -->
  <!-- Compilation tasks                                                   -->
  <!-- =================================================================== -->

  <target name="all" depends="clean,compile"/>

  <target name="compile" depends="intf,intf_jar,impl,x2impl,tests,samples"/>


  <target name="intf" depends="prepare">
    <mkdir dir="${build_intf}"/>
    <javac target="${target}" debug="${debug}" deprecation="${deprecation}" srcdir="${src_intf}" destdir="${build_intf}"/>
    <touch file="${build_intf}/PullParser${version}_VERSION"/>
  </target>

  <target name="intf_jar" unless="intf_jar_notRequired" depends="intf">
    <jar jarfile="${jar_intf}" basedir="${build_intf}"/>
  </target>

  <target name="impl_tag" depends="intf">
    <mkdir dir="${build_impl_tag}"/>
    <javac target="${target}" debug="${debug}" deprecation="${deprecation}" srcdir="${src_impl_tag}"
      destdir="${build_impl_tag}"
      classpath="${build_intf}">

      <patternset refid="all.source.files"/>
    </javac>
  </target>

  <target name="impl_node" depends="intf">
    <mkdir dir="${build_impl_node}"/>
    <javac target="${target}" debug="${debug}" deprecation="${deprecation}" srcdir="${src_impl_node}"
      destdir="${build_impl_node}"
      classpath="${build_intf}:${build_impl_tag}">

      <patternset refid="all.source.files"/>
    </javac>
  </target>

  <target name="impl_format" depends="intf">
    <mkdir dir="${build_impl_format}"/>
    <javac target="${target}" debug="${debug}" deprecation="${deprecation}" srcdir="${src_impl_format}"
      destdir="${build_impl_format}"
      classpath="${build_intf}">

      <patternset refid="all.source.files"/>
    </javac>
  </target>

  <target name="impl_pp" depends="impl_tag,intf">
    <mkdir dir="${build_impl_pp}"/>
    <javac target="${target}" debug="${debug}" deprecation="${deprecation}" srcdir="${src_impl_pp}"
      destdir="${build_impl_pp}"
      classpath="${build_intf}:${build_impl_tag}">

      <patternset refid="all.source.files"/>
    </javac>
  </target>

  <target name="impl" depends="intf,impl_tag,impl_pp,impl_node,impl_format,drivers">
    <mkdir dir="${build_impl_factory}/META-INF/services"/>
    <javac target="${target}" debug="${debug}" deprecation="${deprecation}" srcdir="${src_impl_factory}"
      destdir="${build_impl_factory}"
      classpath="${build_intf}:${build_impl_tag}:${build_impl_pp}:${build_impl_node}:${build_impl_format}">
        <patternset refid="all.source.files"/>
    </javac>
    <copy todir="${build_impl_factory}/META-INF/services">
      <fileset dir="${src_impl_factory}/META-INF/services/"/>
    </copy>
    <jar jarfile="${jar_standard}">
      <fileset dir="${build_intf}"/>
      <fileset dir="${build_impl_factory}"/>
      <fileset dir="${build_impl_tag}"/>
      <fileset dir="${build_impl_pp}"/>
      <fileset dir="${build_impl_node}"/>
      <fileset dir="${build_impl_format}"/>
    </jar>
    <jar jarfile="${jar}">
      <fileset dir="${build_intf}"/>
      <fileset dir="${build_impl_factory}"/>
      <fileset dir="${build_impl_tag}"/>
      <fileset dir="${build_impl_pp}"/>
      <fileset dir="${build_impl_node}"/>
      <fileset dir="${build_impl_format}"/>
      <fileset dir="${build_driver_sax2}"/>
      <fileset dir="${build_driver_jaxp11}"/>
      <fileset dir="${build_api_sax2}"/>
      <fileset dir="${build_api_jaxp11}"/>
    </jar>
  </target>

  <target name="impl_small" depends="intf,impl_tag,impl_pp">
    <mkdir dir="${build_impl_small}"/>
    <javac target="${target}" debug="${debug}" deprecation="${deprecation}" srcdir="${src_impl_small}"
      destdir="${build_impl_small}"
      classpath="${build_intf}:${build_impl_tag}:${build_impl_pp}">
      <patternset refid="all.source.files"/>
    </javac>
    <mkdir dir="${build_impl_small}/META-INF/services"/>
    <copy todir="${build_impl_small}/META-INF/services">
      <fileset dir="${src_impl_small}/META-INF/services/"/>
    </copy>
    <jar jarfile="${jar_small}">
      <fileset dir="${build_intf}"/>
      <fileset dir="${build_impl_small}"/>
      <fileset dir="${build_impl_tag}"/>
      <fileset dir="${build_impl_pp}"/>
    </jar>
  </target>


  <target name="check_x2" unless="x2_present" depends="prepare">
    <echo message="Warning: Xerces2 XNI Pull Parser dependencies were not resolved."/>
  </target>

  <target name="x2impl_pp" if="x2_present" depends="intf,check_x2">
    <mkdir dir="${build_x2impl_pp}"/>
    <javac target="${target}" debug="${debug}" deprecation="${deprecation}" srcdir="${src_x2impl_pp}"
      destdir="${build_x2impl_pp}"
      classpath="${build_intf}">
    </javac>
  </target>

  <target name="x2impl" if="x2_present" depends="x2impl_pp,drivers">
    <mkdir dir="${build_x2impl_factory}"/>
    <javac target="${target}" debug="${debug}" deprecation="${deprecation}"
      srcdir="${src_x2impl_factory}"
      destdir="${build_x2impl_factory}"
      classpath="${build_intf}:${build_impl_tag}:${build_x2impl_pp}:${build_impl_node}:${build_impl_format}">
    </javac>
    <mkdir dir="${build_x2impl_factory}/META-INF/services"/>
    <copy todir="${build_x2impl_factory}/META-INF/services">
      <fileset dir="${src_x2impl_factory}/META-INF/services/"/>
    </copy>
    <jar jarfile="${jar_x2}">
      <fileset dir="${build_intf}"/>
      <fileset dir="${build_x2impl_factory}"/>
      <fileset dir="${build_x2impl_pp}"/>
      <fileset dir="${build_impl_tag}"/>
      <fileset dir="${build_impl_node}"/>
      <fileset dir="${build_impl_format}"/>
      <fileset dir="${build_driver_sax2}"/>
      <fileset dir="${build_driver_jaxp11}"/>
      <fileset dir="${build_api_sax2}"/>
      <fileset dir="${build_api_jaxp11}"/>
    </jar>
  </target>

  <target name="samples" depends="intf">
    <mkdir dir="${build_samples}"/>
    <javac target="${target}" debug="${debug}" deprecation="${deprecation}"
      srcdir="${src_samples}" destdir="${build_samples}"
      classpath="${build_intf}"
    >
      <patternset refid="samples.source.files"/>
    </javac>
  </target>


  <!-- =================================================================== -->
  <!-- APIs and DRIVERs                                                    -->
  <!-- =================================================================== -->

  <target name="api_sax2" depends="prepare">
    <mkdir dir="${build_api_sax2}"/>
    <javac target="${target}" debug="${debug}" deprecation="${deprecation}"
      srcdir="${src_api_sax2}" destdir="${build_api_sax2}"
    >
    </javac>
  </target>

  <target name="driver_sax2" depends="api_sax2,intf">
    <mkdir dir="${build_driver_sax2}"/>
    <javac target="${target}" debug="${debug}" deprecation="${deprecation}"
      srcdir="${src_driver_sax2}" destdir="${build_driver_sax2}"
      classpath="${build_api_sax2}:${build_intf}"
    >
    </javac>
  </target>

  <target name="api_jaxp11" depends="api_sax2">
    <mkdir dir="${build_api_jaxp11}"/>
    <javac target="${target}" debug="${debug}" deprecation="${deprecation}"
      srcdir="${src_api_jaxp11}" destdir="${build_api_jaxp11}"
      classpath="${build_api_sax2}"
    >

    </javac>
  </target>

  <target name="driver_jaxp11" depends="api_sax2,driver_sax2,api_jaxp11,intf">
    <mkdir dir="${build_driver_jaxp11}"/>
    <mkdir dir="${build_driver_jaxp11}/META-INF/services"/>
    <!--copy todir="${build_driver_jaxp11}/META-INF/services">
      <fileset dir="${src_driver_jaxp11}/META-INF/services/"/>
    </copy-->
    <javac target="${target}" debug="${debug}" deprecation="${deprecation}"
      srcdir="${src_driver_jaxp11}" destdir="${build_driver_jaxp11}"
      classpath="${build_api_sax2}:${build_driver_sax2}:${build_api_jaxp11}:${build_intf}"
    >
    </javac>
  </target>

  <target name="apis" depends="api_sax2,api_jaxp11"/>
  <target name="drivers" depends="driver_sax2,driver_jaxp11"/>

  <!-- =================================================================== -->
  <!-- J2ME reated ...                                                     -->
  <!-- =================================================================== -->
  <target name="j2me" depends="midlets,palm"/>

  <target name="midlets" if="midlets_present"
     depends="check_j2mewtk,count_midlet" />

  <target name="check_j2mewtk" unless="j2mewtk_present" depends="prepare">
    <echo message="Warning: J2MEWTH dependencies were not resolved."/>
  </target>

  <target name="midlets_init">
    <!-- For J2ME use http://www.stampysoft.com/ant/   -->
    <taskdef name="preverify" classname="com.stampysoft.ant.j2me.PreverifyTask" />
    <taskdef name="updatejad" classname="com.stampysoft.ant.j2me.UpdateJARSizeTask" />
    <taskdef name="makePRC"   classname="com.stampysoft.ant.j2me.JARToPRCTask" />
  </target>

  <!-- creates simple sample with minimum build size of XPP -->
  <target name="count_midlet" if="j2mewtk_present" depends="impl_small,midlets_init,samples">

    <delete dir="${build_j2me}/count_midlet" />
    <mkdir dir="${build_j2me}/count_midlet"/>

    <javac target="${target}" debug="${debug}" deprecation="${deprecation}"
      srcdir="${src_samples}" destdir="${build_j2me}/count_midlet"
      bootclasspath="${j2mewtk.home}/lib/midpapi.zip"
      classpath="${build_intf}"
    >
      <patternset>
        <include name="**/midlet/*.java"/>
      </patternset>

    </javac>

    <copy todir="${build_j2me}/count_midlet">
      <fileset dir="${build_intf}"/>
      <fileset dir="${build_impl_small}"/>
      <fileset dir="${build_impl_pp}"/>
      <fileset dir="${build_impl_tag}"/>
      <fileset dir="${build_samples}">
         <include name="**/count/*.class"/>
      </fileset>

         <!--exclude name="**/*SmallImpl.class"/-->

    </copy>

    <delete dir="${build_j2me}/count_midlet_verified" />
    <mkdir dir="${build_j2me}/count_midlet_verified"/>
    <preverify unverified="${build_j2me}/count_midlet"
       verified="${build_j2me}/count_midlet_verified" />
    <!--copy todir="${build_j2me}/count_midlet_verified">
       <fileset dir="${build_j2me}/count_midlet/" />
    </copy-->
    <delete file="${build_j2me}/count_midlet.jar" />
    <jar jarfile="${build_j2me}/count_midlet.jar"
        basedir="${build_j2me}/count_midlet_verified" />
    <copy  todir="${build_j2me}" file="${src_samples.midlet}/count_midlet.jad"/>
    <updatejad jad="${build_j2me}/count_midlet.jad" />
  </target>

  <!-- thi is special verion of XPP2 that is equivalent to impl_small but smaller -->
  <target name="impl_tiny" depends="prepare">
    <mkdir dir="${build_impl_tiny}"/>
    <javac target="${target}" debug="${debug}" deprecation="${deprecation}"
      srcdir="${src_impl_tiny}"
      destdir="${build_impl_tiny}"
      >
      <patternset refid="all.source.files"/>
    </javac>
    <jar jarfile="${jar_tiny}">
      <fileset dir="${build_impl_tiny}"/>
    </jar>
  </target>

  <!-- creates simple sample with tiny build size of XPP (the same API but no interfaces) -->
  <target name="count_midlet_tiny" if="j2mewtk_present" depends="impl_tiny,midlets_init,samples">

    <delete dir="${build_j2me}/count_midlet_tiny" />
    <mkdir dir="${build_j2me}/count_midlet_tiny"/>

    <javac target="${target}" debug="${debug}" deprecation="${deprecation}"
      srcdir="${src_samples}" destdir="${build_j2me}/count_midlet_tiny"
      bootclasspath="${j2mewtk.home}/lib/midpapi.zip"
      classpath="${build_impl_tiny}"
    >
      <patternset>
        <include name="**/midlet/*.java"/>
      </patternset>

    </javac>

    <copy todir="${build_j2me}/count_midlet_tiny">
      <fileset dir="${build_impl_tiny}"/>
      <fileset dir="${build_samples}">
         <include name="**/count/*.class"/>
      </fileset>

         <!--exclude name="**/*SmallImpl.class"/-->

    </copy>

    <delete dir="${build_j2me}/count_midlet_tiny_verified" />
    <mkdir dir="${build_j2me}/count_midlet_tiny_verified"/>
    <preverify unverified="${build_j2me}/count_midlet_tiny"
       verified="${build_j2me}/count_midlet_tiny_verified" />
    <!--copy todir="${build_j2me}/count_midlet_tiny_verified">
       <fileset dir="${build_j2me}/count_midlet_tiny/" />
    </copy-->
    <delete file="${build_j2me}/count_midlet_tiny.jar" />
    <jar jarfile="${build_j2me}/count_midlet_tiny.jar"
        basedir="${build_j2me}/count_midlet_tiny_verified" />
    <copy  todir="${build_j2me}" file="${src_samples.midlet}/count_midlet_tiny.jad"/>
    <updatejad jad="${build_j2me}/count_midlet_tiny.jad" />
  </target>


  <!-- TODO: full blown SOAP client sample that uses all XPP functionality -->
  <target name="stockquote_midlet" if="j2mewtk_present" depends="impl">


  </target>

  <!-- =================================================================== -->
  <!-- PalmOS: producing PRC from Midlet ...                               -->
  <!-- Using http://www.stampysoft.com/ant/UserManual.html                 -->
  <!-- =================================================================== -->

  <target name="palm" depends="count_palm"/>

  <target name="count_palm" depends="count_midlet">
    <makePRC jar="${build_j2me}/count_midlet.jar"
             jad="${build_j2me}/count_midlet.jad"
             prc="${build_j2me}/count_midlet.prc"
       name="CountXPP" />
  </target>

  <target name="count_palm_tiny" depends="count_midlet_tiny">
    <makePRC jar="${build_j2me}/count_midlet_tiny.jar"
             jad="${build_j2me}/count_midlet_tiny.jad"
             prc="${build_j2me}/count_midlet_tiny.prc"
       name="CountXPP" />
  </target>

  <target name="tiny" depends="count_palm_tiny, tiny_tests"/>

  <target name="soap_palm" depends="compile">
    <makePRC jar="sample.jar" mainclass="sample.MainClass" networking="true"
       name="Sample SOAP StockQuote MIDlet (minimal parser)"/>
  </target>

  <!-- =================================================================== -->
  <!-- JUnit automatic tests                                               -->
  <!-- =================================================================== -->

  <path id="test_classpath">
    <!-- build_dir for test classes and build_dest for classes to test -->
    <pathelement location="${build_intf}" />
    <pathelement path="${java.class.path}" />
  </path>

  <target name="check_junit" unless="junit.present" depends="prepare">
    <echo message="Warning: JUnit dependencies were not resolved."/>
  </target>

  <target name="tests" if="junit.present" depends="intf,check_junit">
    <mkdir dir="${build_tests}"/>
    <javac target="${target}" debug="${debug}" deprecation="${deprecation}"
       srcdir="${src_tests}" destdir="${build_tests}">
      <classpath refid="test_classpath" />
    </javac>
  </target>

  <target name="tiny_tests" if="junit.present" depends="impl_tiny,check_junit">
    <mkdir dir="${build_tiny_tests}"/>
    <javac target="${target}" debug="${debug}" deprecation="${deprecation}"
      srcdir="${src_tests}" destdir="${build_tiny_tests}" classpath="${build_impl_tiny}:${java.class.path}">
      <patternset>
         <exclude name="All**"/>
         <exclude name="format/**"/>
         <exclude name="node/**"/>
      </patternset>
    </javac>
  </target>

  <target name="junit" if="junit.present" depends="tests,impl">
    <java classname="AllTests" fork="yes">
      <!--arg value="foo_argument_1" /-->
      <!--arg value="samples/list.xml" /-->
      <classpath>
        <path refid="test_classpath" />
        <pathelement location="${build_tests}" />
        <fileset dir="${build_lib}">
           <include name="*.jar"/>
        </fileset>
      </classpath>
    </java>

    <!--junit haltonfailure="yes" fork="yes">
      <classpath>
        <pathelement location="${build_tests}" />
        <pathelement location="${jar}" />
        <path refid="test_classpath" />
      </classpath>
      <formatter type="plain" usefile="false" />
      <test name="AllTests" />

    </junit-->
  </target>


  <!-- =================================================================== -->
  <!-- Creates the API documentation                                       -->
  <!-- =================================================================== -->
  <target name="api" depends="intf">
    <javadoc packagenames="${apidoc_packages}"
             sourcepath="${src_intf}"
             destdir="${build_apidoc}"
             author="true"
             version="true"
             use="true"
             windowtitle="${name} ${version} API"
             doctitle='${name}. &lt;br&gt; &lt;br&gt;  &lt;strong&gt;Note this package is deprecated&lt;/strong&gt; by &lt;a  target="_top" href="http://www.extreme.indiana.edu/xgws/xsoap/xpp/mxp1/"&gt;XPP3&lt;/a&gt; that implements &lt;a target="_top" href="http://www.xmlpull.org/"&gt;XmlPull API&lt;/a&gt;'
             bottom='${copyright} &lt;br&gt; &lt;br&gt;  &lt;strong&gt;Note this package is deprecated&lt;/strong&gt; by &lt;a  target="_top" href="http://www.extreme.indiana.edu/xgws/xsoap/xpp/mxp1/"&gt;XPP3&lt;/a&gt; that implements &lt;a target="_top" href="http://www.xmlpull.org/"&gt;XmlPull API&lt;/a&gt;'
    />
  </target>

  <!-- =================================================================== -->
  <!-- Creates the JAVADOC documentation                                   -->
  <!-- =================================================================== -->
  <target name="api.impl" depends="impl">
    <javadoc packagenames="${javadoc_packages}"
             sourcepath="${src_intf}:${src_impl_factory}:${src_impl_small}:${src_impl_tag}:${src_impl_pp}:${src_impl_node}:${src_impl_format}:${src_x2impl}:${src_x2impl_factory}:${src_x2impl_pp}"
             destdir="${build_javadoc}"
             author="true"
             version="true"
             use="true"
             windowtitle='Implementation ${name} ${version} API'
             doctitle='Implementation ${name} &lt;br&gt; &lt;br&gt;  &lt;strong&gt;Note this package is deprecated&lt;/strong&gt; by &lt;a target="_top" href="http://www.extreme.indiana.edu/xgws/xsoap/xpp/mxp1/"&gt;XPP3&lt;/a&gt; that implements &lt;a target="_top" href="http://www.xmlpull.org/"&gt;XmlPull API&lt;/a&gt;'
             bottom='${copyright} &lt;br&gt; &lt;br&gt;  &lt;strong&gt;Note this package is deprecated&lt;/strong&gt; by &lt;a  target="_top" href="http://www.extreme.indiana.edu/xgws/xsoap/xpp/mxp1/"&gt;XPP3&lt;/a&gt; that implements &lt;a target="_top" href="http://www.xmlpull.org/"&gt;XmlPull API&lt;/a&gt;'
    />
  </target>


  <!-- =================================================================== -->
  <!-- Creates the XML Pull Parser distribution                            -->
  <!-- =================================================================== -->
  <target name="dist" depends="compile, j2me, api">
    <delete dir="${dist}"/>
    <!--delete file="${dist_zip}"/-->
    <delete file="${dist_tgz}"/>

    <mkdir dir="${dist}"/>
    <mkdir dir="${dist}/${doc}"/>
    <mkdir dir="${dist}/lib"/>
    <mkdir dir="${dist}/${src}"/>
    <mkdir dir="${dist}/${src_intf}"/>
    <mkdir dir="${dist}/${src}/impl"/>
    <mkdir dir="${dist}/${src_x2impl}"/>
    <mkdir dir="${dist}/${src_api_jaxp11}"/>
    <mkdir dir="${dist}/${src_api_sax2}"/>
    <mkdir dir="${dist}/${src_driver_jaxp11}"/>
    <mkdir dir="${dist}/${src_driver_sax2}"/>
    <mkdir dir="${dist}/${src_samples}"/>
    <mkdir dir="${dist}/${src_tests}"/>
    <mkdir dir="${dist}/${src_etc}"/>
    <mkdir dir="${dist}/${build}"/>

    <copy todir="${dist}/lib">
      <fileset dir="lib"/>
    </copy>

    <copy todir="${dist}/${build}">
      <fileset dir="${build}">
        <include name="lib/PullParser${version}*.jar"/>
        <include name="j2me/*.jar"/>
        <include name="j2me/*.jad"/>
        <include name="j2me/*.prc"/>
        <include name="samples/**"/>
        <include name="tests/**"/>
        <include name="intf/**"/>
        <include name="impl/**"/>
        <include name="x2impl/**"/>
        <include name="apis/**"/>
        <include name="drivers/**"/>
      </fileset>
    </copy>

    <!-- sources should be copied after build to make it newer -->
    <copy todir="${dist}/${src_samples}">
      <fileset dir="${src_samples}">
        <!--include name="**"/-->
        <exclude name="**/soap/**"/>
      </fileset>
    </copy>

    <copy todir="${dist}/${src_intf}">
      <fileset dir="${src_intf}">
         <patternset refid="all.source.files"/>
      </fileset>
    </copy>
    <copy todir="${dist}/${src}/impl">
      <fileset dir="${src}/impl">
         <patternset refid="all.source.files"/>
      </fileset>
    </copy>
    <copy todir="${dist}/${src_x2impl}">
      <fileset dir="${src_x2impl}">
         <patternset refid="all.source.files"/>
      </fileset>
    </copy>

    <copy todir="${dist}/${src_api_jaxp11}">
      <fileset dir="${src_api_jaxp11}">
         <patternset refid="all.source.files"/>
      </fileset>
    </copy>

    <copy todir="${dist}/${src_api_sax2}">
      <fileset dir="${src_api_sax2}">
         <patternset refid="all.source.files"/>
      </fileset>
    </copy>

    <copy todir="${dist}/${src_driver_jaxp11}">
      <fileset dir="${src_driver_jaxp11}">
         <patternset refid="all.source.files"/>
      </fileset>
    </copy>

    <copy todir="${dist}/${src_driver_sax2}">
      <fileset dir="${src_driver_sax2}">
         <patternset refid="all.source.files"/>
      </fileset>
    </copy>

    <copy todir="${dist}/${src_tests}">
      <fileset dir="${src_tests}">
         <patternset refid="all.source.files"/>
      </fileset>
    </copy>

    <copy todir="${dist}/${src_etc}">
      <fileset dir="${src_etc}" includes="*"/>
    </copy>

    <copy todir="${dist}/${doc}">
      <fileset dir="${doc}"/>
    </copy>

    <copy todir="${dist}/${build_apidoc}">
      <fileset dir="${build_apidoc}"/>
    </copy>


    <copy file="LICENSE.txt" tofile="${dist}/LICENSE.txt"/>
    <copy file="README.html" tofile="${dist}/README.html"/>
    <copy file="build.xml" tofile="${dist}/build.xml"/>

    <fixcrlf srcdir="${dist}"
       eol="lf" eof="remove"
       includes="**/*.html,**/*.txt,**/*.sh"
     />

    <fixcrlf srcdir="${dist}"
       eol="crlf"
       includes="**/*.bat"
     />

    <tar tarfile="${dist_tar}"
      basedir="${build}/dist/"
       includes="PullParser${version}/**">
    </tar>
    <gzip zipfile="${dist_tgz}" src="${dist_tar}"/>
    <delete file="${dist_tar}"/>

  </target>

  <target name="xx">

    <!--zip zipfile="${dist_zip}" basedir="${build}/dist/"
      includes="PullParser${version}/**"/
      username="aslom" group="ewww"
      longfile="gnu"
    <tar tarfile="${dist_tar}">
      <tarfileset dir="${build}/dist" >
       <include name="PullParser${version}/**"/>
      </tarfileset>
    </tar>

    <delete file="${dist_tar}"/>
    <tar tarfile="${dist_tar}">
      <tarfileset dir="${dist}/.." >
         <include name="PullParser${version}/**"/>
      </tarfileset>

      -->

    <delete file="test.tar"/>
    <tar tarfile="test.tar">
      <tarfileset dir="${build}/dist/" >
         <include name="PullParser${version}/**"/>
      </tarfileset>
        </tar>
    <gzip zipfile="test.tgz" src="test.tar"/>

  </target>

  <target name="run">
    <java classname="standard.XppCountMain" fork="yes">
      <arg value="-v" />
      <arg value="samples/list.xml" />
      <classpath>
        <path refid="test_classpath" />
        <pathelement location="${build_samples}" />
      </classpath>
    </java>
  </target>


</project>