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 KiB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372
  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. <head>
  6. <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"/>
  7. <meta name="author" value="Conor MacNeill">
  8. <meta name="email" value="conor@apache.org">
  9. <title>The Jakarta Site - Having Problems?</title>
  10. </head>
  11. <body bgcolor="#ffffff" text="#000000" link="#525D76">
  12. <table border="0" width="100%" cellspacing="0">
  13. <!-- TOP IMAGE -->
  14. <tr>
  15. <td colspan="2">
  16. <a href="http://jakarta.apache.org"><img src="http://jakarta.apache.org/images/jakarta-logo.gif" align="left" border="0"/></a>
  17. </td>
  18. </tr>
  19. </table>
  20. <table border="0" width="100%" cellspacing="4">
  21. <tr><td colspan="2">
  22. <hr noshade="" size="1"/>
  23. </td></tr>
  24. <tr>
  25. <!-- LEFT SIDE NAVIGATION -->
  26. <td valign="top" nowrap="true">
  27. <p><strong>Apache Ant</strong></p>
  28. <ul>
  29. <li> <a href="./index.html">Front Page</a>
  30. </li>
  31. <li> <a href="./antnews.html">News</a>
  32. </li>
  33. <li> <a href="./manual/index.html">Documentation</a>
  34. </li>
  35. <li> <a href="./projects.html">Related Projects</a>
  36. </li>
  37. <li> <a href="./external.html">External Tools and Tasks</a>
  38. </li>
  39. <li> <a href="./resources.html">Resources</a>
  40. </li>
  41. <li> <a href="./faq.html">Ant FAQ</a>
  42. </li>
  43. <li> <a href="./problems.html">Having Problems?</a>
  44. </li>
  45. </ul>
  46. <p><strong>Download</strong></p>
  47. <ul>
  48. <li> <a href="http://jakarta.apache.org/site/binindex.html">Binaries</a>
  49. </li>
  50. <li> <a href="http://jakarta.apache.org/site/sourceindex.html">Source Code</a>
  51. </li>
  52. </ul>
  53. <p><strong>Jakarta</strong></p>
  54. <ul>
  55. <li> <a href="http://jakarta.apache.org/site/news.html">News & Status</a>
  56. </li>
  57. <li> <a href="http://jakarta.apache.org/site/mission.html">Mission</a>
  58. </li>
  59. <li> <a href="http://jakarta.apache.org/site/guidelines.html">Guidelines Notes</a>
  60. </li>
  61. <li> <a href="http://jakarta.apache.org/site/faqs.html">FAQs</a>
  62. </li>
  63. </ul>
  64. <p><strong>Get Involved</strong></p>
  65. <ul>
  66. <li> <a href="http://jakarta.apache.org/site/getinvolved.html">Overview</a>
  67. </li>
  68. <li> <a href="http://jakarta.apache.org/site/cvsindex.html">CVS Repositories</a>
  69. </li>
  70. <li> <a href="http://jakarta.apache.org/site/mail.html">Mailing Lists</a>
  71. </li>
  72. <li> <a href="http://jakarta.apache.org/site/library.html">Reference Library</a>
  73. </li>
  74. <li> <a href="http://nagoya.apache.org/bugzilla/enter_bug.cgi?product=Ant">Bug Database</a>
  75. </li>
  76. <li> <a href="http://nagoya.apache.org/bugzilla/enter_bug.cgi?product=Ant&bug_severity=Enhancement">Enhancement Requests</a>
  77. </li>
  78. </ul>
  79. </td>
  80. <td align="left" valign="top">
  81. <table border="0" cellspacing="0" cellpadding="2" width="100%">
  82. <tr><td bgcolor="#525D76">
  83. <font color="#ffffff" face="arial,helvetica,sanserif">
  84. <a name="Having Problems?"><strong>Having Problems?</strong></a>
  85. </font>
  86. </td></tr>
  87. <tr><td>
  88. <blockquote>
  89. <p>If you are having problems with Ant, this page details some steps you can take
  90. to try and resolve the problem. If you can't resolve the problem then this page will help
  91. you collect some of the relevant information to provide a bug report. This information will help
  92. the Ant developers understand and resolve the problem. Of course, not all of the steps here will
  93. make sense for every problem you encounter. These are just some suggestions to
  94. point you in the right direction.
  95. </p>
  96. <table border="0" cellspacing="0" cellpadding="2" width="100%">
  97. <tr><td bgcolor="#828DA6">
  98. <font color="#ffffff" face="arial,helvetica,sanserif">
  99. <a name="Read the Manual"><strong>Read the Manual</strong></a>
  100. </font>
  101. </td></tr>
  102. <tr><td>
  103. <blockquote>
  104. <p>The first step to take when you have a problem is to read the <a href="manual/index.html">
  105. manual</a> entry for the task or concept that is giving you trouble. Check particularly the meaning of
  106. attributes and nested elements. Perhaps an attribute would provide the behavior you require. If you
  107. have problems with the manual, then you can submit a documentation bug report (see below) to help us
  108. improve the Ant documentation.
  109. </p>
  110. </blockquote>
  111. </td></tr>
  112. </table>
  113. <table border="0" cellspacing="0" cellpadding="2" width="100%">
  114. <tr><td bgcolor="#828DA6">
  115. <font color="#ffffff" face="arial,helvetica,sanserif">
  116. <a name="Examine Debug Output"><strong>Examine Debug Output</strong></a>
  117. </font>
  118. </td></tr>
  119. <tr><td>
  120. <blockquote>
  121. <p>The first step when you have a problem is to see what Ant is doing. Try running Ant with
  122. The verbose flag<br /><br />
  123. <code>ant -verbose</code><br /><br />
  124. or<br /><br />
  125. <code>ant -v</code><br /><br />
  126. This will produce something which starts like the following:</p>
  127. <div align="left">
  128. <table cellspacing="4" cellpadding="0" border="0">
  129. <tr>
  130. <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
  131. <td bgcolor="#023264" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
  132. <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
  133. </tr>
  134. <tr>
  135. <td bgcolor="#023264" width="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
  136. <td bgcolor="#ffffff"><pre>
  137. Ant version 1.4alpha compiled on August 6 2001
  138. Buildfile: build.xml
  139. Detected Java version: 1.3 in: f:\jdk1.3\jre
  140. Detected OS: Windows NT
  141. parsing buildfile \jakarta-ant\build.xml with
  142. URI = file:/jakarta-ant/build.xml
  143. Project base dir set to: \jakarta-ant
  144. [property] Loading \jakarta-ant\.ant.properties
  145. [property] Unable to find property file: \jakarta-ant\.ant.properties
  146. [property] Loading \conor\.ant.properties
  147. [property] Override ignored for debug
  148. prepare:
  149. check_for_optional_packages:
  150. ...
  151. </pre></td>
  152. <td bgcolor="#023264" width="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
  153. </tr>
  154. <tr>
  155. <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
  156. <td bgcolor="#023264" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
  157. <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
  158. </tr>
  159. </table>
  160. </div>
  161. <p>
  162. You may be able to see in this trace what ant is doing and why it takes a particular
  163. course of action. If you need even more information you can use the <code>-debug</code>
  164. flag rather than <code>-verbose</code>. This will generally produce so much output that
  165. you may want to save the output and analyze it in an editor.
  166. </p>
  167. <p>So, once you have all this debug information, how can you use it to solve your problem?
  168. That will depend on the task in question and the nature of your problem. Each task logs
  169. different aspects of its operation, but it will give you an idea of what is going on. For
  170. example, the &lt;javac&gt; task logs the reasons why it chooses to compile particular
  171. classes and the equivalent command it is using. The following trace (which has been edited
  172. and reformatted for clarity) shows javac adding one class but skipping another. This is followed
  173. by the compiler arguments and a summary of all the classes to be compiled.
  174. </p>
  175. <div align="left">
  176. <table cellspacing="4" cellpadding="0" border="0">
  177. <tr>
  178. <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
  179. <td bgcolor="#023264" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
  180. <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
  181. </tr>
  182. <tr>
  183. <td bgcolor="#023264" width="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
  184. <td bgcolor="#ffffff"><pre>
  185. [javac] org\apache\tools\ant\listener\Log4jListener.java added as
  186. \build\classes\org\apache\tools\ant\listener\Log4jListener.class
  187. is outdated.
  188. [javac] org\apache\tools\ant\Location.java omitted as
  189. \build\classes\org\apache\tools\ant\Location.class is up to date.
  190. ...
  191. [javac] Compiling 1 source file to \jakarta-ant\build\classes
  192. [javac] Using modern compiler
  193. [javac] Compilation args: -d \jakarta-ant\build\classes -classpath
  194. \jakarta-ant\build\classes;F:\jdk1.3\lib\tools.jar;
  195. \Ant\lib\optional.jar;\Ant\lib\log4j.jar;
  196. \Ant\lib\junit.jar;\Ant\lib\jaxp.jar;
  197. \Ant\lib\crimson.jar;\Ant\lib\ant.jar
  198. -sourcepath \jakarta-ant\src\main -g:none -O
  199. [javac] File to be compiled:
  200. \src\main\org\apache\tools\ant\listener\Log4jListener.java
  201. </pre></td>
  202. <td bgcolor="#023264" width="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
  203. </tr>
  204. <tr>
  205. <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
  206. <td bgcolor="#023264" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
  207. <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
  208. </tr>
  209. </table>
  210. </div>
  211. <p>
  212. In many cases Ant tasks are wrappers around OS commands or other java classes. In debug mode, many
  213. of these tasks will print out the equivalent command line, as the &lt;javac&gt; task above does. If
  214. you are having a problem, it is often useful to run the command directly in the same way Ant is doing
  215. and see if the problem persists. The problem may lie in the command being run by Ant, or in the way
  216. the Ant task is running the command. You can also see the effect of changing attribute values on the
  217. generated command line. This can help you to understand whether you are using the correct attributes
  218. and values.
  219. </p>
  220. </blockquote>
  221. </td></tr>
  222. </table>
  223. <table border="0" cellspacing="0" cellpadding="2" width="100%">
  224. <tr><td bgcolor="#828DA6">
  225. <font color="#ffffff" face="arial,helvetica,sanserif">
  226. <a name="Has it been fixed?"><strong>Has it been fixed?</strong></a>
  227. </font>
  228. </td></tr>
  229. <tr><td>
  230. <blockquote>
  231. <p>
  232. After examining the debug output, you still believe that the problem you are having may be caused by Ant.
  233. Chances are that someone else may have already encountered this problem and perhaps it has been
  234. fixed. The next step, therefore, may be to try a nightly build of Ant to see if the
  235. problem has been fixed. Nightly builds for Ant are available from the
  236. <a href="http://www.apache.org/dist/jakarta/jakarta-ant/nightly/">Jakarta web site</a>. While Ant nightly
  237. builds are typically quite stable and are used by <a href="http://www.apache.org/dist/jakarta/gump/latest/">
  238. Gump</a> to build many other Jakarta projects, these builds should be treated as experimental. You can
  239. install and verify whether your problem has been fixed. Note that nightly builds do not build many of the
  240. optional tasks the come with Ant. A snapshot of these optional tasks is occasionally uploaded to the nightly
  241. download <a href="http://www.apache.org/dist/jakarta/jakarta-ant/nightly/optional/">area</a>. Note that even
  242. this snapshot does not contain every optional task.
  243. </p>
  244. </blockquote>
  245. </td></tr>
  246. </table>
  247. <table border="0" cellspacing="0" cellpadding="2" width="100%">
  248. <tr><td bgcolor="#828DA6">
  249. <font color="#ffffff" face="arial,helvetica,sanserif">
  250. <a name="Has it been reported?"><strong>Has it been reported?</strong></a>
  251. </font>
  252. </td></tr>
  253. <tr><td>
  254. <blockquote>
  255. <p>
  256. If the current nightly build doesn't resolve your problem, it is possible that someone else has reported
  257. the issue. It is time to look at the <a href="http://nagoya.apache.org/bugzilla/">Apache Bug Database</a>.
  258. This system is easy to use and it will let you search the
  259. <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">
  260. currently open
  261. </a>.
  262. and resolved bugs to see if your problem has already been reported.
  263. If your problem has been reported, you can see whether any of the developers have commented,
  264. suggesting workarounds or the reason for the bug, etc. You may have more information to add (see about
  265. creating bug reports below), in which case, go right ahead and add it. If you can't add more information
  266. you may just want to vote for this bug, and perhaps add yourself to the CC list to follow the progress of
  267. this bug.
  268. </p>
  269. </blockquote>
  270. </td></tr>
  271. </table>
  272. <table border="0" cellspacing="0" cellpadding="2" width="100%">
  273. <tr><td bgcolor="#828DA6">
  274. <font color="#ffffff" face="arial,helvetica,sanserif">
  275. <a name="Filing a Bug report"><strong>Filing a Bug report</strong></a>
  276. </font>
  277. </td></tr>
  278. <tr><td>
  279. <blockquote>
  280. <p>By this time you may have decided that there is a bug in Ant. You have a few choices at this
  281. point. You can send an email to the ant-user mailing list to see if others have encountered your issue
  282. and how they may have worked around it. If after some discussion, you still feel you have a bug, it
  283. is time to create a bug report. This is a simple operation in the Bug Database. Please try to provide
  284. as much information as possible to assist the developers in resolving the bug. Please try to enter correct
  285. values for the various inputs when creating the bug. Once the bug is created you can add attachments to
  286. the bug report.
  287. </p>
  288. <p>What information should you include in your bug report? The easiest bugs to fix are those which are most
  289. easily reproducible, so if you can, it is really helpful to produce a small test case that exhibits the
  290. problem. In this case, you would attach the build file and other files necessary to reproduce the problem
  291. probably packed together in an archive. If you can't produce a test case, you should try to include a
  292. snippet from your build file and the relevant sections from the debug out from Ant. Try to include the
  293. header information where Ant states the version, the OS and VM information etc. As the debug output is
  294. likely to be very large, you should try to remove the output which is not relevant. Once the bug is
  295. entered into the Bug Database, you will be kept informed about progress on the bug. If you receive email
  296. asking for further information, please try to respond as it will aid in the resolution of your bug.
  297. </p>
  298. </blockquote>
  299. </td></tr>
  300. </table>
  301. <table border="0" cellspacing="0" cellpadding="2" width="100%">
  302. <tr><td bgcolor="#828DA6">
  303. <font color="#ffffff" face="arial,helvetica,sanserif">
  304. <a name="Asking for an enhancement"><strong>Asking for an enhancement</strong></a>
  305. </font>
  306. </td></tr>
  307. <tr><td>
  308. <blockquote>
  309. <p>Sometimes, you may find that Ant just doesn't do what you want. It isn't a bug, as such, since Ant
  310. is working the way it is supposed to. Perhaps it is something that hasn't been thought of yet, or
  311. a completely new task. For these situations you will want to raise an enhancement request.
  312. Enhancement requests are managed using the same Apache Bug Database described above.
  313. These are just a different type of report. If you look in the database, you will see that one of
  314. the severity settings for a bug is "Enhancement". So, just fill the bug report in, and
  315. in the description, state how you would like to have Ant enhanced. Again you should check whether
  316. there are any existing enhancment requests that cover your needs. If so, just add your vote to these.
  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="Fixing the Bug"><strong>Fixing the Bug</strong></a>
  325. </font>
  326. </td></tr>
  327. <tr><td>
  328. <blockquote>
  329. <p>If you aren't satisfied just filing a bug report, you can try to find and fix the problem yourself. The
  330. best way to do that is by working against the latest code from CVS. Alternatively, you can work with the
  331. source code from the source distributions available on the Jakarta website. If you are going to tackle the
  332. issues at this level, you may want to discuss details on the ant-dev mailing list. Once you have a fix
  333. for the problem, you may either submit the patch to the ant-dev mailing list or enter into the Bug
  334. Database as described above, attaching the patch. Using the Bug database has the advantage of tracking
  335. the progress of your bug.
  336. </p>
  337. </blockquote>
  338. </td></tr>
  339. </table>
  340. </blockquote>
  341. </td></tr>
  342. </table>
  343. </td>
  344. </tr>
  345. <!-- FOOTER -->
  346. <tr><td colspan="2">
  347. <hr noshade="" size="1"/>
  348. </td></tr>
  349. <tr><td colspan="2">
  350. <div align="center"><font color="#525D76" size="-1"><em>
  351. Copyright &#169; 2000-2002, Apache Software Foundation
  352. </em></font></div>
  353. </td></tr>
  354. </table>
  355. </body>
  356. </html>
  357. <!-- end the processing -->