You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

problems.html 20 kB

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