source: other-projects/trunk/realistic-books/packages/AntInstaller/web/manual1.7.0/problems.html@ 19253

Last change on this file since 19253 was 19253, checked in by davidb, 15 years ago

Establishing a source code repository for Veronica's Realistic Book's software

File size: 17.4 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
79 <div class="menu">
80 <ul>
81 <li class="menuheader">Apache Ant
82 <ul>
83 <li>
84 <a href="./index.html">Welcome</a>
85 </li>
86 <li>
87 <a href="./license.html">License</a>
88 </li>
89 <li>
90 <a href="./antnews.html">News</a>
91 </li>
92 </ul>
93 </li>
94 <li class="menuheader">Documentation
95 <ul>
96 <li>
97 <a href="./manual/index.html">Manual</a>
98 </li>
99 <li>
100 <a href="./projects.html">Related Projects</a>
101 </li>
102 <li>
103 <a href="./external.html">External Tools and Tasks</a>
104 </li>
105 <li>
106 <a href="./resources.html">Resources</a>
107 </li>
108 <li>
109 <a href="./faq.html">Frequently Asked Questions</a>
110 </li>
111 <li>
112 <a href="http://wiki.apache.org/ant/FrontPage">Wiki</a>
113 </li>
114 <li>
115 <span class="sel">Having Problems?</span>
116 </li>
117 </ul>
118 </li>
119 <li class="menuheader">Download
120 <ul>
121 <li>
122 <a href="http://ant.apache.org/bindownload.cgi">Binary Distributions</a>
123 </li>
124 <li>
125 <a href="http://ant.apache.org/srcdownload.cgi">Source Distributions</a>
126 </li>
127 </ul>
128 </li>
129 <li class="menuheader">Contributing
130 <ul>
131 <li>
132 <a href="./mail.html">Mailing Lists</a>
133 </li>
134 <li>
135 <a href="./svn.html">Subversion Repositories</a>
136 </li>
137 <li>
138 <a href="./nightlies.html">Nightly Builds</a>
139 </li>
140 <li>
141 <a href="./bugs.html">Bug Database</a>
142 </li>
143 <li>
144 <a href="http://www.apache.org/foundation/contributing.html">Donations</a>
145 </li>
146 </ul>
147 </li>
148 <li class="menuheader">Project Management
149 <ul>
150 <li>
151 <a href="./contributors.html">Contributors</a>
152 </li>
153 <li>
154 <a href="./mission.html">Apache Ant Mission</a>
155 </li>
156 <li>
157 <a href="./bylaws.html">Project Bylaws</a>
158 </li>
159 <li>
160 <a href="./legal.html">Legal</a>
161 </li>
162 </ul>
163 </li>
164 </ul>
165 </div>
166 <img style="float: left" height="10" width="10" border="0" alt="" src="./images/menu-left.gif">
167 <img style="float: right" height="10" width="10" border="0" alt="" src="./images/menu-right.gif">
168 </div>
169 <div class="lightbluebar">&nbsp;</div>
170 <div class="main">
171 <div class="content">
172 <h1 class="title">Having Problems?</h1>
173 <h3 class="section">
174 <a name="Having Problems?"></a>
175 Having Problems?
176 </h3>
177 <p>
178 This page details some steps you can take to try and resolve
179 any problems you may be having with Ant. If you find you can't
180 resolve the problem, then this page will help you collect some of
181 the relevant information to provide in a bug report. This information
182 will help the Ant developers understand and resolve the problem.
183 Of course, not all the steps here will make sense for every problem
184 you may encounter - these are just some suggestions to point
185 you in the right direction.
186 </p>
187 <h4 class="subsection">
188 <a name="Ensure that you are actually running the version of Ant that you think you do"></a>
189 Ensure that you are actually running the version of Ant that you think you do
190 </h4>
191 <p>Many tools include a version of Ant and some Operating
192 Systems even install it by default now, so you may have a
193 version of Ant installed that you haven't been aware of.</p>
194 <p>One of the first things to do is to run
195 <br /><br />
196 <font face="verdana" size="-1">ant -version</font>
197 <br /><br />
198 and
199 <br /><br />
200 <font face="verdana" size="-1">ant -diagnostics</font>
201 <br /><br />
202 to be sure. Also, we highly recommend that you run Ant with
203 an empty CLASSPATH. If any other version of Ant can be
204 loaded from the CLASSPATH, many types of errors may happen
205 because of incompatible classes being loaded.</p>
206 <p>See <a href="faq.html">the FAQ</a> for <a href="faq.html#NoClassDefFoundError">some</a> <a href="faq.html#InstantiationException">examples</a>, but many
207 other problems are a result of an old version of Ant on your
208 system as well.</p>
209 <h4 class="subsection">
210 <a name="Read the Manual"></a>
211 Read the Manual
212 </h4>
213 <p>
214 The first step to take when you have a problem with Ant is to read
215 the <a href="manual/index.html">manual</a> entry for the task or
216 concept that is giving you trouble. In particular, check the
217 meaning of a task's attributes and nested elements. Perhaps an
218 attribute is available that would provide the behavior you require.
219 If you have problems with the manual itself, you can submit a
220 documentation bug report (see below) to help us improve the Ant
221 documentation.
222 </p>
223 <h4 class="subsection">
224 <a name="Examine Debug Output"></a>
225 Examine Debug Output
226 </h4>
227 <p>
228 If you're still having a problem, the next step is to try and
229 gather additional information about what Ant is doing.
230 Try running Ant with the <code>verbose</code> flag:
231 <br /><br />
232 <font face="verdana" size="-1">ant -verbose</font>
233 <br /><br />
234 or
235 <br /><br />
236 <font face="verdana" size="-1">ant -v</font>
237 <br /><br />
238
239 This will produce output that starts like the following:</p>
240 <table class="ForrestTable" cellspacing="1" cellpadding="4">
241 <tr>
242 <td colspan="1" rowspan="1"
243 valign="top" align="left">
244
245Ant version 1.4.1 compiled on October 11 2001<br />
246Buildfile: build.xml<br />
247Detected Java version: 1.3 in: D:\usr\local\java\jdk13\jre<br />
248Detected OS: Windows NT<br />
249parsing buildfile D:\ant\build.xml
250with URI = file:D:/ant/build.xml<br />
251Project base dir set to: D:\ant<br />
252  [property] Loading Environment env.<br />
253  [property] Loading D:\ant\conf.properties<br />
254Build sequence for target 'debug' is [debug]<br />
255Complete build sequence is [debug, gensrc, compile, jar, test]<br />
256. . .<br />
257
258 </td>
259 </tr>
260 </table>
261 <p>
262 You should be able to see from the trace more about what Ant
263 is doing and why it's taking a particular course of action.
264 If you need even more information, you can use the
265 <code>-debug</code> flag rather than
266 <code>-verbose</code>.
267 This will generally produce so much
268 output that you may want to save the output to a file and
269 analyze it in an editor. You can save the output using the
270 <code>-logfile &lt;filename&gt;</code> flag, or
271 using redirection.
272 </p>
273 <p>
274 Once you have all this debug information, how can you use it
275 to solve your problem? That will depend on the task in question
276 and the nature of your problem. Each task logs different aspects
277 of its operation, but it should give you an idea of what is going
278 on. For example, the <code>&lt;javac&gt;</code> task logs the
279 reasons why it
280 chooses to compile particular class files and not others, along
281 with which compiler it is using and the arguments it will pass
282 to that compiler. The following partial trace shows why
283 <code>&lt;javac&gt;</code> is adding one class file but
284 skipping another.
285 This is followed by which compiler it will be using, the
286 arguments that will get passed to the compiler,
287 and a list of all the class files to be compiled.
288 </p>
289 <table class="ForrestTable" cellspacing="1" cellpadding="4">
290 <tr>
291 <td colspan="1" rowspan="1"
292 valign="top" align="left">
293
294[javac] Test.java omitted as D:\classes\Test.class is up to date.<br />
295[javac] Unset.java added as D:\classes\Unset.class is outdated.<br />
296[javac] Compiling 1 source file to D:\classes<br />
297[javac] Using classic compiler<br />
298[javac] Compilation args: -d D:\classes -classpath D:\classes;<br />
299D:\jdk118\classes.zip; -sourcepath D:\src\java -g:none<br />
300[javac] File to be compiled:<br />
301D:\src\java\Unset.java<br />
302
303 </td>
304 </tr>
305 </table>
306 <p>
307 In many cases, Ant tasks are wrappers around OS commands or
308 other Java classes. In debug mode, many of these tasks will
309 print out the equivalent command line, as the
310 <code>&lt;javac&gt;</code> task
311 output does. If you are having a problem, it is often useful to
312 run the command directly from the command line, in the same way
313 Ant is running it, and see if the problem occurs from there
314 as well. The problem may be in the command that is being run,
315 or it may be in the way the Ant task is running the command.
316 You can also see the effect of changing attribute values on the
317 generated command line. This can help you to understand whether
318 you are using the correct attributes and values.
319 </p>
320 <h4 class="subsection">
321 <a name="Has It Been Fixed?"></a>
322 Has It Been Fixed?
323 </h4>
324 <p>
325 After examining the debug output, if you still believe that the
326 problem you are having is caused by Ant, chances are that someone
327 else may have already encountered this problem, and perhaps it has
328 been fixed. The next step, therefore, would be to download the
329 sources of ant, see <a href="svn.html">svn</a>.
330 </p>
331 <p>
332 <a href="http://vmgump.apache.org/gump/public/index.html">Gump</a>
333 is building ant every night and using the ant built from the
334 latest source to build a long list of open source projects. However,
335 the version of ant built by gump is not available for download. Even
336 if it were, it would not include most of the optional tasks.
337 </p>
338 <p>
339 We currently do not have nightly builds including the optional tasks.
340 </p>
341 <h3 class="section">
342 <a name="bugs"></a>
343 bugs
344 </h3>
345 <p>If you are convinced that you have identified an unfixed bug, please turn to
346 our document concerning the <a href="bugs.html">bug database</a>.</p>
347
348 </div>
349 </div>
350
351 <p class="copyright">
352 <script type="text/javascript" language="JavaScript"><!--
353 document.write(" - "+"Last Published: " + document.lastModified);
354 // -->
355 </script>
356 </p>
357 </body>
358 </html>
359
360
361
362
363
364
365
366
367
368
369
Note: See TracBrowser for help on using the repository browser.