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.

fail.html 1.8 KiB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. <html>
  2. <head>
  3. <meta http-equiv="Content-Language" content="en-us">
  4. <title>Apache Ant User Manual</title>
  5. </head>
  6. <body>
  7. <h2><a name="fail">Fail</a></h2>
  8. <h3>Description</h3>
  9. <p>Exits the current build (just throwing a BuildException), optionally printing additional information.</p>
  10. <p>The message of the Exception can be set via the message attribute
  11. or character data nested into the element.</p>
  12. <h3>Parameters</h3>
  13. <table border="1" cellpadding="2" cellspacing="0">
  14. <tr>
  15. <td valign="top"><b>Attribute</b></td>
  16. <td valign="top"><b>Description</b></td>
  17. <td align="center" valign="top"><b>Required</b></td>
  18. </tr>
  19. <tr>
  20. <td valign="top">message</td>
  21. <td valign="top">A message giving further information on why the build exited</td>
  22. <td align="center" valign="top">No</td>
  23. </tr>
  24. <tr>
  25. <td valign="top">if</td>
  26. <td valign="top">Only fail if a property of the given name exists
  27. in the current project</td>
  28. <td align="center" valign="top">No</td>
  29. </tr>
  30. <tr>
  31. <td valign="top">unless</td>
  32. <td valign="top">Only fail if a property of the given name doesn't
  33. exist in the current project</td>
  34. <td align="center" valign="top">No</td>
  35. </tr>
  36. </table>
  37. <h3>Examples</h3>
  38. <pre> &lt;fail/&gt;</pre>
  39. <p>will exit the current build with no further information given.</p>
  40. <pre>
  41. BUILD FAILED
  42. build.xml:4: No message
  43. </pre>
  44. <pre> &lt;fail message=&quot;Something wrong here.&quot;/&gt;</pre>
  45. <p>will exit the current build and print something like the following to wherever
  46. your output goes:</p>
  47. <pre>
  48. BUILD FAILED
  49. build.xml:4: Something wrong here.
  50. </pre>
  51. <pre> &lt;fail&gt;Something wrong here.&lt;/fail&gt;</pre>
  52. <p>will give the same result as above.</p>
  53. <hr>
  54. <p align="center">Copyright &copy; 2001 Apache Software Foundation. All rights
  55. Reserved.</p>
  56. </body>
  57. </html>