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

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