source: release-kits/lirk3/bin/ant-installer/web/manual1.6.2/problems.html@ 14982

Last change on this file since 14982 was 14982, checked in by oranfry, 16 years ago

initial import of LiRK3

File size: 23.6 KB
Line 
1
2
3<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
4 <html lang="en">
5 <!-- GENERATED FILE, DO NOT EDIT, EDIT THE XML FILE IN xdocs INSTEAD! -->
6 <head>
7 <META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
8 <title>Apache Ant - Having Problems?</title>
9 <link type="text/css" href="./page.css" rel="stylesheet">
10 <meta name="author" content="Conor MacNeill">
11 <meta name="email" content="">
12 </head>
13
14 <body>
15 <p class="navpath">
16 <script src="./breadcrumbs.js" language="JavaScript" type="text/javascript"></script>
17 </p>
18
19 <div class="logobar">
20 <table width="100%" border="0" cellspacing="0" cellpadding="0">
21 <tr>
22 <td align="left"><img border="0" alt="Apache Ant site" src="./images/group-logo.gif"></td>
23 <td align="center" width="100%"><img alt="Apache Ant logo" border="0" src="./images/project-logo.gif"></td>
24 <td align="right">
25 <form target="_blank" onsubmit="q.value = query.value + ' site:ant.apache.org'" action="http://www.google.com/search" method="get">
26 <table summary="search" border="0" cellspacing="0" cellpadding="0" bgcolor="#4C6C8F">
27 <tr>
28 <td colspan="3"><img height="10" width="1" alt="" src="./images/spacer.gif"></td>
29 </tr>
30 <tr>
31 <td><img height="1" width="1" alt="" src="./images/spacer.gif"></td>
32 <td nowrap="nowrap" class="searchcaption">
33 <input name="q" type="hidden">
34 <input size="15" id="query" type="text">
35 <img height="1" width="5" alt="" src="./images/spacer.gif">
36 <input name="Search" value="Search" type="submit">
37 <br>
38 the Apache Ant site
39 </td>
40 <td><img height="1" width="1" alt="" src="./images/spacer.gif"></td>
41 </tr>
42 <tr>
43 <td><img alt="" border="0" height="10" width="9" src="./images/search-left.gif"></td>
44 <td><img height="1" width="1" alt="" src="./images/spacer.gif"></td>
45 <td><img alt="" border="0" height="10" width="9" src="./images/search-right.gif"></td>
46 </tr>
47 </table>
48 </form>
49 </td>
50 </tr>
51 </table>
52 </div>
53
54 <div class="tab">
55 <table summary="tab bar" border="0" cellpadding="0" cellspacing="0">
56 <tr>
57 <td width="8"><img alt="" height="5" width="8" src="./images/spacer.gif"></td><td valign="bottom">
58 <table summary="selected tab" style="height: 1.5em" border="0" cellpadding="0" cellspacing="0">
59 <tr>
60 <td valign="top" width="5" bgcolor="#4C6C8F"><img height="5" width="5" alt="" src="./images/tabSel-left.gif"></td><td valign="middle" bgcolor="#4C6C8F"><font color="#ffffff" size="2" face="Arial, Helvetica, Sans-serif"><b>Home</b></font></td><td valign="top" width="5" bgcolor="#4C6C8F"><img height="5" width="5" alt="" src="./images/tabSel-right.gif"></td>
61 </tr>
62 </table>
63 </td>
64 <td width="5"><img alt="" height="8" width="8" src="./images/spacer.gif"></td><td valign="bottom">
65 <table summary="non selected tab" style="height: 1.4em" border="0" cellpadding="0" cellspacing="0">
66 <tr>
67 <td valign="top" width="5" bgcolor="#B2C4E0"><img height="5" width="5" alt="" src="./images/tab-left.gif"></td><td valign="middle" bgcolor="#B2C4E0"><a href="./projects/index.html"><font size="2" face="Arial, Helvetica, Sans-serif">Projects</font></a></td><td valign="top" width="5" bgcolor="#B2C4E0"><img height="5" width="5" alt="" src="./images/tab-right.gif"></td>
68 </tr>
69 </table>
70 </td>
71 </tr>
72 </table>
73 </div>
74
75 <div class="bluebar"></div>
76
77 <div class="menucontainer">
78 <div class="menu">
79 <ul>
80 <li class="menuheader">Apache Ant
81 <ul>
82 <li>
83 <a href="./index.html">Welcome</a>
84 </li>
85 <li>
86 <a href="./license.html">License</a>
87 </li>
88 <li>
89 <a href="./antnews.html">News</a>
90 </li>
91 </ul>
92 </li>
93 <li class="menuheader">Documentation
94 <ul>
95 <li>
96 <a href="./manual/index.html">Manual</a>
97 </li>
98 <li>
99 <a href="./projects.html">Related Projects</a>
100 </li>
101 <li>
102 <a href="./external.html">External Tools and Tasks</a>
103 </li>
104 <li>
105 <a href="./resources.html">Resources</a>
106 </li>
107 <li>
108 <a href="./faq.html">Frequently Asked Questions</a>
109 </li>
110 <li>
111 <a href="http://wiki.apache.org/ant/FrontPage">Wiki</a>
112 </li>
113 <li>
114 <span class="sel">Having Problems?</span>
115 </li>
116 </ul>
117 </li>
118 <li class="menuheader">Download
119 <ul>
120 <li>
121 <a href="http://ant.apache.org/bindownload.cgi">Binary Distributions</a>
122 </li>
123 <li>
124 <a href="http://ant.apache.org/srcdownload.cgi">Source Distributions</a>
125 </li>
126 </ul>
127 </li>
128 <li class="menuheader">Contributing
129 <ul>
130 <li>
131 <a href="./mail.html">Mailing Lists</a>
132 </li>
133 <li>
134 <a href="./cvs.html">CVS Repositories</a>
135 </li>
136 <li>
137 <a href="http://issues.apache.org/bugzilla/enter_bug.cgi?product=Ant">Bug Database</a>
138 </li>
139 <li>
140 <a href="http://issues.apache.org/bugzilla/enter_bug.cgi?product=Ant&amp;bug_severity=Enhancement">Enhancement Requests</a>
141 </li>
142 <li>
143 <a href="http://www.apache.org/foundation/contributing.html">Donations</a>
144 </li>
145 </ul>
146 </li>
147 <li class="menuheader">Project Management
148 <ul>
149 <li>
150 <a href="./contributors.html">Contributors</a>
151 </li>
152 <li>
153 <a href="./mission.html">Apache Ant Mission</a>
154 </li>
155 <li>
156 <a href="./bylaws.html">Project Bylaws</a>
157 </li>
158 <li>
159 <a href="./legal.html">Legal</a>
160 </li>
161 </ul>
162 </li>
163 </ul>
164 </div>
165 <img style="float: left" height="10" width="10" border="0" alt="" src="./images/menu-left.gif">
166 <img style="float: right" height="10" width="10" border="0" alt="" src="./images/menu-right.gif">
167 </div>
168 <div class="lightbluebar">&nbsp;</div>
169 <div class="main">
170 <div class="content">
171 <h1 class="title">Having Problems?</h1>
172 <h3 class="section">
173 <a name="Having Problems?"></a>
174 Having Problems?
175 </h3>
176 <p>
177 This page details some steps you can take to try and resolve
178 any problems you may be having with Ant. If you find you can't
179 resolve the problem, then this page will help you collect some of
180 the relevant information to provide in a bug report. This information
181 will help the Ant developers understand and resolve the problem.
182 Of course, not all the steps here will make sense for every problem
183 you may encounter - these are just some suggestions to point
184 you in the right direction.
185 </p>
186 <h4 class="subsection">
187 <a name="Read the Manual"></a>
188 Read the Manual
189 </h4>
190 <p>
191 The first step to take when you have a problem with Ant is to read
192 the <a href="manual/index.html">manual</a> entry for the task or
193 concept that is giving you trouble. In particular, check the
194 meaning of a task's attributes and nested elements. Perhaps an
195 attribute is available that would provide the behavior you require.
196 If you have problems with the manual itself, you can submit a
197 documentation bug report (see below) to help us improve the Ant
198 documentation.
199 </p>
200 <h4 class="subsection">
201 <a name="Examine Debug Output"></a>
202 Examine Debug Output
203 </h4>
204 <p>
205 If you're still having a problem, the next step is to try and
206 gather additional information about what Ant is doing.
207 Try running Ant with the <code>verbose</code> flag:
208 <br /><br />
209 <font face="verdana" size="-1">ant -verbose</font>
210 <br /><br />
211 or
212 <br /><br />
213 <font face="verdana" size="-1">ant -v</font>
214 <br /><br />
215
216 This will produce output that starts like the following:</p>
217 <table class="ForrestTable" cellspacing="1" cellpadding="4">
218 <tr>
219 <td colspan="1" rowspan="1"
220 valign="top" align="left">
221
222Ant version 1.4.1 compiled on October 11 2001<br />
223Buildfile: build.xml<br />
224Detected Java version: 1.3 in: D:\usr\local\java\jdk13\jre<br />
225Detected OS: Windows NT<br />
226parsing buildfile D:\ant\build.xml
227with URI = file:D:/ant/build.xml<br />
228Project base dir set to: D:\ant<br />
229  [property] Loading Environment env.<br />
230  [property] Loading D:\ant\conf.properties<br />
231Build sequence for target 'debug' is [debug]<br />
232Complete build sequence is [debug, gensrc, compile, jar, test]<br />
233. . .<br />
234
235 </td>
236 </tr>
237 </table>
238 <p>
239 You should be able to see from the trace more about what Ant
240 is doing and why it's taking a particular course of action.
241 If you need even more information, you can use the
242 <code>-debug</code> flag rather than
243 <code>-verbose</code>.
244 This will generally produce so much
245 output that you may want to save the output to a file and
246 analyze it in an editor. You can save the output using the
247 <code>-logfile &lt;filename&gt;</code> flag, or
248 using redirection.
249 </p>
250 <p>
251 Once you have all this debug information, how can you use it
252 to solve your problem? That will depend on the task in question
253 and the nature of your problem. Each task logs different aspects
254 of its operation, but it should give you an idea of what is going
255 on. For example, the <code>&lt;javac&gt;</code> task logs the
256 reasons why it
257 chooses to compile particular class files and not others, along
258 with which compiler it is using and the arguments it will pass
259 to that compiler. The following partial trace shows why
260 <code>&lt;javac&gt;</code> is adding one class file but
261 skipping another.
262 This is followed by which compiler it will be using, the
263 arguments that will get passed to the compiler,
264 and a list of all the class files to be compiled.
265 </p>
266 <table class="ForrestTable" cellspacing="1" cellpadding="4">
267 <tr>
268 <td colspan="1" rowspan="1"
269 valign="top" align="left">
270
271[javac] Test.java omitted as D:\classes\Test.class is up to date.<br />
272[javac] Unset.java added as D:\classes\Unset.class is outdated.<br />
273[javac] Compiling 1 source file to D:\classes<br />
274[javac] Using classic compiler<br />
275[javac] Compilation args: -d D:\classes -classpath D:\classes;<br />
276D:\jdk118\classes.zip; -sourcepath D:\src\java -g:none<br />
277[javac] File to be compiled:<br />
278D:\src\java\Unset.java<br />
279
280 </td>
281 </tr>
282 </table>
283 <p>
284 In many cases, Ant tasks are wrappers around OS commands or
285 other Java classes. In debug mode, many of these tasks will
286 print out the equivalent command line, as the
287 <code>&lt;javac&gt;</code> task
288 output does. If you are having a problem, it is often useful to
289 run the command directly from the command line, in the same way
290 Ant is running it, and see if the problem occurs from there
291 as well. The problem may be in the command that is being run,
292 or it may be in the way the Ant task is running the command.
293 You can also see the effect of changing attribute values on the
294 generated command line. This can help you to understand whether
295 you are using the correct attributes and values.
296 </p>
297 <h4 class="subsection">
298 <a name="Has It Been Fixed?"></a>
299 Has It Been Fixed?
300 </h4>
301 <p>
302 After examining the debug output, if you still believe that the
303 problem you are having is caused by Ant, chances are that someone
304 else may have already encountered this problem, and perhaps it has
305 been fixed. The next step, therefore, may be to try a nightly build
306 of Ant to see if the problem has been fixed. Nightly builds for Ant
307 are available from the
308 <a href="http://cvs.apache.org/builds/ant/nightly/">
309 Ant web site</a>. While Ant nightly builds are typically quite
310 stable and are used by
311 <a href="http://cvs.apache.org/builds/gump/latest/">Gump</a>
312 to build many other Jakarta projects, these builds should
313 nonetheless be treated as experimental. Note that nightly builds
314 do not build many of the optional tasks the come with Ant.
315 A snapshot of these optional tasks is occasionally uploaded to
316 the nightly download
317 <a href="http://cvs.apache.org/builds/ant/nightly/optional/">
318 area</a>. However, even this snapshot does not contain every
319 optional task.
320 </p>
321 <h4 class="subsection">
322 <a name="Has It Been Reported?"></a>
323 Has It Been Reported?
324 </h4>
325 <p>
326 If the current nightly build doesn't resolve your problem, it is
327 possible that someone else has reported the issue. It is time to
328 look at the <a href="http://issues.apache.org/bugzilla/">
329 Apache Bug Database</a>. This system is easy to use, and it will
330 let you search the <a href="http://issues.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">
331 currently open</a> and resolved bugs to see if your problem has
332 already been reported. If your problem has been reported, you can
333 see whether any of the developers have commented, suggesting
334 workarounds, or the reason for the bug, etc. Or you may have
335 information to add (see about creating and modifying bug reports
336 below), in which case, go right ahead and add the information.
337 If you don't have any additional information, you may just want
338 to vote for this bug, and perhaps
339 add yourself to the <code>CC</code> list to follow the progress
340 of this bug.
341 </p>
342 <h4 class="subsection">
343 <a name="Filing a Bug Report"></a>
344 Filing a Bug Report
345 </h4>
346 <p>
347 By this time, you may have decided that there is an unreported
348 bug in Ant. You have a few choices at this point. You can send
349 an email to the <code>user</code> mailing list
350 to see if
351 others have encountered your issue and find out how they may
352 have worked around it. If after some discussion, you feel it
353 is time to create
354 a bug report, this is a simple operation in the bug database.
355 Please try to provide as much information as possible in order
356 to assist the developers in resolving the bug. Please try to enter
357 correct values for the various inputs when creating the bug, such
358 as which version of Ant you are running, and on which platform,
359 etc. Once the bug is created, you can also add attachments to
360 the bug report.
361 </p>
362 <p>
363 What information should you include in your bug report? The
364 easiest bugs to fix are those that are most easily reproducible,
365 so it is really helpful if you can produce a small test case that
366 exhibits the problem. In this case, you would attach the build file
367 and any other files necessary to reproduce the problem, probably
368 packed together in an archive. If you can't produce a test case,
369 you should try to include a snippet from your build file and the
370 relevant sections from the verbose or debug output from Ant. Try
371 to include the header information where Ant states the version,
372 the OS and VM information, etc. As debug output is likely to be
373 very large, it's best to remove any output that is not
374 relevant. Once the bug is entered into the bug database, you
375 will be kept informed by email about progress on the bug. If
376 you receive email asking for further information, please try to
377 respond, as it will aid in the resolution of your bug.
378 </p>
379 <h4 class="subsection">
380 <a name="Asking for an Enhancement"></a>
381 Asking for an Enhancement
382 </h4>
383 <p>
384 Sometimes, you may find that Ant just doesn't do what you need it
385 to. It isn't a bug, as such, since Ant is working the way it is
386 supposed to work. Perhaps it is some additional functionality for
387 a task that hasn't been thought of yet, or maybe a completely new
388 task. For these situations, you will
389 want to raise an <i>enhancement request</i>. Enhancement requests
390 are managed using the same Apache Bug Database described above.
391 These are just a different type of bug report. If you look in the
392 bug database, you will see that one of the severity settings for
393 a bug is "Enhancement". Just fill the bug report in,
394 set the severity of the bug to "Enhancement", and
395 state in the description how you would like to have Ant enhanced.
396 Again, you should first check whether there are any existing
397 enhancment requests that cover your needs. If so, just add your
398 vote to these.
399 </p>
400 <h4 class="subsection">
401 <a name="Fixing the Bug"></a>
402 Fixing the Bug
403 </h4>
404 <p>
405 If you aren't satisfied with just filing a bug report, you can
406 try to find the cause of the problem and provide a fix yourself.
407 The best way to do that is by working with the latest code from CVS.
408 Alternatively, you can work with the source code available from the
409 <a href="http://ant.apache.org/srcdownload.cgi">
410 source distributions</a>. If you
411 are going to tackle the problem at this level, you may want to
412 discuss some details first on the <code>dev</code>
413 mailing list. Once you have a fix for the problem, you may submit
414 the fix as a <i>patch</i> to either the
415 <code>dev</code> mailing
416 list, or enter the bug database as described above and attach the
417 patch to the bug report. Using the bug database has the advantage
418 of being able to track the progress of your patch.
419 </p>
420 <p>
421 If you have a patch to submit and are sending it to the
422 <code>dev</code> mailing list,
423 prefix "[PATCH]"
424 to your message subject. Please include any relevant bug numbers.
425 Patch files should be created with the <code>-u</code>
426 option of the
427 <code>diff</code> or <code>cvs diff</code> command. For
428 example:<br /><br />
429 <font face="verdana" size="-1">
430 diff -u Javac.java.orig Javac.java &gt; javac.diffs<br /><br />
431 </font>
432 or, if you have source from CVS:<br /><br />
433 <font face="verdana" size="-1">
434 cvs diff -u Javac.java &gt; javac.diffs<br /><br />
435 </font>
436
437 Note: You should give your patch files meaningful names.
438 This makes it easier for developers who need to apply a number
439 of different patch files.
440 </p>
441
442 </div>
443 </div>
444
445 <p class="copyright">
446 Copyright &copy; 2000-2004&nbsp;The Apache Software Foundation. All rights reserved.
447 <script type="text/javascript" language="JavaScript"><!--
448 document.write(" - "+"Last Published: " + document.lastModified);
449 // -->
450 </script>
451 </p>
452 </body>
453 </html>
454
455
456
457
458
459
460
461
462
463
Note: See TracBrowser for help on using the repository browser.