summaryrefslogtreecommitdiff
path: root/docs/faq.html
blob: 9dfd6d9b60545f14e7f34b63df6beda0f5f54d39 (plain)
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
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

<!-- Content Stylesheet for Site -->

        
<!-- start the processing -->
    <html>
    <head>
      <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"/>
  
                      <meta name="author" value="Stefan Bodewig">
  <meta name="email" value="bodewig@apache.org">
        
      <title>The Jakarta Site - Frequently Asked Questions</title>
    </head>
  
    <body bgcolor="#ffffff" text="#000000" link="#525D76">    
      <table border="0" width="100%" cellspacing="0">
        <!-- TOP IMAGE -->
        <tr>
                <td colspan="2">
    <a href="http://jakarta.apache.org"><img src="http://jakarta.apache.org/images/jakarta-logo.gif" align="left" border="0"/></a>
    </td>
          </tr>
      </table>
      <table border="0" width="100%" cellspacing="4">
        <tr><td colspan="2">
          <hr noshade="" size="1"/>
        </td></tr>
        
        <tr>
          <!-- LEFT SIDE NAVIGATION -->
          <td valign="top" nowrap="true">
                <p><strong>Apache Ant</strong></p>
    <ul>
          <li>      <a href="./index.html">Front Page</a>
  </li>
          <li>      <a href="./antnews.html">News</a>
  </li>
          <li>      <a href="./manual/index.html">Documentation</a>
  </li>
          <li>      <a href="./external.html">External Tools and Tasks</a>
  </li>
          <li>      <a href="./resources.html">Resources</a>
  </li>
          <li>      <a href="./faq.html">Ant FAQ</a>
  </li>
          <li>      <a href="./problems.html">Having Problems?</a>
  </li>
        </ul>
      <p><strong>Download</strong></p>
    <ul>
          <li>      <a href="http://jakarta.apache.org/site/binindex.html">Binaries</a>
  </li>
          <li>      <a href="http://jakarta.apache.org/site/sourceindex.html">Source Code</a>
  </li>
        </ul>
      <p><strong>Jakarta</strong></p>
    <ul>
          <li>      <a href="http://jakarta.apache.org/site/news.html">News & Status</a>
  </li>
          <li>      <a href="http://jakarta.apache.org/site/mission.html">Mission</a>
  </li>
          <li>      <a href="http://jakarta.apache.org/site/guidelines.html">Guidelines Notes</a>
  </li>
          <li>      <a href="http://jakarta.apache.org/site/faqs.html">FAQs</a>
  </li>
        </ul>
      <p><strong>Get Involved</strong></p>
    <ul>
          <li>      <a href="http://jakarta.apache.org/site/getinvolved.html">Overview</a>
  </li>
          <li>      <a href="http://jakarta.apache.org/site/cvsindex.html">CVS Repositories</a>
  </li>
          <li>      <a href="http://jakarta.apache.org/site/mail.html">Mailing Lists</a>
  </li>
          <li>      <a href="http://jakarta.apache.org/site/library.html">Reference Library</a>
  </li>
          <li>      <a href="http://nagoya.apache.org/bugzilla/enter_bug.cgi?product=Ant">Bug Database</a>
  </li>
          <li>      <a href="http://nagoya.apache.org/bugzilla/enter_bug.cgi?product=Ant&bug_severity=Enhancement">Enhancement Requests</a>
  </li>
        </ul>
            </td>
          <td align="left" valign="top">
  <table border="0" cellspacing="0" cellpadding="2" width="100%">
    <tr><td bgcolor="#525D76">
      <font color="#ffffff" face="arial,helvetica,sanserif">
        <strong>Questions</strong>
      </font>
    </td></tr>
    <tr><td>
      <blockquote>
                      <table border="0" cellspacing="0" cellpadding="2" width="100%">
    <tr><td bgcolor="#828DA6">
      <font color="#ffffff" face="arial,helvetica,sanserif">
        <strong>About this FAQ</strong>
      </font>
    </td></tr>
    <tr><td>
      <blockquote>
        <ul>
                    <li><a href="#latest-version">
  Where do I find the latest version of this
        document?
  </a></li>
                    <li><a href="#adding-faqs">
  How can I contribute to this FAQ?
  </a></li>
                    <li><a href="#creating-faq">
  How do you create the HTML version of this
        FAQ?
  </a></li>
                </ul>
      </blockquote>
    </td></tr>
  </table>
                <table border="0" cellspacing="0" cellpadding="2" width="100%">
    <tr><td bgcolor="#828DA6">
      <font color="#ffffff" face="arial,helvetica,sanserif">
        <strong>General</strong>
      </font>
    </td></tr>
    <tr><td>
      <blockquote>
        <ul>
                    <li><a href="#what-is-ant">
  What is Apache Ant?
  </a></li>
                    <li><a href="#ant-name">
  Why do you call it Ant?
  </a></li>
                    <li><a href="#history">
  Tell us a little bit about Ant's history.
  </a></li>
                </ul>
      </blockquote>
    </td></tr>
  </table>
                <table border="0" cellspacing="0" cellpadding="2" width="100%">
    <tr><td bgcolor="#828DA6">
      <font color="#ffffff" face="arial,helvetica,sanserif">
        <strong>Installation</strong>
      </font>
    </td></tr>
    <tr><td>
      <blockquote>
        <ul>
                    <li><a href="#no-gnu-tar">
  I get checksum errors when I try to extract the
      <code>tar.gz</code> distribution file. Why?
  </a></li>
                </ul>
      </blockquote>
    </td></tr>
  </table>
                <table border="0" cellspacing="0" cellpadding="2" width="100%">
    <tr><td bgcolor="#828DA6">
      <font color="#ffffff" face="arial,helvetica,sanserif">
        <strong>Using Ant</strong>
      </font>
    </td></tr>
    <tr><td>
      <blockquote>
        <ul>
                    <li><a href="#always-recompiles">
  Why does Ant always recompile all my Java files?
  </a></li>
                    <li><a href="#passing-cli-args">
  How do I pass parameters from the command line to my
        build file?
  </a></li>
                    <li><a href="#jikes-switches">
  How can I use Jikes specific command line
        switches?
  </a></li>
                    <li><a href="#shell-redirect-1">
  How do I include a &lt; character in my command line arguments?
  </a></li>
                    <li><a href="#shell-redirect-2">
  How do I redirect standard input or standard output
        in the <code>&lt;exec&gt;</code> task?
  </a></li>
                    <li><a href="#defaultexcludes">
  I've made a &lt;delete&gt; task to delete unwanted
      sourcesafe control files (CVS files, editor backup files), but
      it doesn't seem to work. The files never get deleted. What's
      wrong?
  </a></li>
                    <li><a href="#multi-conditions">
  I want to execute a particular target only if
        multiple conditions are true.
  </a></li>
                    <li><a href="#stop-dependency">
  I have a target I want to skip if a variable is set,
      so I have <code>unless="variable"</code> as an attribute 
      of the target.  The trouble is that all of the targets that this target 
      depends on are still executed. Why?
  </a></li>
                    <li><a href="#include-order">
  In my fileset, I've put in an
      <code>&lt;exclude&gt;</code> of all files followed by an
      <code>&lt;include&gt;</code> of just the files I want, but it
      isn't giving me anything at all. What's wrong?
      
  </a></li>
                </ul>
      </blockquote>
    </td></tr>
  </table>
                <table border="0" cellspacing="0" cellpadding="2" width="100%">
    <tr><td bgcolor="#828DA6">
      <font color="#ffffff" face="arial,helvetica,sanserif">
        <strong>Ant and IDEs/Editors</strong>
      </font>
    </td></tr>
    <tr><td>
      <blockquote>
        <ul>
                    <li><a href="#integration">
  Is Ant supported by my IDE/Editor?
  </a></li>
                    <li><a href="#emacs-mode">
  Why doesn't (X)Emacs/vi/MacOS X's project builder
      parse the error messages generated by Ant correctly?
  </a></li>
                </ul>
      </blockquote>
    </td></tr>
  </table>
                <table border="0" cellspacing="0" cellpadding="2" width="100%">
    <tr><td bgcolor="#828DA6">
      <font color="#ffffff" face="arial,helvetica,sanserif">
        <strong>Advanced issues</strong>
      </font>
    </td></tr>
    <tr><td>
      <blockquote>
        <ul>
                    <li><a href="#dtd">
  Is there a DTD that I can use to validate my build
      files?
  </a></li>
                    <li><a href="#xml-entity-include">
  How do I include an XML snippet in my build file?
  </a></li>
                    <li><a href="#mail-logger">
  How do I send an email with the result of my build
        process?
  </a></li>
                    <li><a href="#listener-properties">
  How do I get at the properties that Ant was running
      with from inside BuildListener?
  </a></li>
                </ul>
      </blockquote>
    </td></tr>
  </table>
                <table border="0" cellspacing="0" cellpadding="2" width="100%">
    <tr><td bgcolor="#828DA6">
      <font color="#ffffff" face="arial,helvetica,sanserif">
        <strong>Known problems</strong>
      </font>
    </td></tr>
    <tr><td>
      <blockquote>
        <ul>
                    <li><a href="#remove-cr">
  &lt;chmod&gt; or &lt;exec&gt; don't work in Ant
        1.3 on Unix
  </a></li>
                    <li><a href="#javadoc-cannot-execute">
  JavaDoc failed: java.io.IOException: javadoc: cannot execute
  </a></li>
                </ul>
      </blockquote>
    </td></tr>
  </table>
            </blockquote>
    </td></tr>
  </table>

  <table border="0" cellspacing="0" cellpadding="2" width="100%">
    <tr><td bgcolor="#525D76">
      <font color="#ffffff" face="arial,helvetica,sanserif">
        <strong>Answers</strong>
      </font>
    </td></tr>
    <tr><td>
      <blockquote>
                      <a name="latest-version">
  <table border="0" cellspacing="0" cellpadding="2" width="100%">
    <tr><td bgcolor="#828DA6">
      <font color="#ffffff" face="arial,helvetica,sanserif">
        <strong>
          Where do I find the latest version of this
        document?
        </strong>
      </font>
    </td></tr>
    <tr><td>
      <blockquote>
                              <p>The latest version can always be found at Ant's homepage 
          <a href="http://jakarta.apache.org/ant/faq.html">http://jakarta.apache.org/ant/faq.html</a>.</p>
                        </blockquote>
    </td></tr>
  </table>
  </a>
        <a name="adding-faqs">
  <table border="0" cellspacing="0" cellpadding="2" width="100%">
    <tr><td bgcolor="#828DA6">
      <font color="#ffffff" face="arial,helvetica,sanserif">
        <strong>
          How can I contribute to this FAQ?
        </strong>
      </font>
    </td></tr>
    <tr><td>
      <blockquote>
                              <p>The page you are looking it is generated from 
          <a href="http://cvs.apache.org/viewcvs.cgi/~checkout~/jakarta-ant/xdocs/faq.xml">this</a>
          document.  If you want to add a new question, please submit
          a patch against this document to one of Ant's mailing lists,
          the structure is hoped to be self-explaining.</p>
                                        <p>If you don't know how to create a patch, see the patches
          section of <a href="http://jakarta.apache.org/site/source.html">this
          page</a>.</p>
                        </blockquote>
    </td></tr>
  </table>
  </a>
        <a name="creating-faq">
  <table border="0" cellspacing="0" cellpadding="2" width="100%">
    <tr><td bgcolor="#828DA6">
      <font color="#ffffff" face="arial,helvetica,sanserif">
        <strong>
          How do you create the HTML version of this
        FAQ?
        </strong>
      </font>
    </td></tr>
    <tr><td>
      <blockquote>
                              <p>We use 
        <a href="http://jakarta.apache.org/velocity/anakia.html">Anakia</a>
        to render the HTML version from the original XML file.</p>
                                        <p>The Velocity stylesheets used to process the XML files can
        be found in the <code>xdocs/stylesheets</code> subdirectory of
        Ant's CVS repository - the build file <code>docs.xml</code> is
        used to drive Anakia.  This file assumes that you have the
        <code>jakarta-site2</code> module checked out from CVS as
        well, but if you follow the instruction from Anakia's
        homepage, you should get it to work without that.  Just make
        sure all required jars are in the task's classpath.</p>
                        </blockquote>
    </td></tr>
  </table>
  </a>
                        <a name="what-is-ant">
  <table border="0" cellspacing="0" cellpadding="2" width="100%">
    <tr><td bgcolor="#828DA6">
      <font color="#ffffff" face="arial,helvetica,sanserif">
        <strong>
          What is Apache Ant?
        </strong>
      </font>
    </td></tr>
    <tr><td>
      <blockquote>
                              <p> Ant is a Java based build tool. In theory it is kind of
        like "make" without makes wrinkles and with the full
        portability of pure Java code.</p>
                        </blockquote>
    </td></tr>
  </table>
  </a>
        <a name="ant-name">
  <table border="0" cellspacing="0" cellpadding="2" width="100%">
    <tr><td bgcolor="#828DA6">
      <font color="#ffffff" face="arial,helvetica,sanserif">
        <strong>
          Why do you call it Ant?
        </strong>
      </font>
    </td></tr>
    <tr><td>
      <blockquote>
                              <p>According to Ant's original author James Duncan
        Davidson, the name is an acronym for "Another Neat
        Tool".</p>
                                        <p>Later explanations go along the lines of "Ants are
        doing an extremely good job at building things" or
        "Ants are very small and can carry a weight a dozen times
        of their own" - describing what Ant is intended to
        be.</p>
                        </blockquote>
    </td></tr>
  </table>
  </a>
        <a name="history">
  <table border="0" cellspacing="0" cellpadding="2" width="100%">
    <tr><td bgcolor="#828DA6">
      <font color="#ffffff" face="arial,helvetica,sanserif">
        <strong>
          Tell us a little bit about Ant's history.
        </strong>
      </font>
    </td></tr>
    <tr><td>
      <blockquote>
                              <p>Initially Ant was part of the Tomcat code base when it was
        donated to the Apache Software Foundation - it has been
        created by James Duncan Davidson, who also is the original
        author of Tomcat. Ant was there to build Tomcat, nothing
        else.</p>
                                        <p>Soon thereafter several open source Java projects realized
        that Ant could solve the problems they had with makefiles.
        Starting with the projects hosted at Jakarta and the old Java
        Apache project, Ant spread like a virus and now is the build
        tool of choice for a lot of projects.</p>
                                        <p>In January 2000 Ant was moved to a separate CVS module and
        was promoted to a project of its own, independent of
        Tomcat.  Ant became Apache Ant.</p>
                                        <p>The first version of Ant that was exposed a lager audience
        was the one that shipped with Tomcat's 3.1 release on 19 April
        2000.  This version has later been referenced to as Ant
        0.3.1.</p>
                                        <p>The first official release of Ant as a stand alone product was
        Ant 1.1 released on 19 July 2000.  The complete release
        history:</p>
                                          <table>
              <tr>
                  <td bgcolor="#039acc" colspan="" rowspan="" 
      valign="top" align="left">
    <font color="#000000" size="-1" face="arial,helvetica,sanserif">
          Ant Version
        </font>
  </td>
                      <td bgcolor="#039acc" colspan="" rowspan="" 
      valign="top" align="left">
    <font color="#000000" size="-1" face="arial,helvetica,sanserif">
          Release Date
        </font>
  </td>
      </tr>
                  <tr>
                  <td bgcolor="#a0ddf0" colspan="" rowspan="" 
      valign="top" align="left">
    <font color="#000000" size="-1" face="arial,helvetica,sanserif">
          1.1
        </font>
  </td>
                      <td bgcolor="#a0ddf0" colspan="" rowspan="" 
      valign="top" align="left">
    <font color="#000000" size="-1" face="arial,helvetica,sanserif">
          19 July 2000
        </font>
  </td>
      </tr>
                  <tr>
                  <td bgcolor="#a0ddf0" colspan="" rowspan="" 
      valign="top" align="left">
    <font color="#000000" size="-1" face="arial,helvetica,sanserif">
          1.2
        </font>
  </td>
                      <td bgcolor="#a0ddf0" colspan="" rowspan="" 
      valign="top" align="left">
    <font color="#000000" size="-1" face="arial,helvetica,sanserif">
          24 October 2000
        </font>
  </td>
      </tr>
                  <tr>
                  <td bgcolor="#a0ddf0" colspan="" rowspan="" 
      valign="top" align="left">
    <font color="#000000" size="-1" face="arial,helvetica,sanserif">
          1.3
        </font>
  </td>
                      <td bgcolor="#a0ddf0" colspan="" rowspan="" 
      valign="top" align="left">
    <font color="#000000" size="-1" face="arial,helvetica,sanserif">
          3 March 2001
        </font>
  </td>
      </tr>
                  <tr>
                  <td bgcolor="#a0ddf0" colspan="" rowspan="" 
      valign="top" align="left">
    <font color="#000000" size="-1" face="arial,helvetica,sanserif">
          1.4
        </font>
  </td>
                      <td bgcolor="#a0ddf0" colspan="" rowspan="" 
      valign="top" align="left">
    <font color="#000000" size="-1" face="arial,helvetica,sanserif">
          3 September 2001
        </font>
  </td>
      </tr>
                  <tr>
                  <td bgcolor="#a0ddf0" colspan="" rowspan="" 
      valign="top" align="left">
    <font color="#000000" size="-1" face="arial,helvetica,sanserif">
          1.4.1
        </font>
  </td>
                      <td bgcolor="#a0ddf0" colspan="" rowspan="" 
      valign="top" align="left">
    <font color="#000000" size="-1" face="arial,helvetica,sanserif">
          11 October 2001
        </font>
  </td>
      </tr>
        </table>
                        </blockquote>
    </td></tr>
  </table>
  </a>
                        <a name="no-gnu-tar">
  <table border="0" cellspacing="0" cellpadding="2" width="100%">
    <tr><td bgcolor="#828DA6">
      <font color="#ffffff" face="arial,helvetica,sanserif">
        <strong>
          I get checksum errors when I try to extract the
      <code>tar.gz</code> distribution file. Why?
        </strong>
      </font>
    </td></tr>
    <tr><td>
      <blockquote>
                              <p>Ant's distribution contains file names that are longer
        than 100 characters, which is not supported by the standard
        tar file format. Several different implementations of tar use
        different and incompatible ways to work around this
        restriction.</p>
                                        <p>Ant's &lt;tar&gt; task can create tar archives that use
        the GNU tar extension, and this has been used when putting
        together the distribution. If you are using a different
        version of tar (for example, the one shipping with Solaris),
        you cannot use it to extract the archive.</p>
                                        <p>The solution is to either install GNU tar, which can be
        found <a href="http://www.gnu.org/software/tar/tar.html">here</a> 
        or use the zip archive instead (you can extract it using
        <code>jar xf</code>).</p>
                        </blockquote>
    </td></tr>
  </table>
  </a>
                        <a name="always-recompiles">
  <table border="0" cellspacing="0" cellpadding="2" width="100%">
    <tr><td bgcolor="#828DA6">
      <font color="#ffffff" face="arial,helvetica,sanserif">
        <strong>
          Why does Ant always recompile all my Java files?
        </strong>
      </font>
    </td></tr>
    <tr><td>
      <blockquote>
                              <p>In order to find out which files should be compiled, Ant
        compares the timestamps of the source files to those of the
        resulting <code>.class</code> files.  Opening all source files
        to find out which package they belong to would be very
        inefficient - instead of this, Ant expects you to place your
        source files in a directory hierarchy that mirrors your
        package hierarchy and to point Ant to the root of this
        directory tree with the <code>srcdir</code> attribute.</p>
                                        <p>Say you have <code>&lt;javac srcdir="src"
        destdir="dest" /&gt;</code>.  If Ant finds a file
        <code>src/a/b/C.java</code> it expects it to be in package
        <code>a.b</code> so that the resulting <code>.class</code>
        file is going to be <code>dest/a/b/C.class</code>.</p>
                                        <p>If your setup is different, Ant's heuristic won't work and
        it will recompile classes that are up to date.  Ant is not the
        only tool, that expects a source tree layout like this.</p>
                        </blockquote>
    </td></tr>
  </table>
  </a>
        <a name="passing-cli-args">
  <table border="0" cellspacing="0" cellpadding="2" width="100%">
    <tr><td bgcolor="#828DA6">
      <font color="#ffffff" face="arial,helvetica,sanserif">
        <strong>
          How do I pass parameters from the command line to my
        build file?
        </strong>
      </font>
    </td></tr>
    <tr><td>
      <blockquote>
                              <p>Use properties: <code>ant
        -D&lt;name&gt;=&lt;value&gt;</code> lets you define values for
        properties.  These can then be used within your build file as
        any normal property: <code>${&lt;name&gt;}</code> will put in
        <code>&lt;value&gt;</code>.</p>
                        </blockquote>
    </td></tr>
  </table>
  </a>
        <a name="jikes-switches">
  <table border="0" cellspacing="0" cellpadding="2" width="100%">
    <tr><td bgcolor="#828DA6">
      <font color="#ffffff" face="arial,helvetica,sanserif">
        <strong>
          How can I use Jikes specific command line
        switches?
        </strong>
      </font>
    </td></tr>
    <tr><td>
      <blockquote>
                              <p>A couple of switches are supported via magic
          properties:</p>
                                          <table>
              <tr>
                  <td bgcolor="#039acc" colspan="" rowspan="" 
      valign="top" align="left">
    <font color="#000000" size="-1" face="arial,helvetica,sanserif">
          switch
        </font>
  </td>
                      <td bgcolor="#039acc" colspan="" rowspan="" 
      valign="top" align="left">
    <font color="#000000" size="-1" face="arial,helvetica,sanserif">
          property
        </font>
  </td>
                      <td bgcolor="#039acc" colspan="" rowspan="" 
      valign="top" align="left">
    <font color="#000000" size="-1" face="arial,helvetica,sanserif">
          default
        </font>
  </td>
      </tr>
                  <tr>
                  <td bgcolor="#a0ddf0" colspan="" rowspan="" 
      valign="top" align="left">
    <font color="#000000" size="-1" face="arial,helvetica,sanserif">
          +E
        </font>
  </td>
                      <td bgcolor="#a0ddf0" colspan="" rowspan="" 
      valign="top" align="left">
    <font color="#000000" size="-1" face="arial,helvetica,sanserif">
          build.compiler.emacs
        </font>
  </td>
                      <td bgcolor="#a0ddf0" colspan="" rowspan="" 
      valign="top" align="left">
    <font color="#000000" size="-1" face="arial,helvetica,sanserif">
          false == not set
        </font>
  </td>
      </tr>
                  <tr>
                  <td bgcolor="#a0ddf0" colspan="" rowspan="" 
      valign="top" align="left">
    <font color="#000000" size="-1" face="arial,helvetica,sanserif">
          +P
        </font>
  </td>
                      <td bgcolor="#a0ddf0" colspan="" rowspan="" 
      valign="top" align="left">
    <font color="#000000" size="-1" face="arial,helvetica,sanserif">
          build.compiler.pedantic
        </font>
  </td>
                      <td bgcolor="#a0ddf0" colspan="" rowspan="" 
      valign="top" align="left">
    <font color="#000000" size="-1" face="arial,helvetica,sanserif">
          false == not set
        </font>
  </td>
      </tr>
                  <tr>
                  <td bgcolor="#a0ddf0" colspan="" rowspan="" 
      valign="top" align="left">
    <font color="#000000" size="-1" face="arial,helvetica,sanserif">
          +F
        </font>
  </td>
                      <td bgcolor="#a0ddf0" colspan="" rowspan="" 
      valign="top" align="left">
    <font color="#000000" size="-1" face="arial,helvetica,sanserif">
          build.compiler.fulldepend
        </font>
  </td>
                      <td bgcolor="#a0ddf0" colspan="" rowspan="" 
      valign="top" align="left">
    <font color="#000000" size="-1" face="arial,helvetica,sanserif">
          false == not set
        </font>
  </td>
      </tr>
                  <tr>
                  <td bgcolor="#a0ddf0" colspan="" rowspan="" 
      valign="top" align="left">
    <font color="#000000" size="-1" face="arial,helvetica,sanserif">
          <strong>only for Ant &lt; 1.4, replaced by the nowarn
                attribute of javac after that</strong> -nowarn
        </font>
  </td>
                      <td bgcolor="#a0ddf0" colspan="" rowspan="" 
      valign="top" align="left">
    <font color="#000000" size="-1" face="arial,helvetica,sanserif">
          build.compiler.warnings
        </font>
  </td>
                      <td bgcolor="#a0ddf0" colspan="" rowspan="" 
      valign="top" align="left">
    <font color="#000000" size="-1" face="arial,helvetica,sanserif">
          true == not set
        </font>
  </td>
      </tr>
        </table>
                        </blockquote>
    </td></tr>
  </table>
  </a>
        <a name="shell-redirect-1">
  <table border="0" cellspacing="0" cellpadding="2" width="100%">
    <tr><td bgcolor="#828DA6">
      <font color="#ffffff" face="arial,helvetica,sanserif">
        <strong>
          How do I include a &lt; character in my command line arguments?
        </strong>
      </font>
    </td></tr>
    <tr><td>
      <blockquote>
                              <p>The short answer is "Use <code>&amp;lt;</code>".</p>
                                        <p>The long answer is, that this probably won't do what you
        want anyway, see <a href="#shell-redirect-2">the next
        section</a>.</p>
                        </blockquote>
    </td></tr>
  </table>
  </a>
        <a name="shell-redirect-2">
  <table border="0" cellspacing="0" cellpadding="2" width="100%">
    <tr><td bgcolor="#828DA6">
      <font color="#ffffff" face="arial,helvetica,sanserif">
        <strong>
          How do I redirect standard input or standard output
        in the <code>&lt;exec&gt;</code> task?
        </strong>
      </font>
    </td></tr>
    <tr><td>
      <blockquote>
                              <p>Say you want to redirect the standard input stream of the
        <code>cat</code> command to read from a file, something
        like</p>
                                          <div align="left">
    <table cellspacing="4" cellpadding="0" border="0">
      <tr>
        <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
        <td bgcolor="#023264" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
        <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
      </tr>
      <tr>
        <td bgcolor="#023264" width="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
        <td bgcolor="#ffffff"><pre>
shell-prompt&gt; cat &lt; foo
</pre></td>
        <td bgcolor="#023264" width="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
      </tr>
      <tr>
        <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
        <td bgcolor="#023264" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
        <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
      </tr>
    </table>
  </div>
                                        <p>and try to translate it into</p>
                                          <div align="left">
    <table cellspacing="4" cellpadding="0" border="0">
      <tr>
        <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
        <td bgcolor="#023264" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
        <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
      </tr>
      <tr>
        <td bgcolor="#023264" width="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
        <td bgcolor="#ffffff"><pre>
&lt;exec executable=&quot;cat&quot;&gt;
  &lt;arg value=&quot;&amp;lt;&quot; /&gt;
  &lt;arg value=&quot;foo&quot; /&gt;
&lt;/exec&gt;
</pre></td>
        <td bgcolor="#023264" width="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
      </tr>
      <tr>
        <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
        <td bgcolor="#023264" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
        <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
      </tr>
    </table>
  </div>
                                        <p>This will not do what you expect.  The input-redirection is
        performed by your shell, not the command itself, so this
        should read:</p>
                                          <div align="left">
    <table cellspacing="4" cellpadding="0" border="0">
      <tr>
        <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
        <td bgcolor="#023264" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
        <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
      </tr>
      <tr>
        <td bgcolor="#023264" width="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
        <td bgcolor="#ffffff"><pre>
&lt;exec executable=&quot;/bin/sh&quot;&gt;
  &lt;arg value=&quot;-c&quot; /&gt;
  &lt;arg value=&quot;cat &amp;lt; foo&quot; /&gt;
&lt;/exec&gt;
</pre></td>
        <td bgcolor="#023264" width="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
      </tr>
      <tr>
        <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
        <td bgcolor="#023264" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
        <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
      </tr>
    </table>
  </div>
                                        <p>Note, that you must use the <code>value</code> attribute of
        <code>&lt;arg&gt;</code> in the last element.</p>
                        </blockquote>
    </td></tr>
  </table>
  </a>
        <a name="defaultexcludes">
  <table border="0" cellspacing="0" cellpadding="2" width="100%">
    <tr><td bgcolor="#828DA6">
      <font color="#ffffff" face="arial,helvetica,sanserif">
        <strong>
          I've made a &lt;delete&gt; task to delete unwanted
      sourcesafe control files (CVS files, editor backup files), but
      it doesn't seem to work. The files never get deleted. What's
      wrong?
        </strong>
      </font>
    </td></tr>
    <tr><td>
      <blockquote>
                              <p>This is probably happening because by default, Ant excludes
        SourceSafe control files (<code>vssver.scc</code>) and other
        files from FileSets.</p>
                                        <p>Here's what you probably did:</p>
                                          <div align="left">
    <table cellspacing="4" cellpadding="0" border="0">
      <tr>
        <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
        <td bgcolor="#023264" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
        <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
      </tr>
      <tr>
        <td bgcolor="#023264" width="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
        <td bgcolor="#ffffff"><pre>
&lt;delete&gt;
  &lt;fileset dir=&quot;${build.src}&quot; includes=&quot;**/vssver.scc&quot;/&gt;
&lt;/delete&gt;
</pre></td>
        <td bgcolor="#023264" width="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
      </tr>
      <tr>
        <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
        <td bgcolor="#023264" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
        <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
      </tr>
    </table>
  </div>
                                        <p>You need to switch off the default exclusions and it will work:</p>
                                          <div align="left">
    <table cellspacing="4" cellpadding="0" border="0">
      <tr>
        <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
        <td bgcolor="#023264" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
        <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
      </tr>
      <tr>
        <td bgcolor="#023264" width="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
        <td bgcolor="#ffffff"><pre>
&lt;delete&gt;
  &lt;fileset dir=&quot;${build.src}&quot; includes=&quot;**/vssver.scc&quot;
           defaultexcludes=&quot;no&quot;/&gt;
&lt;/delete&gt;
</pre></td>
        <td bgcolor="#023264" width="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
      </tr>
      <tr>
        <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
        <td bgcolor="#023264" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
        <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
      </tr>
    </table>
  </div>
                                        <p>For a complete listing of the patterns that are excluded
        by default, see <a href="manual/dirtasks.html">the user
        manual</a>.</p>
                        </blockquote>
    </td></tr>
  </table>
  </a>
        <a name="multi-conditions">
  <table border="0" cellspacing="0" cellpadding="2" width="100%">
    <tr><td bgcolor="#828DA6">
      <font color="#ffffff" face="arial,helvetica,sanserif">
        <strong>
          I want to execute a particular target only if
        multiple conditions are true.
        </strong>
      </font>
    </td></tr>
    <tr><td>
      <blockquote>
                              <p>There are actually several answers to this question.</p>
                                        <p>If you have only one set and one unset property to test,
        you can put both an <code>if</code> and an <code>unless</code>
        attribute into the target. The target will act as if they
        are "anded" together.</p>
                                        <p>If you are using a version of Ant 1.3 or earlier, the
        way to work with all other cases is to chain targets together
        to determine the specific state you wish to test for.</p>
                                        <p>To see how this works, assume you have three properties,
        <code>prop1</code>, <code>prop2</code>, and <code>prop3</code>.
        You want to test that <code>prop1</code> and <code>prop2</code> 
        are set, but that <code>prop3</code> is not. If the condition
        holds true you want to echo "yes".</p>
                                        <p>Here is the implementation in Ant 1.3 and earlier:</p>
                                          <div align="left">
    <table cellspacing="4" cellpadding="0" border="0">
      <tr>
        <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
        <td bgcolor="#023264" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
        <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
      </tr>
      <tr>
        <td bgcolor="#023264" width="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
        <td bgcolor="#ffffff"><pre>
&lt;target name=&quot;cond&quot; depends=&quot;cond-if&quot;/&gt;

&lt;target name=&quot;cond-if&quot; if=&quot;prop1&quot;&gt;
  &lt;antcall target=&quot;cond-if-2&quot;/&gt;
&lt;/target&gt;

&lt;target name=&quot;cond-if-2&quot; if=&quot;prop2&quot;&gt;
  &lt;antcall target=&quot;cond-if-3&quot;/&gt;
&lt;/target&gt;

&lt;target name=&quot;cond-if-3&quot; unless=&quot;prop3&quot;&gt;
  &lt;echo message=&quot;yes&quot;/&gt;
&lt;/target&gt;
</pre></td>
        <td bgcolor="#023264" width="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
      </tr>
      <tr>
        <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
        <td bgcolor="#023264" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
        <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
      </tr>
    </table>
  </div>
                                        <p>Note that <code>&lt;antcall&gt;</code> tasks do not pass
        property changes back up to the environment they were called
        from.</p>
                                        <p>Starting with Ant 1.4, you can use the
        <code>&lt;condition&gt;</code> task.</p>
                                          <div align="left">
    <table cellspacing="4" cellpadding="0" border="0">
      <tr>
        <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
        <td bgcolor="#023264" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
        <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
      </tr>
      <tr>
        <td bgcolor="#023264" width="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
        <td bgcolor="#ffffff"><pre>
&lt;target name=&quot;cond&quot; depends=&quot;cond-if,cond-else&quot;/&gt;

&lt;target name=&quot;check-cond&quot;&gt;
  &lt;condition property=&quot;cond-is-true&quot;&gt;
    &lt;and&gt;
      &lt;not&gt;
        &lt;equals arg1=&quot;${prop1}&quot; arg2=&quot;$${prop1}&quot; /&gt;
      &lt;/not&gt;
      &lt;not&gt;
        &lt;equals arg1=&quot;${prop2}&quot; arg2=&quot;$${prop2}&quot; /&gt;
      &lt;/not&gt;
      &lt;equals arg1=&quot;${prop3}&quot; arg2=&quot;$${prop3}&quot; /&gt;
    &lt;/and&gt;
  &lt;/condition&gt;
&lt;/target&gt;

&lt;target name=&quot;cond-if&quot; depends=&quot;check-cond&quot; if=&quot;cond-is-true&quot;&gt;
  &lt;echo message=&quot;yes&quot;/&gt;
&lt;/target&gt;

&lt;target name=&quot;cond-else&quot; depends=&quot;check-cond&quot; unless=&quot;cond-is-true&quot;&gt;
  &lt;echo message=&quot;no&quot;/&gt;
&lt;/target&gt;
</pre></td>
        <td bgcolor="#023264" width="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
      </tr>
      <tr>
        <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
        <td bgcolor="#023264" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
        <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
      </tr>
    </table>
  </div>
                                        <p>This version takes advantage of two things:</p>
                                        <ul>
          <li>If a property <code>a</code> has not been set,
          <code>${a}</code> will evaluate to <code>${a}</code>.</li>

          <li>To get a literal <code>$</code> in Ant, you have to
          escape it with another <code>$</code> - this will also break
          the special treatment of the sequence <code>${</code>.</li>
        </ul>
                                        <p>This is neither readable, nor easy to understand, therefore
        post-1.4.1 Ant introduces the <code>&lt;isset&gt;</code> element 
	to the <code>&lt;condition&gt;</code> task.</p>
                                        <p>Here is the previous example done using
        <code>&lt;isset&gt;</code>:</p>
                                          <div align="left">
    <table cellspacing="4" cellpadding="0" border="0">
      <tr>
        <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
        <td bgcolor="#023264" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
        <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
      </tr>
      <tr>
        <td bgcolor="#023264" width="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
        <td bgcolor="#ffffff"><pre>
&lt;target name=&quot;check-cond&quot;&gt;
  &lt;condition property=&quot;cond-is-true&quot;&gt;
    &lt;and&gt;
      &lt;isset property=&quot;prop1&quot;/&gt;
      &lt;isset property=&quot;prop2&quot;/&gt;
      &lt;not&gt;
        &lt;isset property=&quot;prop3&quot;/&gt;
      &lt;/not&gt;
    &lt;/and&gt;
  &lt;/condition&gt;
&lt;/target&gt;
</pre></td>
        <td bgcolor="#023264" width="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
      </tr>
      <tr>
        <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
        <td bgcolor="#023264" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
        <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
      </tr>
    </table>
  </div>
                                        <p>The last option is to use a scripting language to set the
        properties. This can be particularly handy when you need much
        better control than the simple conditions shown here, but of
        course comes with the overhead of adding JAR files to support
        the language, to say nothing of the added maintenance in requiring
        two languages to implement a single system.</p>
                        </blockquote>
    </td></tr>
  </table>
  </a>
        <a name="stop-dependency">
  <table border="0" cellspacing="0" cellpadding="2" width="100%">
    <tr><td bgcolor="#828DA6">
      <font color="#ffffff" face="arial,helvetica,sanserif">
        <strong>
          I have a target I want to skip if a variable is set,
      so I have <code>unless="variable"</code> as an attribute 
      of the target.  The trouble is that all of the targets that this target 
      depends on are still executed. Why?
        </strong>
      </font>
    </td></tr>
    <tr><td>
      <blockquote>
                              <p>The list of dependencies is generated by Ant before any of the
        targets are run. This allows dependent targets such as an 
        <code>init</code> target to set properties that can control the 
	execution of the targets higher in the dependency graph. This 
	is a good thing.</p>
                                        <p>When your dependencies actually break down the higher level task
        into several simpler steps, though, this behaviour becomes 
        counterintuitive. There are a couple of solutions available:
        </p>
                                        <ol>
          <li>Put the same condition on each of the dependent targets.</li>
	  
          <li>Execute the steps using <code>&lt;antcall&gt;</code>
          instead of specifying them inside the <code>depends</code>
          attribute.</li>
        </ol>
                        </blockquote>
    </td></tr>
  </table>
  </a>
        <a name="include-order">
  <table border="0" cellspacing="0" cellpadding="2" width="100%">
    <tr><td bgcolor="#828DA6">
      <font color="#ffffff" face="arial,helvetica,sanserif">
        <strong>
          In my fileset, I've put in an
      <code>&lt;exclude&gt;</code> of all files followed by an
      <code>&lt;include&gt;</code> of just the files I want, but it
      isn't giving me anything at all. What's wrong?
      
        </strong>
      </font>
    </td></tr>
    <tr><td>
      <blockquote>
                              <p>The order of the <code>&lt;include&gt;</code> and
        <code>&lt;exclude&gt;</code> tags within a fileset is ignored
        when the fileset is created. Instead, all of the
        <code>&lt;include&gt;</code> elements are processed together,
        followed by all of the <code>&lt;exclude&gt;</code>
        elements. This means that the <code>&lt;exclude&gt;</code>
        elements only apply to the file list produced by the
        <code>&lt;include&gt;</code> elements.</p>
                                        <p>To get the files you want, focus on just the
	<code>&lt;include&gt;</code> patterns that would be necessary
	to get them. If you need to trim the list that the includes
	would produce, use excludes.</p>
                        </blockquote>
    </td></tr>
  </table>
  </a>
                        <a name="integration">
  <table border="0" cellspacing="0" cellpadding="2" width="100%">
    <tr><td bgcolor="#828DA6">
      <font color="#ffffff" face="arial,helvetica,sanserif">
        <strong>
          Is Ant supported by my IDE/Editor?
        </strong>
      </font>
    </td></tr>
    <tr><td>
      <blockquote>
                              <p>See the <a href="external.html#IDE and Editor Integration">section 
        on IDE integration</a> on our external tools page.</p>
                        </blockquote>
    </td></tr>
  </table>
  </a>
        <a name="emacs-mode">
  <table border="0" cellspacing="0" cellpadding="2" width="100%">
    <tr><td bgcolor="#828DA6">
      <font color="#ffffff" face="arial,helvetica,sanserif">
        <strong>
          Why doesn't (X)Emacs/vi/MacOS X's project builder
      parse the error messages generated by Ant correctly?
        </strong>
      </font>
    </td></tr>
    <tr><td>
      <blockquote>
                              <p>Ant adds a "banner" with the name of the current
        task in front of all messages - and there are no built-in
        regular expressions in your Editor that would account for
        this.</p>
                                        <p>You can disable this banner by invoking Ant with the
        <code>-emacs</code> switch. Alternatively you can add the
        following snippet to your <code>.emacs</code> to make Emacs
        understand Ant's output.</p>
                                          <div align="left">
    <table cellspacing="4" cellpadding="0" border="0">
      <tr>
        <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
        <td bgcolor="#023264" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
        <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
      </tr>
      <tr>
        <td bgcolor="#023264" width="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
        <td bgcolor="#ffffff"><pre>
(require 'compile)
(setq compilation-error-regexp-alist
  (append (list 
     ;; works for jikes
     '(&quot;^\\s-*\\[[^]]*\\]\\s-*\\(.+\\):\\([0-9]+\\):\\([0-9]+\\):[0-9]+:[0-9]+:&quot; 1 2 3)
     ;; works for javac 
     '(&quot;^\\s-*\\[[^]]*\\]\\s-*\\(.+\\):\\([0-9]+\\):&quot; 1 2))
  compilation-error-regexp-alist))
</pre></td>
        <td bgcolor="#023264" width="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
      </tr>
      <tr>
        <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
        <td bgcolor="#023264" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
        <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
      </tr>
    </table>
  </div>
                                        <p>Yet another alternative that preserves most of Ant's
        formatting is to pipe Ant's output through the following Perl
        script by Dirk-Willem van Gulik:</p>
                                          <div align="left">
    <table cellspacing="4" cellpadding="0" border="0">
      <tr>
        <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
        <td bgcolor="#023264" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
        <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
      </tr>
      <tr>
        <td bgcolor="#023264" width="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
        <td bgcolor="#ffffff"><pre>
#!/usr/bin/perl
#
# May 2001 dirkx@apache.org - remove any
# [foo] lines from the output; keeping
# spacing more or less there.
#
$|=1;
while(&lt;STDIN&gt;) {
	if (s/^(\s+)\[(\w+)\]//) {
		if ($2 ne $last) {
			print &quot;$1\[$2\]&quot;;
			$s = ' ' x length($2);
		} else {
			print &quot;$1 $s &quot;;
		};
		$last = $2;
	};
	print;
};
</pre></td>
        <td bgcolor="#023264" width="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
      </tr>
      <tr>
        <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
        <td bgcolor="#023264" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
        <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
      </tr>
    </table>
  </div>
                        </blockquote>
    </td></tr>
  </table>
  </a>
                        <a name="dtd">
  <table border="0" cellspacing="0" cellpadding="2" width="100%">
    <tr><td bgcolor="#828DA6">
      <font color="#ffffff" face="arial,helvetica,sanserif">
        <strong>
          Is there a DTD that I can use to validate my build
      files?
        </strong>
      </font>
    </td></tr>
    <tr><td>
      <blockquote>
                              <p>An incomplete DTD can be created by the
          <code>&lt;antstructure&gt;</code> task - but this one
          has a few problems:</p>
                                        <ul>
            <li>It doesn't know about required attributes.  Only
            manual tweaking of this file can help here.</li>
          
            <li>It is not complete - if you add new tasks via
            <code>&lt;taskdef&gt;</code> it won't know about it.  See
            <a href="http://www.sdv.fr/pages/casa/html/ant-dtd.en.html">this
            page</a> by Michel Casabianca for a solution to this
            problem.  Note that the DTD you can download at this page
            is based on Ant 0.3.1.</li>

            <li>It may even be an invalid DTD.  As Ant allows tasks
            writers to define arbitrary elements, name collisions will
            happen quite frequently - if your version of Ant contains
            the optional <code>&lt;test&gt;</code> and
            <code>&lt;junit&gt;</code> tasks, there are two XML
            elements named test (the task and the nested child element
            of <code>&lt;junit&gt;</code>) with different attribute
            lists.  This problem cannot be solved, DTDs don't give a
            syntax rich enough to support this.</li>
          </ul>
                        </blockquote>
    </td></tr>
  </table>
  </a>
        <a name="xml-entity-include">
  <table border="0" cellspacing="0" cellpadding="2" width="100%">
    <tr><td bgcolor="#828DA6">
      <font color="#ffffff" face="arial,helvetica,sanserif">
        <strong>
          How do I include an XML snippet in my build file?
        </strong>
      </font>
    </td></tr>
    <tr><td>
      <blockquote>
                              <p>You can use XML's way of including external files and let
        the parser do the job for Ant:</p>
                                          <div align="left">
    <table cellspacing="4" cellpadding="0" border="0">
      <tr>
        <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
        <td bgcolor="#023264" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
        <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
      </tr>
      <tr>
        <td bgcolor="#023264" width="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
        <td bgcolor="#ffffff"><pre>
&lt;?xml version=&quot;1.0&quot;?&gt;

&lt;!DOCTYPE project [
    &lt;!ENTITY common SYSTEM &quot;file:./common.xml&quot;&gt;
]&gt;

&lt;project name=&quot;test&quot; default=&quot;test&quot; basedir=&quot;.&quot;&gt;

  &lt;target name=&quot;setup&quot;&gt;
    ...
  &lt;/target&gt;

  &amp;common;

  ...

&lt;/project&gt;
</pre></td>
        <td bgcolor="#023264" width="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
      </tr>
      <tr>
        <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
        <td bgcolor="#023264" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
        <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
      </tr>
    </table>
  </div>
                                        <p>will literally include the contents of <code>common.xml</code> where
        you've placed the <code>&amp;common;</code> entity.</p>
                                        <p>In combination with a DTD, this would look like this:</p>
                                          <div align="left">
    <table cellspacing="4" cellpadding="0" border="0">
      <tr>
        <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
        <td bgcolor="#023264" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
        <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
      </tr>
      <tr>
        <td bgcolor="#023264" width="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
        <td bgcolor="#ffffff"><pre>
&lt;!DOCTYPE project PUBLIC &quot;-//ANT//DTD project//EN&quot; &quot;file:./ant.dtd&quot; [
   &lt;!ENTITY include SYSTEM &quot;file:./header.xml&quot;&gt;
]&gt;
</pre></td>
        <td bgcolor="#023264" width="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
      </tr>
      <tr>
        <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
        <td bgcolor="#023264" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
        <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
      </tr>
    </table>
  </div>
                        </blockquote>
    </td></tr>
  </table>
  </a>
        <a name="mail-logger">
  <table border="0" cellspacing="0" cellpadding="2" width="100%">
    <tr><td bgcolor="#828DA6">
      <font color="#ffffff" face="arial,helvetica,sanserif">
        <strong>
          How do I send an email with the result of my build
        process?
        </strong>
      </font>
    </td></tr>
    <tr><td>
      <blockquote>
                              <p>If you are using a nightly-build of Ant 1.5 after
        2001-12-14, you can use the built-in MailLogger.</p>
                                          <div align="left">
    <table cellspacing="4" cellpadding="0" border="0">
      <tr>
        <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
        <td bgcolor="#023264" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
        <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
      </tr>
      <tr>
        <td bgcolor="#023264" width="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
        <td bgcolor="#ffffff"><pre>
         ant -logger org.apache.tools.ant.listener.MailLogger
</pre></td>
        <td bgcolor="#023264" width="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
      </tr>
      <tr>
        <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
        <td bgcolor="#023264" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
        <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
      </tr>
    </table>
  </div>
                                        <p>See the <a href="http://cvs.apache.org/viewcvs/~checkout~/jakarta-ant/docs/manual/listeners.html?content-type=text/html">Listener
        &amp; Logger documentation</a> for details on the properties
        required.</p>
                                        <p>For older versions of Ant you can use a custom
        BuildListener, that sends out an email
        in the buildFinished() method.  Will Glozer
        &lt;will.glozer@jda.com&gt; has written such a listener based
        on <a href="http://java.sun.com/products/javamail/">JavaMail</a>, 
        the source is</p>
                                          <div align="left">
    <table cellspacing="4" cellpadding="0" border="0">
      <tr>
        <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
        <td bgcolor="#023264" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
        <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
      </tr>
      <tr>
        <td bgcolor="#023264" width="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
        <td bgcolor="#ffffff"><pre>
import java.io.*;
import java.util.*;
import javax.mail.*;
import javax.mail.internet.*;
import org.apache.tools.ant.*;

/**
 * A simple listener that waits for a build to finish and sends an email
 * of the results.  The settings are stored in &quot;monitor.properties&quot; and
 * are fairly self explanatory.
 *
 * @author      Will Glozer
 * @version     1.05a 09/06/2000
 */
public class BuildMonitor implements BuildListener {
    protected Properties props;

    /**
     * Create a new BuildMonitor.
     */
    public BuildMonitor() throws Exception {
        props = new Properties();
        InputStream is = getClass().getResourceAsStream(&quot;monitor.properties&quot;);
        props.load(is);
        is.close();
    }

    public void buildStarted(BuildEvent e) {
    }

    /**
     * Determine the status of the build and the actions to follow, now that
     * the build has completed.
     *
     * @param       e       Event describing the build tatus.
     */
    public void buildFinished(BuildEvent e) {
        Throwable th = e.getException();
        String status = (th != null) ? &quot;failed&quot; : &quot;succeeded&quot;;
        
        try {
            String key = &quot;build.&quot; + status;
            if (props.getProperty(key + &quot;.notify&quot;).equalsIgnoreCase(&quot;false&quot;)) {
                    return;
            }
            
            Session session = Session.getDefaultInstance(props, null);

            MimeMessage message = new MimeMessage(session);
            message.addRecipients(Message.RecipientType.TO, parseAddresses(
                props.getProperty(key + &quot;.email.to&quot;)));
            message.setSubject(props.getProperty(key + &quot;.email.subject&quot;));

            BufferedReader br = new BufferedReader(new FileReader(
                props.getProperty(&quot;build.log&quot;)));
            StringWriter sw = new StringWriter();
            
            String line = br.readLine();
            while (line != null) {
                sw.write(line);
                sw.write(&quot;\n&quot;);
                line = br.readLine();
            }
            br.close();
            
            message.setText(sw.toString(), &quot;UTF-8&quot;);
            sw.close();
            
            Transport transport = session.getTransport();
            transport.connect();
            transport.send(message);
            transport.close();
        } catch (Exception ex) {
            System.out.println(&quot;BuildMonitor failed to send email!&quot;);
            ex.printStackTrace();
        }
    }

    /**
     * Parse a comma separated list of internet email addresses.
     *
     * @param       s       The list of addresses.
     * @return      Array of Addresses.
     */
    protected Address[] parseAddresses(String s) throws Exception {
        StringTokenizer st = new StringTokenizer(s, &quot;,&quot;);
        Address[] addrs = new Address[st.countTokens()];

        for (int i = 0; i &lt; addrs.length; i++) {
            addrs[i] = new InternetAddress(st.nextToken());
        }
        return addrs;
    }

    public void messageLogged(BuildEvent e) {
    }

    public void targetStarted(BuildEvent e) {
    }

    public void targetFinished(BuildEvent e) {
    }

    public void taskStarted(BuildEvent e) {        
    }

    public void taskFinished(BuildEvent e) {
    }
}
</pre></td>
        <td bgcolor="#023264" width="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
      </tr>
      <tr>
        <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
        <td bgcolor="#023264" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
        <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
      </tr>
    </table>
  </div>
                                        <p>With a <code>monitor.properties</code> like this</p>
                                          <div align="left">
    <table cellspacing="4" cellpadding="0" border="0">
      <tr>
        <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
        <td bgcolor="#023264" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
        <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
      </tr>
      <tr>
        <td bgcolor="#023264" width="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
        <td bgcolor="#ffffff"><pre>
# configuration for build monitor

mail.transport.protocol=smtp
mail.smtp.host=&lt;host&gt;
mail.from=Will Glozer &lt;will.glozer@jda.com&gt;

build.log=build.log

build.failed.notify=true
build.failed.email.to=will.glozer@jda.com
build.failed.email.subject=Nightly build failed!

build.succeeded.notify=true
build.succeeded.email.to=will.glozer@jda.com
build.succeeded.email.subject=Nightly build succeeded!
</pre></td>
        <td bgcolor="#023264" width="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
      </tr>
      <tr>
        <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
        <td bgcolor="#023264" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
        <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
      </tr>
    </table>
  </div>
                                        <p><code>monitor.properties</code> should be placed right next
        to your compiled <code>BuildMonitor.class</code>.  To use it,
        invoke Ant like</p>
                                          <div align="left">
    <table cellspacing="4" cellpadding="0" border="0">
      <tr>
        <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
        <td bgcolor="#023264" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
        <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
      </tr>
      <tr>
        <td bgcolor="#023264" width="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
        <td bgcolor="#ffffff"><pre>
ant -listener BuildMonitor -logfile build.log
</pre></td>
        <td bgcolor="#023264" width="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
      </tr>
      <tr>
        <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
        <td bgcolor="#023264" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
        <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
      </tr>
    </table>
  </div>
                                        <p>Make sure that <code>mail.jar</code> from JavaMail and
        <code>activation.jar</code> from the 
        <a href="http://java.sun.com/products/javabeans/glasgow/jaf.html">Java
        Beans Activation Framework</a> in your <code>CLASSPATH</code>.</p>
                        </blockquote>
    </td></tr>
  </table>
  </a>
        <a name="listener-properties">
  <table border="0" cellspacing="0" cellpadding="2" width="100%">
    <tr><td bgcolor="#828DA6">
      <font color="#ffffff" face="arial,helvetica,sanserif">
        <strong>
          How do I get at the properties that Ant was running
      with from inside BuildListener?
        </strong>
      </font>
    </td></tr>
    <tr><td>
      <blockquote>
                              <p>You can get at a hashtable with all the properties that Ant
        has been using through the BuildEvent parameter. For
        example:</p>
                                          <div align="left">
    <table cellspacing="4" cellpadding="0" border="0">
      <tr>
        <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
        <td bgcolor="#023264" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
        <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
      </tr>
      <tr>
        <td bgcolor="#023264" width="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
        <td bgcolor="#ffffff"><pre>
public void buildFinished(BuildEvent e) {
    Hashtable table = e.getProject().getProperties();
    String buildpath = (String)table.get(&quot;build.path&quot;);
    ...
}
</pre></td>
        <td bgcolor="#023264" width="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
      </tr>
      <tr>
        <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
        <td bgcolor="#023264" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
        <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
      </tr>
    </table>
  </div>
                                        <p>This is more accurate than just reading the same property
        files that your project does, since it will give the correct
        results for properties that are specified on the command line
        when running Ant.</p>
                        </blockquote>
    </td></tr>
  </table>
  </a>
                        <a name="remove-cr">
  <table border="0" cellspacing="0" cellpadding="2" width="100%">
    <tr><td bgcolor="#828DA6">
      <font color="#ffffff" face="arial,helvetica,sanserif">
        <strong>
          &lt;chmod&gt; or &lt;exec&gt; don't work in Ant
        1.3 on Unix
        </strong>
      </font>
    </td></tr>
    <tr><td>
      <blockquote>
                              <p>The <code>antRun</code> script in <code>ANT_HOME/bin</code>
        has DOS instead of Unix line endings, you must remove the
        carriage return characters from this file.  This can be done by
        using Ant's &lt;fixcrlf&gt; task or something like:</p>
                                          <div align="left">
    <table cellspacing="4" cellpadding="0" border="0">
      <tr>
        <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
        <td bgcolor="#023264" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
        <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
      </tr>
      <tr>
        <td bgcolor="#023264" width="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
        <td bgcolor="#ffffff"><pre>
tr -d '\r' &lt; $ANT_HOME/bin/antRun &gt; /tmp/foo
mv /tmp/foo $ANT_HOME/bin/antRun
</pre></td>
        <td bgcolor="#023264" width="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
      </tr>
      <tr>
        <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
        <td bgcolor="#023264" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
        <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
      </tr>
    </table>
  </div>
                        </blockquote>
    </td></tr>
  </table>
  </a>
        <a name="javadoc-cannot-execute">
  <table border="0" cellspacing="0" cellpadding="2" width="100%">
    <tr><td bgcolor="#828DA6">
      <font color="#ffffff" face="arial,helvetica,sanserif">
        <strong>
          JavaDoc failed: java.io.IOException: javadoc: cannot execute
        </strong>
      </font>
    </td></tr>
    <tr><td>
      <blockquote>
                              <p>There is a bug in the Solaris reference implementation of
        the JDK, see <a href="http://developer.java.sun.com/developer/bugParade/bugs/4230399.html">http://developer.java.sun.com/developer/bugParade/bugs/4230399.html</a>.
        This also appears to be true under Linux, moving the JDK to
        the front of the PATH fixes the problem.</p>
                        </blockquote>
    </td></tr>
  </table>
  </a>
              </blockquote>
    </td></tr>
  </table>
            </td>
        </tr>

        <!-- FOOTER -->
        <tr><td colspan="2">
          <hr noshade="" size="1"/>
        </td></tr>
        <tr><td colspan="2">
          <div align="center"><font color="#525D76" size="-1"><em>
          Copyright &#169; 1999-2002, Apache Software Foundation
          </em></font></div>
        </td></tr>
      </table>
    </body>
  </html>
<!-- end the processing -->