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.

input.html 3.7 KiB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102
  1. <html>
  2. <head>
  3. <meta http-equiv="Content-Language" content="en-us">
  4. <title>Input Task</title>
  5. </head>
  6. <body>
  7. <h2><a name="input">Input</a></h2>
  8. <h3>Description</h3>
  9. <p>Allows user interaction during the build process by prompting for
  10. input. To do so, it uses the configured
  11. <a href="../inputhandler.html">InputHandler</a>.</p>
  12. <p>The prompt can be set via the message attribute or as character
  13. data nested into the element.</p>
  14. <p>Optinonally a set of valid imput arguments can be defined via the
  15. validargs attribute. Input task will no accept value that don't match
  16. one of the predefined.</p>
  17. <p>Optionally a property can be created from the value entered by the
  18. user. This property can then be used during the following build
  19. run. Input behaves according to <a href="property.html">property
  20. task</a> which means that existing properties cannot be overriden.</p>
  21. <h3>Parameters</h3>
  22. <table border="1" cellpadding="2" cellspacing="0">
  23. <tr>
  24. <td valign="top"><b>Attribute</b></td>
  25. <td valign="top"><b>Description</b></td>
  26. <td align="center" valign="top"><b>Required</b></td>
  27. </tr>
  28. <tr>
  29. <td valign="top">message</td>
  30. <td valign="top">the Message which gets displayed to the user
  31. during the build run.</td>
  32. <td valign="top" align="center">No</td>
  33. </tr>
  34. <tr>
  35. <td valign="top">validargs</td>
  36. <td valign="top">comma separated String containing valid input
  37. arguments. If set, input task will reject any input not defined
  38. here. Validargs are compared case sensitive. If you want 'a' and
  39. 'A' to be accepted you will need to define both arguments within
  40. validargs.</td>
  41. <td valign="top" align="center">No</td>
  42. </tr>
  43. <tr>
  44. <td valign="top">addproperty</td>
  45. <td valign="top">the name of a property to be created from
  46. input. Behaviour is equal to <a href="property.html">property
  47. task</a> which means that existing properties cannot be
  48. overriden.</td>
  49. <td valign="top" align="center">No</td>
  50. </tr>
  51. </table>
  52. <h3>Examples</h3>
  53. <pre> &lt;input/&gt;</pre>
  54. <p>Will pause the build run until return key is pressed when using the
  55. <a href="../inputhandler.html#defaulthandler">default
  56. InputHandler</a>, the concrete behavior is defined by the InputHandler
  57. implementation you use.</p>
  58. <pre> &lt;input&gt;Press Return key to continue...&lt;/input&gt;</pre>
  59. <p>Will display the message &quot;Press Return key to
  60. continue...&quot; and pause the build run until return key is pressed
  61. (again, the concrete behavior is implementation dependent).</p>
  62. <pre> &lt;input
  63. message=&quot;Press Return key to continue...&quot;
  64. /&gt;</pre>
  65. <p>Will display the message &quot;Press Return key to
  66. continue...&quot; and pause the build run until return key is pressed
  67. (see above).</p>
  68. <pre>
  69. &lt;input
  70. message=&quot;All data is going to be deleted from DB continue (y/n)?&quot;
  71. validargs=&quot;y,n&quot;
  72. addproperty=&quot;do.delete&quot;
  73. /&gt;
  74. &lt;condition property=&quot;do.abort&quot;&gt;
  75. &lt;equals arg1=&quot;n&quot; arg2=&quot;${do.delete}&quot;/&gt;
  76. &lt;/condition&gt;
  77. &lt;fail if=&quot;do.abort&quot;&gt;Build aborted by user.&lt;/fail&gt;
  78. </pre>
  79. <p>Will display the message &quot;All data is going to be deleted from
  80. DB continue (y/n)?&quot; and require 'y' to continue build or 'n' to
  81. exit build with following message &quot;Build aborted by
  82. user.&quot;.</p>
  83. <pre> &lt;input
  84. message=&quot;Please enter db-username:&quot;
  85. addproperty=&quot;db.user&quot;
  86. /&gt;</pre>
  87. <p>Will display the message &quot;Please enter db-username:&quot; and set the
  88. property <code>db.user</code> to the value entered by the user.</p>
  89. <hr>
  90. <p align="center">Copyright &copy; 2001-2002 Apache Software Foundation. All rights
  91. Reserved.</p>
  92. </body>
  93. </html>