summaryrefslogtreecommitdiff
path: root/docs/problems.html
blob: 12748fe0cc541435ebaea57556ba17c07cc28299 (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
<!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="Conor MacNeill">
  <meta name="email" value="conor@apache.org">
        
      <title>The Jakarta Site - Having Problems?</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">
        <a name="Having Problems?"><strong>Having Problems?</strong></a>
      </font>
    </td></tr>
    <tr><td>
      <blockquote>
                        <p>If you are having problems with Ant, this page details some steps you can take
         to try and resolve the problem. If you can't resolve the problem then this page will help
         you collect some of the relevant information to provide a bug report. This information will help 
         the Ant developers understand and resolve the problem. Of course, not all of the steps here will 
         make sense for every problem you encounter. These are just some suggestions to 
         point you in the right direction.
      </p>
                                  <table border="0" cellspacing="0" cellpadding="2" width="100%">
    <tr><td bgcolor="#828DA6">
      <font color="#ffffff" face="arial,helvetica,sanserif">
        <a name="Read the Manual"><strong>Read the Manual</strong></a>
      </font>
    </td></tr>
    <tr><td>
      <blockquote>
                        <p>The first step to take when you have a problem is to read the <a href="manual/index.html">
           manual</a> entry for the task or concept that is giving you trouble. Check particularly the meaning of
           attributes and nested elements. Perhaps an attribute would provide the behavior you require. If you
           have problems with the manual, then you can submit a documentation bug report (see below) to help us
           improve the Ant documentation.
        </p>
                    </blockquote>
    </td></tr>
  </table>
                                  <table border="0" cellspacing="0" cellpadding="2" width="100%">
    <tr><td bgcolor="#828DA6">
      <font color="#ffffff" face="arial,helvetica,sanserif">
        <a name="Examine Debug Output"><strong>Examine Debug Output</strong></a>
      </font>
    </td></tr>
    <tr><td>
      <blockquote>
                        <p>The first step when you have a problem is to see what Ant is doing. Try running Ant with
           The verbose flag<br /><br />
           <code>ant -verbose</code><br /><br />
           or<br /><br />
           <code>ant -v</code><br /><br />
           
           This will produce something which starts like the following:</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 version 1.4alpha compiled on August 6 2001
Buildfile: build.xml
Detected Java version: 1.3 in: f:\jdk1.3\jre
Detected OS: Windows NT
parsing buildfile \jakarta-ant\build.xml with 
URI = file:/jakarta-ant/build.xml
Project base dir set to: \jakarta-ant
 [property] Loading \jakarta-ant\.ant.properties
 [property] Unable to find property file: \jakarta-ant\.ant.properties
 [property] Loading \conor\.ant.properties
 [property] Override ignored for debug

prepare:

check_for_optional_packages:
...
           </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 may be able to see in this trace what ant is doing and why it takes a particular 
             course of action. If you need even more information you can use the <code>-debug</code> 
             flag rather than <code>-verbose</code>. This will generally produce so much output that 
             you may want to save the output and analyze it in an editor.
           </p>
                                <p>So, once you have all this debug information, how can you use it to solve your problem? 
              That will depend on the task in question and the nature of your problem. Each task logs
              different aspects of its operation, but it will give you an idea of what is going on. For
              example, the &lt;javac&gt; task logs the reasons why it chooses to compile particular 
              classes and the equivalent command it is using. The following trace (which has been edited
              and reformatted for clarity) shows javac adding one class but skipping another. This is followed 
              by the compiler arguments and a summary of all the classes to be compiled. 
           </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>
 [javac] org\apache\tools\ant\listener\Log4jListener.java added as 
         \build\classes\org\apache\tools\ant\listener\Log4jListener.class 
             is outdated.
 [javac] org\apache\tools\ant\Location.java omitted as 
         \build\classes\org\apache\tools\ant\Location.class is up to date.
  ...
 [javac] Compiling 1 source file to \jakarta-ant\build\classes
 [javac] Using modern compiler
 [javac] Compilation args: -d \jakarta-ant\build\classes -classpath 
         \jakarta-ant\build\classes;F:\jdk1.3\lib\tools.jar;
         \Ant\lib\optional.jar;\Ant\lib\log4j.jar;
         \Ant\lib\junit.jar;\Ant\lib\jaxp.jar;
         \Ant\lib\crimson.jar;\Ant\lib\ant.jar 
         -sourcepath \jakarta-ant\src\main -g:none -O
    [javac] File to be compiled:
    \src\main\org\apache\tools\ant\listener\Log4jListener.java  
</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>
              In many cases Ant tasks are wrappers around OS commands or other java classes. In debug mode, many
              of these tasks will print out the equivalent command line, as the &lt;javac&gt; task above does. If 
              you are having a problem, it is often useful to run the command directly in the same way Ant is doing 
              and see if the problem persists. The problem may lie in the command being run by Ant, or in the way 
              the Ant task is running the command. You can also see the effect of changing attribute values on the
              generated command line. This can help you to understand whether you are using the correct attributes
              and values.
            </p>
                    </blockquote>
    </td></tr>
  </table>
                                  <table border="0" cellspacing="0" cellpadding="2" width="100%">
    <tr><td bgcolor="#828DA6">
      <font color="#ffffff" face="arial,helvetica,sanserif">
        <a name="Has it been fixed?"><strong>Has it been fixed?</strong></a>
      </font>
    </td></tr>
    <tr><td>
      <blockquote>
                        <p>
          After examining the debug output, you still believe that the problem you are having may be caused by Ant. 
          Chances are that someone else may have already encountered this problem and perhaps it has been
          fixed. The next step, therefore, may be to try a nightly build of Ant to see if the 
          problem has been fixed. Nightly builds for Ant are available from the 
          <a href="http://www.apache.org/dist/jakarta/jakarta-ant/nightly/">Jakarta web site</a>. While Ant nightly
          builds are typically quite stable and are used by <a href="http://www.apache.org/dist/jakarta/gump/latest/">
          Gump</a> to build many other Jakarta projects, these builds should be treated as experimental. You can 
          install and verify whether your problem has been fixed. Note that nightly builds do not build many of the
          optional tasks the come with Ant. A snapshot of these optional tasks is occasionally uploaded to the nightly 
          download <a href="http://www.apache.org/dist/jakarta/jakarta-ant/nightly/optional/">area</a>. Note that even 
          this snapshot does not contain every optional task.
        </p>
                    </blockquote>
    </td></tr>
  </table>
                                  <table border="0" cellspacing="0" cellpadding="2" width="100%">
    <tr><td bgcolor="#828DA6">
      <font color="#ffffff" face="arial,helvetica,sanserif">
        <a name="Has it been reported?"><strong>Has it been reported?</strong></a>
      </font>
    </td></tr>
    <tr><td>
      <blockquote>
                        <p>
          If the current nightly build doesn't resolve your problem, it is possible that someone else has reported
          the issue. It is time to look at the <a href="http://nagoya.apache.org/bugzilla/">Apache Bug Database</a>.
          This system is easy to use and it will let you search the 
          <a href="http://nagoya.apache.org/bugzilla/buglist.cgi?bug_status=UNCONFIRMED&amp;bug_status=NEW&amp;bug_status=ASSIGNED&amp;bug_status=REOPENED&amp;email1=&amp;emailtype1=substring&amp;emailassigned_to1=1&amp;email2=&amp;emailtype2=substring&amp;emailreporter2=1&amp;bugidtype=include&amp;bug_id=&amp;changedin=&amp;votes=&amp;chfieldfrom=&amp;chfieldto=Now&amp;chfieldvalue=&amp;product=Ant&amp;short_desc=&amp;short_desc_type=substring&amp;long_desc=&amp;long_desc_type=substring&amp;bug_file_loc=&amp;bug_file_loc_type=substring&amp;keywords=&amp;keywords_type=anywords&amp;field0-0-0=noop&amp;type0-0-0=noop&amp;value0-0-0=&amp;order=bugs.bug_id">
          currently open 
          </a>.
          and resolved bugs to see if your problem has already been reported.
          If your problem has been reported, you can see whether any of the developers have commented, 
          suggesting workarounds or the reason for the bug, etc. You may have more information to add (see about 
          creating bug reports below), in which case, go right ahead and add it. If you can't add more information
          you may just want to vote for this bug, and perhaps add yourself to the CC list to follow the progress of
          this bug.
        </p>
                    </blockquote>
    </td></tr>
  </table>
                                  <table border="0" cellspacing="0" cellpadding="2" width="100%">
    <tr><td bgcolor="#828DA6">
      <font color="#ffffff" face="arial,helvetica,sanserif">
        <a name="Filing a Bug report"><strong>Filing a Bug report</strong></a>
      </font>
    </td></tr>
    <tr><td>
      <blockquote>
                        <p>By this time you may have decided that there is a bug in Ant. You have a few choices at this 
           point. You can send an email to the ant-user mailing list to see if others have encountered your issue
           and how they may have worked around it. If after some discussion, you still feel you have a bug, it 
           is time to create a bug report. This is a simple operation in the Bug Database. Please try to provide 
           as much information as possible to assist the developers in resolving the bug. Please try to enter correct 
           values for the various inputs when creating the bug. Once the bug is created you can add attachments to
           the bug report. 
        </p>
                                <p>What information should you include in your bug report? The easiest bugs to fix are those which are most 
           easily reproducible, so if you can, it is really helpful to produce a small test case that exhibits the
           problem. In this case, you would attach the build file and other files necessary to reproduce the problem
           probably packed together in an archive. If you can't produce a test case, you should try to include a 
           snippet from your build file and the relevant sections from the debug out from Ant. Try to include the 
           header information where Ant states the version, the OS and VM information etc. As the debug output is 
           likely to be very large, you should try to remove the output which is not relevant. Once the bug is 
           entered into the Bug Database, you will be kept informed about progress on the bug. If you receive email
           asking for further information, please try to respond as it will aid in the resolution of your bug.
        </p>
                    </blockquote>
    </td></tr>
  </table>
                                  <table border="0" cellspacing="0" cellpadding="2" width="100%">
    <tr><td bgcolor="#828DA6">
      <font color="#ffffff" face="arial,helvetica,sanserif">
        <a name="Asking for an enhancement"><strong>Asking for an enhancement</strong></a>
      </font>
    </td></tr>
    <tr><td>
      <blockquote>
                        <p>Sometimes, you may find that Ant just doesn't do what you want. It isn't a bug, as such, since Ant 
            is working the way it is supposed to. Perhaps it is something that hasn't been thought of yet, or 
            a completely new task. For these situations you will want to raise an enhancement request. 
            Enhancement requests are managed using the same Apache Bug Database described above. 
            These are just a different type of report. If you look in the database, you will see that one of 
            the severity settings for a bug is "Enhancement". So, just fill the bug report in, and 
            in the description, state how you would like to have Ant enhanced. Again you should check whether
            there are any existing enhancment requests that cover your needs. If so, just add your vote to these.
         </p>
                    </blockquote>
    </td></tr>
  </table>
                                  <table border="0" cellspacing="0" cellpadding="2" width="100%">
    <tr><td bgcolor="#828DA6">
      <font color="#ffffff" face="arial,helvetica,sanserif">
        <a name="Fixing the Bug"><strong>Fixing the Bug</strong></a>
      </font>
    </td></tr>
    <tr><td>
      <blockquote>
                        <p>If you aren't satisfied just filing a bug report, you can try to find and fix the problem yourself. The 
           best way to do that is by working against the latest code from CVS. Alternatively, you can work with the
           source code from the source distributions available on the Jakarta website. If you are going to tackle the
           issues at this level, you may want to discuss details on the ant-dev mailing list. Once you have a fix 
           for the problem, you may either submit the patch to the ant-dev mailing list or enter into the Bug
           Database as described above, attaching the patch. Using the Bug database has the advantage of tracking
           the progress of your bug.
        </p>
                    </blockquote>
    </td></tr>
  </table>
                    </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 -->