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.

user.html 35 kB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913
  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="Adam Murdoch">
  8. <meta name="email" value="adammurdoch@apache.org">
  9. <title>Apache Myrmidon - User Guide</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>Myrmidon</strong></p>
  28. <ul>
  29. <li> <a href="./index.html">Introduction</a>
  30. </li>
  31. <li> <a href="./user.html">User Guide</a>
  32. </li>
  33. <li> <a href="./todo.html">Get Involved</a>
  34. </li>
  35. <li> <a href="./todo.html#Todo List">Todo List</a>
  36. </li>
  37. </ul>
  38. </td>
  39. <td align="left" valign="top">
  40. <table border="0" cellspacing="0" cellpadding="2" width="100%">
  41. <tr><td bgcolor="#525D76">
  42. <font color="#ffffff" face="arial,helvetica,sanserif">
  43. <a name="Building Myrmidon"><strong>Building Myrmidon</strong></a>
  44. </font>
  45. </td></tr>
  46. <tr><td>
  47. <blockquote>
  48. <p>
  49. First, you will need to fetch the Myrmidon source from CVS. The source
  50. can be source in the <code>proposal/myrmidon</code> directory of the
  51. Ant source tree. You should check out the <code>jakarta-ant</code> CVS
  52. module, as described
  53. <a href="http://jakarta.apache.org/site/cvsindex.html">here</a>.
  54. </p>
  55. <p>
  56. To build Myrmidon, use the <code>build.xml</code> build script. You will need
  57. to use Ant 1.4.1 or later. The default target builds the Myrmidon distribution
  58. into the <code>dist</code> directory. The distribution is a ready-to-run
  59. installation of Myrmidon.
  60. </p>
  61. </blockquote>
  62. </td></tr>
  63. </table>
  64. <table border="0" cellspacing="0" cellpadding="2" width="100%">
  65. <tr><td bgcolor="#525D76">
  66. <font color="#ffffff" face="arial,helvetica,sanserif">
  67. <a name="Running Myrmidon"><strong>Running Myrmidon</strong></a>
  68. </font>
  69. </td></tr>
  70. <tr><td>
  71. <blockquote>
  72. <p>
  73. To run Myrmidon, use one of the following methods:
  74. </p>
  75. <table border="0" cellspacing="0" cellpadding="2" width="100%">
  76. <tr><td bgcolor="#828DA6">
  77. <font color="#ffffff" face="arial,helvetica,sanserif">
  78. <a name="Launcher Script"><strong>Launcher Script</strong></a>
  79. </font>
  80. </td></tr>
  81. <tr><td>
  82. <blockquote>
  83. <p>
  84. On Windows and Unix platforms, you can use the <code>ant</code> script
  85. in the distribution's <code>bin</code> directory. The following environment
  86. variables can be used, but are not required (except on Windows 9x - see below).
  87. </p>
  88. <p>
  89. </p>
  90. <table>
  91. <tr>
  92. <td bgcolor="#039acc" colspan="" rowspan=""
  93. valign="top" align="left">
  94. <font color="#000000" size="-1" face="arial,helvetica,sanserif">
  95. Variable
  96. </font>
  97. </td>
  98. <td bgcolor="#039acc" colspan="" rowspan=""
  99. valign="top" align="left">
  100. <font color="#000000" size="-1" face="arial,helvetica,sanserif">
  101. Description
  102. </font>
  103. </td>
  104. </tr>
  105. <tr>
  106. <td bgcolor="#a0ddf0" colspan="" rowspan=""
  107. valign="top" align="left">
  108. <font color="#000000" size="-1" face="arial,helvetica,sanserif">
  109. JAVA_HOME
  110. </font>
  111. </td>
  112. <td bgcolor="#a0ddf0" colspan="" rowspan=""
  113. valign="top" align="left">
  114. <font color="#000000" size="-1" face="arial,helvetica,sanserif">
  115. The directory that the JDK is installed in.
  116. </font>
  117. </td>
  118. </tr>
  119. <tr>
  120. <td bgcolor="#a0ddf0" colspan="" rowspan=""
  121. valign="top" align="left">
  122. <font color="#000000" size="-1" face="arial,helvetica,sanserif">
  123. JAVACMD
  124. </font>
  125. </td>
  126. <td bgcolor="#a0ddf0" colspan="" rowspan=""
  127. valign="top" align="left">
  128. <font color="#000000" size="-1" face="arial,helvetica,sanserif">
  129. The command to use to start the JVM. Defaults to <code>java</code>.
  130. </font>
  131. </td>
  132. </tr>
  133. <tr>
  134. <td bgcolor="#a0ddf0" colspan="" rowspan=""
  135. valign="top" align="left">
  136. <font color="#000000" size="-1" face="arial,helvetica,sanserif">
  137. ANT_HOME
  138. </font>
  139. </td>
  140. <td bgcolor="#a0ddf0" colspan="" rowspan=""
  141. valign="top" align="left">
  142. <font color="#000000" size="-1" face="arial,helvetica,sanserif">
  143. The directory containing the Myrmidon distribution. This must be
  144. set when running on Windows 95, 98 or Me.
  145. </font>
  146. </td>
  147. </tr>
  148. </table>
  149. </blockquote>
  150. </td></tr>
  151. </table>
  152. <table border="0" cellspacing="0" cellpadding="2" width="100%">
  153. <tr><td bgcolor="#828DA6">
  154. <font color="#ffffff" face="arial,helvetica,sanserif">
  155. <a name="Executable Jar File"><strong>Executable Jar File</strong></a>
  156. </font>
  157. </td></tr>
  158. <tr><td>
  159. <blockquote>
  160. <p>
  161. The Myrmidon distribution includes an executable Jar file, which can be used
  162. to run Myrmidon. Use the following command:
  163. </p>
  164. <pre>
  165. prompt&gt; <i>java</i> -jar <i>ant-home</i>/bin/myrmidon-launcher.jar <i>options</i>
  166. </pre>
  167. </blockquote>
  168. </td></tr>
  169. </table>
  170. <p>When started, Myrmidon looks for a project file called <code>build.ant</code>
  171. in the current directory. A different project file can be specified using the
  172. <code>-f</code> command-line option. Myrmidon executes the targets given on
  173. the command-line, or the default target if none is given. For example, the
  174. following executes the targets <code>clean</code> and <code>build</code> from
  175. the project file <code>my-project.xml</code>:</p>
  176. <pre>
  177. prompt&gt; ant -f my-project.xml clean build
  178. </pre>
  179. <p>
  180. Run Myrmidon with the <code>-h</code> command-line option for a list of
  181. the command-line options that are available.
  182. </p>
  183. </blockquote>
  184. </td></tr>
  185. </table>
  186. <table border="0" cellspacing="0" cellpadding="2" width="100%">
  187. <tr><td bgcolor="#525D76">
  188. <font color="#ffffff" face="arial,helvetica,sanserif">
  189. <a name="Project File"><strong>Project File</strong></a>
  190. </font>
  191. </td></tr>
  192. <tr><td>
  193. <blockquote>
  194. <p>
  195. The project file format is very similar to that of Ant 1. The root element of
  196. the project file must be a <code>&lt;project&gt;</code> element. It can
  197. take the following attributes:
  198. </p>
  199. <table>
  200. <tr>
  201. <td bgcolor="#039acc" colspan="" rowspan=""
  202. valign="top" align="left">
  203. <font color="#000000" size="-1" face="arial,helvetica,sanserif">
  204. Attribute
  205. </font>
  206. </td>
  207. <td bgcolor="#039acc" colspan="" rowspan=""
  208. valign="top" align="left">
  209. <font color="#000000" size="-1" face="arial,helvetica,sanserif">
  210. Description
  211. </font>
  212. </td>
  213. <td bgcolor="#039acc" colspan="" rowspan=""
  214. valign="top" align="left">
  215. <font color="#000000" size="-1" face="arial,helvetica,sanserif">
  216. Default Value
  217. </font>
  218. </td>
  219. </tr>
  220. <tr>
  221. <td bgcolor="#a0ddf0" colspan="" rowspan=""
  222. valign="top" align="left">
  223. <font color="#000000" size="-1" face="arial,helvetica,sanserif">
  224. name
  225. </font>
  226. </td>
  227. <td bgcolor="#a0ddf0" colspan="" rowspan=""
  228. valign="top" align="left">
  229. <font color="#000000" size="-1" face="arial,helvetica,sanserif">
  230. The project name.
  231. </font>
  232. </td>
  233. <td bgcolor="#a0ddf0" colspan="" rowspan=""
  234. valign="top" align="left">
  235. <font color="#000000" size="-1" face="arial,helvetica,sanserif">
  236. The base-name of the project file, with the extension removed.
  237. </font>
  238. </td>
  239. </tr>
  240. <tr>
  241. <td bgcolor="#a0ddf0" colspan="" rowspan=""
  242. valign="top" align="left">
  243. <font color="#000000" size="-1" face="arial,helvetica,sanserif">
  244. basedir
  245. </font>
  246. </td>
  247. <td bgcolor="#a0ddf0" colspan="" rowspan=""
  248. valign="top" align="left">
  249. <font color="#000000" size="-1" face="arial,helvetica,sanserif">
  250. The base directory for the project. The base directory is used
  251. to resolve all relative file names used in the project file.
  252. </font>
  253. </td>
  254. <td bgcolor="#a0ddf0" colspan="" rowspan=""
  255. valign="top" align="left">
  256. <font color="#000000" size="-1" face="arial,helvetica,sanserif">
  257. The directory containing the project file.
  258. </font>
  259. </td>
  260. </tr>
  261. <tr>
  262. <td bgcolor="#a0ddf0" colspan="" rowspan=""
  263. valign="top" align="left">
  264. <font color="#000000" size="-1" face="arial,helvetica,sanserif">
  265. default
  266. </font>
  267. </td>
  268. <td bgcolor="#a0ddf0" colspan="" rowspan=""
  269. valign="top" align="left">
  270. <font color="#000000" size="-1" face="arial,helvetica,sanserif">
  271. The name of the default target.
  272. </font>
  273. </td>
  274. <td bgcolor="#a0ddf0" colspan="" rowspan=""
  275. valign="top" align="left">
  276. <font color="#000000" size="-1" face="arial,helvetica,sanserif">
  277. <code>main</code>
  278. </font>
  279. </td>
  280. </tr>
  281. <tr>
  282. <td bgcolor="#a0ddf0" colspan="" rowspan=""
  283. valign="top" align="left">
  284. <font color="#000000" size="-1" face="arial,helvetica,sanserif">
  285. version
  286. </font>
  287. </td>
  288. <td bgcolor="#a0ddf0" colspan="" rowspan=""
  289. valign="top" align="left">
  290. <font color="#000000" size="-1" face="arial,helvetica,sanserif">
  291. The project file version that the project is written for.
  292. </font>
  293. </td>
  294. <td bgcolor="#a0ddf0" colspan="" rowspan=""
  295. valign="top" align="left">
  296. <font color="#000000" size="-1" face="arial,helvetica,sanserif">
  297. None, must be <code>2.0</code>
  298. </font>
  299. </td>
  300. </tr>
  301. </table>
  302. <p>
  303. A <code>&lt;project&gt;</code> element can contain the following elements,
  304. in the order given below:
  305. </p>
  306. <ul>
  307. <li><a href="#Project References"><code>&lt;projectref&gt;</code></a></li>
  308. <li><a href="#Library Imports"><code>&lt;import&gt;</code></a></li>
  309. <li><a href="#Implicit Tasks">Implicit tasks</a></li>
  310. <li><a href="#Targets"><code>&lt;target&gt;</code></a></li>
  311. </ul>
  312. <table border="0" cellspacing="0" cellpadding="2" width="100%">
  313. <tr><td bgcolor="#828DA6">
  314. <font color="#ffffff" face="arial,helvetica,sanserif">
  315. <a name="Project References"><strong>Project References</strong></a>
  316. </font>
  317. </td></tr>
  318. <tr><td>
  319. <blockquote>
  320. <p>Project references allow the project to import, or reference, other projects.
  321. A <code>&lt;projectref&gt;</code> element takes the following attributes:</p>
  322. <table>
  323. <tr>
  324. <td bgcolor="#039acc" colspan="" rowspan=""
  325. valign="top" align="left">
  326. <font color="#000000" size="-1" face="arial,helvetica,sanserif">
  327. Attribute
  328. </font>
  329. </td>
  330. <td bgcolor="#039acc" colspan="" rowspan=""
  331. valign="top" align="left">
  332. <font color="#000000" size="-1" face="arial,helvetica,sanserif">
  333. Description
  334. </font>
  335. </td>
  336. <td bgcolor="#039acc" colspan="" rowspan=""
  337. valign="top" align="left">
  338. <font color="#000000" size="-1" face="arial,helvetica,sanserif">
  339. Default Value
  340. </font>
  341. </td>
  342. </tr>
  343. <tr>
  344. <td bgcolor="#a0ddf0" colspan="" rowspan=""
  345. valign="top" align="left">
  346. <font color="#000000" size="-1" face="arial,helvetica,sanserif">
  347. name
  348. </font>
  349. </td>
  350. <td bgcolor="#a0ddf0" colspan="" rowspan=""
  351. valign="top" align="left">
  352. <font color="#000000" size="-1" face="arial,helvetica,sanserif">
  353. The name to use to identify the referenced project.
  354. </font>
  355. </td>
  356. <td bgcolor="#a0ddf0" colspan="" rowspan=""
  357. valign="top" align="left">
  358. <font color="#000000" size="-1" face="arial,helvetica,sanserif">
  359. Required
  360. </font>
  361. </td>
  362. </tr>
  363. <tr>
  364. <td bgcolor="#a0ddf0" colspan="" rowspan=""
  365. valign="top" align="left">
  366. <font color="#000000" size="-1" face="arial,helvetica,sanserif">
  367. location
  368. </font>
  369. </td>
  370. <td bgcolor="#a0ddf0" colspan="" rowspan=""
  371. valign="top" align="left">
  372. <font color="#000000" size="-1" face="arial,helvetica,sanserif">
  373. The path to the project file to reference.
  374. </font>
  375. </td>
  376. <td bgcolor="#a0ddf0" colspan="" rowspan=""
  377. valign="top" align="left">
  378. <font color="#000000" size="-1" face="arial,helvetica,sanserif">
  379. Required
  380. </font>
  381. </td>
  382. </tr>
  383. </table>
  384. <p>
  385. The targets of a referenced project can be used in the <code>depends</code> list
  386. of a target in the referencing project, using the following syntax:
  387. <code><i>project-name</i>-&gt;<i>target-name</i></code>. Here is a simple example:</p>
  388. <div align="left">
  389. <table cellspacing="4" cellpadding="0" border="0">
  390. <tr>
  391. <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
  392. <td bgcolor="#023264" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
  393. <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
  394. </tr>
  395. <tr>
  396. <td bgcolor="#023264" width="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
  397. <td bgcolor="#ffffff"><pre>
  398. &lt;project version=&quot;2.0&quot;&gt;
  399. &lt;!-- Reference another project --&gt;
  400. &lt;projectref name=&quot;subproject&quot; location=&quot;subproject/build.xml&quot;/&gt;
  401. &lt;!-- Use the &quot;compile&quot; target from the referenced project --&gt;
  402. &lt;target name=&quot;main&quot; depends=&quot;subproject-&gt;compile&quot;&gt;
  403. .. do some stuff ..
  404. &lt;/target&gt;
  405. &lt;/project&gt;
  406. </pre></td>
  407. <td bgcolor="#023264" width="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
  408. </tr>
  409. <tr>
  410. <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
  411. <td bgcolor="#023264" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
  412. <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
  413. </tr>
  414. </table>
  415. </div>
  416. </blockquote>
  417. </td></tr>
  418. </table>
  419. <table border="0" cellspacing="0" cellpadding="2" width="100%">
  420. <tr><td bgcolor="#828DA6">
  421. <font color="#ffffff" face="arial,helvetica,sanserif">
  422. <a name="Library Imports"><strong>Library Imports</strong></a>
  423. </font>
  424. </td></tr>
  425. <tr><td>
  426. <blockquote>
  427. <p>Library imports allow the project to import the tasks and data-types from an
  428. antlib. An <code>&lt;import&gt;</code> element takes the following attributes:</p>
  429. <table>
  430. <tr>
  431. <td bgcolor="#039acc" colspan="" rowspan=""
  432. valign="top" align="left">
  433. <font color="#000000" size="-1" face="arial,helvetica,sanserif">
  434. Attribute
  435. </font>
  436. </td>
  437. <td bgcolor="#039acc" colspan="" rowspan=""
  438. valign="top" align="left">
  439. <font color="#000000" size="-1" face="arial,helvetica,sanserif">
  440. Description
  441. </font>
  442. </td>
  443. <td bgcolor="#039acc" colspan="" rowspan=""
  444. valign="top" align="left">
  445. <font color="#000000" size="-1" face="arial,helvetica,sanserif">
  446. Default Value
  447. </font>
  448. </td>
  449. </tr>
  450. <tr>
  451. <td bgcolor="#a0ddf0" colspan="" rowspan=""
  452. valign="top" align="left">
  453. <font color="#000000" size="-1" face="arial,helvetica,sanserif">
  454. library
  455. </font>
  456. </td>
  457. <td bgcolor="#a0ddf0" colspan="" rowspan=""
  458. valign="top" align="left">
  459. <font color="#000000" size="-1" face="arial,helvetica,sanserif">
  460. The name of the library to import. The <code>ext</code> directory
  461. of the Myrmidon distribution is searched for a library file with
  462. the given name, and an <code>atl</code> extension.
  463. </font>
  464. </td>
  465. <td bgcolor="#a0ddf0" colspan="" rowspan=""
  466. valign="top" align="left">
  467. <font color="#000000" size="-1" face="arial,helvetica,sanserif">
  468. Required
  469. </font>
  470. </td>
  471. </tr>
  472. <tr>
  473. <td bgcolor="#a0ddf0" colspan="" rowspan=""
  474. valign="top" align="left">
  475. <font color="#000000" size="-1" face="arial,helvetica,sanserif">
  476. type
  477. </font>
  478. </td>
  479. <td bgcolor="#a0ddf0" colspan="" rowspan=""
  480. valign="top" align="left">
  481. <font color="#000000" size="-1" face="arial,helvetica,sanserif">
  482. The type of definition to import. Values include <code>task</code>,
  483. and <code>data-type</code>.
  484. </font>
  485. </td>
  486. <td bgcolor="#a0ddf0" colspan="" rowspan=""
  487. valign="top" align="left">
  488. <font color="#000000" size="-1" face="arial,helvetica,sanserif">
  489. None
  490. </font>
  491. </td>
  492. </tr>
  493. <tr>
  494. <td bgcolor="#a0ddf0" colspan="" rowspan=""
  495. valign="top" align="left">
  496. <font color="#000000" size="-1" face="arial,helvetica,sanserif">
  497. name
  498. </font>
  499. </td>
  500. <td bgcolor="#a0ddf0" colspan="" rowspan=""
  501. valign="top" align="left">
  502. <font color="#000000" size="-1" face="arial,helvetica,sanserif">
  503. The name of the type to import.
  504. </font>
  505. </td>
  506. <td bgcolor="#a0ddf0" colspan="" rowspan=""
  507. valign="top" align="left">
  508. <font color="#000000" size="-1" face="arial,helvetica,sanserif">
  509. None
  510. </font>
  511. </td>
  512. </tr>
  513. </table>
  514. <p>
  515. If the <code>type</code> and <code>name</code> attributes are not provided,
  516. the entire contents of the antlib are imported.
  517. </p>
  518. <p>The following example import the <code>&lt;my-task&gt;</code> task from
  519. the <code>my-tasks</code> antlib.</p>
  520. <div align="left">
  521. <table cellspacing="4" cellpadding="0" border="0">
  522. <tr>
  523. <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
  524. <td bgcolor="#023264" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
  525. <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
  526. </tr>
  527. <tr>
  528. <td bgcolor="#023264" width="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
  529. <td bgcolor="#ffffff"><pre>
  530. &lt;project version=&quot;2.0&quot;&gt;
  531. &lt;!-- Import task &lt;my-task&gt; from the 'my-tasks' antlib. --&gt;
  532. &lt;import library=&quot;my-tasks&quot; type=&quot;task&quot; name=&quot;my-task&quot;/&gt;
  533. &lt;target name=&quot;main&quot;&gt;
  534. &lt;my-task some-prop=&quot;..&quot;/&gt;
  535. &lt;/target&gt;
  536. &lt;/project&gt;
  537. </pre></td>
  538. <td bgcolor="#023264" width="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
  539. </tr>
  540. <tr>
  541. <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
  542. <td bgcolor="#023264" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
  543. <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
  544. </tr>
  545. </table>
  546. </div>
  547. </blockquote>
  548. </td></tr>
  549. </table>
  550. <table border="0" cellspacing="0" cellpadding="2" width="100%">
  551. <tr><td bgcolor="#828DA6">
  552. <font color="#ffffff" face="arial,helvetica,sanserif">
  553. <a name="Implicit Tasks"><strong>Implicit Tasks</strong></a>
  554. </font>
  555. </td></tr>
  556. <tr><td>
  557. <blockquote>
  558. <p>Implicit tasks are run before any of the project's targets are run. Any task
  559. can be used, including <code>&lt;property&gt;</code> and data-type instances.
  560. Implicit tasks can be used to initialise the project. For example:</p>
  561. <div align="left">
  562. <table cellspacing="4" cellpadding="0" border="0">
  563. <tr>
  564. <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
  565. <td bgcolor="#023264" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
  566. <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
  567. </tr>
  568. <tr>
  569. <td bgcolor="#023264" width="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
  570. <td bgcolor="#ffffff"><pre>
  571. &lt;project version=&quot;2.0&quot;&gt;
  572. &lt;property name=&quot;some-property&quot; value=&quot;some value&quot;/&gt;
  573. &lt;path id=&quot;classpath&quot;&gt;
  574. &lt;fileset dir=&quot;lib&quot;/&gt;
  575. &lt;/path&gt;
  576. &lt;log&gt;Set classpath to ${classpath}&lt;/log&gt;
  577. &lt;target name=&quot;main&quot;&gt;
  578. .. do some stuff ..
  579. &lt;/target&gt;
  580. &lt;/project&gt;
  581. </pre></td>
  582. <td bgcolor="#023264" width="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
  583. </tr>
  584. <tr>
  585. <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
  586. <td bgcolor="#023264" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
  587. <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
  588. </tr>
  589. </table>
  590. </div>
  591. </blockquote>
  592. </td></tr>
  593. </table>
  594. <table border="0" cellspacing="0" cellpadding="2" width="100%">
  595. <tr><td bgcolor="#828DA6">
  596. <font color="#ffffff" face="arial,helvetica,sanserif">
  597. <a name="Targets"><strong>Targets</strong></a>
  598. </font>
  599. </td></tr>
  600. <tr><td>
  601. <blockquote>
  602. <p>Targets have the same format as in Ant 1.x, though some of the behaviour
  603. is different. A <code>&lt;target&gt;</code> element takes the following
  604. attributes:</p>
  605. <table>
  606. <tr>
  607. <td bgcolor="#039acc" colspan="" rowspan=""
  608. valign="top" align="left">
  609. <font color="#000000" size="-1" face="arial,helvetica,sanserif">
  610. Attribute
  611. </font>
  612. </td>
  613. <td bgcolor="#039acc" colspan="" rowspan=""
  614. valign="top" align="left">
  615. <font color="#000000" size="-1" face="arial,helvetica,sanserif">
  616. Description
  617. </font>
  618. </td>
  619. <td bgcolor="#039acc" colspan="" rowspan=""
  620. valign="top" align="left">
  621. <font color="#000000" size="-1" face="arial,helvetica,sanserif">
  622. Default Value
  623. </font>
  624. </td>
  625. </tr>
  626. <tr>
  627. <td bgcolor="#a0ddf0" colspan="" rowspan=""
  628. valign="top" align="left">
  629. <font color="#000000" size="-1" face="arial,helvetica,sanserif">
  630. name
  631. </font>
  632. </td>
  633. <td bgcolor="#a0ddf0" colspan="" rowspan=""
  634. valign="top" align="left">
  635. <font color="#000000" size="-1" face="arial,helvetica,sanserif">
  636. The name of the target.
  637. </font>
  638. </td>
  639. <td bgcolor="#a0ddf0" colspan="" rowspan=""
  640. valign="top" align="left">
  641. <font color="#000000" size="-1" face="arial,helvetica,sanserif">
  642. Required
  643. </font>
  644. </td>
  645. </tr>
  646. <tr>
  647. <td bgcolor="#a0ddf0" colspan="" rowspan=""
  648. valign="top" align="left">
  649. <font color="#000000" size="-1" face="arial,helvetica,sanserif">
  650. depends
  651. </font>
  652. </td>
  653. <td bgcolor="#a0ddf0" colspan="" rowspan=""
  654. valign="top" align="left">
  655. <font color="#000000" size="-1" face="arial,helvetica,sanserif">
  656. A comma-separated list of targets that this target depends on.
  657. This list can contain targets from referenced projects.
  658. </font>
  659. </td>
  660. <td bgcolor="#a0ddf0" colspan="" rowspan=""
  661. valign="top" align="left">
  662. <font color="#000000" size="-1" face="arial,helvetica,sanserif">
  663. None
  664. </font>
  665. </td>
  666. </tr>
  667. <tr>
  668. <td bgcolor="#a0ddf0" colspan="" rowspan=""
  669. valign="top" align="left">
  670. <font color="#000000" size="-1" face="arial,helvetica,sanserif">
  671. if
  672. </font>
  673. </td>
  674. <td bgcolor="#a0ddf0" colspan="" rowspan=""
  675. valign="top" align="left">
  676. <font color="#000000" size="-1" face="arial,helvetica,sanserif">
  677. Only execute this target if the specified property is set, and not
  678. equal to <code>false</code>.
  679. </font>
  680. </td>
  681. <td bgcolor="#a0ddf0" colspan="" rowspan=""
  682. valign="top" align="left">
  683. <font color="#000000" size="-1" face="arial,helvetica,sanserif">
  684. None
  685. </font>
  686. </td>
  687. </tr>
  688. <tr>
  689. <td bgcolor="#a0ddf0" colspan="" rowspan=""
  690. valign="top" align="left">
  691. <font color="#000000" size="-1" face="arial,helvetica,sanserif">
  692. unless
  693. </font>
  694. </td>
  695. <td bgcolor="#a0ddf0" colspan="" rowspan=""
  696. valign="top" align="left">
  697. <font color="#000000" size="-1" face="arial,helvetica,sanserif">
  698. Do not execute this target if the specified property is set, and not
  699. equal to <code>false</code>.
  700. </font>
  701. </td>
  702. <td bgcolor="#a0ddf0" colspan="" rowspan=""
  703. valign="top" align="left">
  704. <font color="#000000" size="-1" face="arial,helvetica,sanserif">
  705. None
  706. </font>
  707. </td>
  708. </tr>
  709. </table>
  710. </blockquote>
  711. </td></tr>
  712. </table>
  713. </blockquote>
  714. </td></tr>
  715. </table>
  716. <table border="0" cellspacing="0" cellpadding="2" width="100%">
  717. <tr><td bgcolor="#525D76">
  718. <font color="#ffffff" face="arial,helvetica,sanserif">
  719. <a name="Tasks"><strong>Tasks</strong></a>
  720. </font>
  721. </td></tr>
  722. <tr><td>
  723. <blockquote>
  724. <p>
  725. The following table lists some of the current set of tasks. You can find
  726. example usages of these tasks in the sample project file
  727. <code>src/make/sample.ant</code>.
  728. </p>
  729. <table>
  730. <tr>
  731. <td bgcolor="#039acc" colspan="" rowspan=""
  732. valign="top" align="left">
  733. <font color="#000000" size="-1" face="arial,helvetica,sanserif">
  734. Task
  735. </font>
  736. </td>
  737. <td bgcolor="#039acc" colspan="" rowspan=""
  738. valign="top" align="left">
  739. <font color="#000000" size="-1" face="arial,helvetica,sanserif">
  740. Description
  741. </font>
  742. </td>
  743. </tr>
  744. <tr>
  745. <td bgcolor="#a0ddf0" colspan="" rowspan=""
  746. valign="top" align="left">
  747. <font color="#000000" size="-1" face="arial,helvetica,sanserif">
  748. fail
  749. </font>
  750. </td>
  751. <td bgcolor="#a0ddf0" colspan="" rowspan=""
  752. valign="top" align="left">
  753. <font color="#000000" size="-1" face="arial,helvetica,sanserif">
  754. Causes the build to fail.
  755. </font>
  756. </td>
  757. </tr>
  758. <tr>
  759. <td bgcolor="#a0ddf0" colspan="" rowspan=""
  760. valign="top" align="left">
  761. <font color="#000000" size="-1" face="arial,helvetica,sanserif">
  762. if
  763. </font>
  764. </td>
  765. <td bgcolor="#a0ddf0" colspan="" rowspan=""
  766. valign="top" align="left">
  767. <font color="#000000" size="-1" face="arial,helvetica,sanserif">
  768. Conditionally executes a set of tasks.
  769. </font>
  770. </td>
  771. </tr>
  772. <tr>
  773. <td bgcolor="#a0ddf0" colspan="" rowspan=""
  774. valign="top" align="left">
  775. <font color="#000000" size="-1" face="arial,helvetica,sanserif">
  776. load-properties
  777. </font>
  778. </td>
  779. <td bgcolor="#a0ddf0" colspan="" rowspan=""
  780. valign="top" align="left">
  781. <font color="#000000" size="-1" face="arial,helvetica,sanserif">
  782. Loads a set of properties from a file.
  783. </font>
  784. </td>
  785. </tr>
  786. <tr>
  787. <td bgcolor="#a0ddf0" colspan="" rowspan=""
  788. valign="top" align="left">
  789. <font color="#000000" size="-1" face="arial,helvetica,sanserif">
  790. log
  791. </font>
  792. </td>
  793. <td bgcolor="#a0ddf0" colspan="" rowspan=""
  794. valign="top" align="left">
  795. <font color="#000000" size="-1" face="arial,helvetica,sanserif">
  796. Writes a log message.
  797. </font>
  798. </td>
  799. </tr>
  800. <tr>
  801. <td bgcolor="#a0ddf0" colspan="" rowspan=""
  802. valign="top" align="left">
  803. <font color="#000000" size="-1" face="arial,helvetica,sanserif">
  804. property
  805. </font>
  806. </td>
  807. <td bgcolor="#a0ddf0" colspan="" rowspan=""
  808. valign="top" align="left">
  809. <font color="#000000" size="-1" face="arial,helvetica,sanserif">
  810. Sets a property.
  811. </font>
  812. </td>
  813. </tr>
  814. <tr>
  815. <td bgcolor="#a0ddf0" colspan="" rowspan=""
  816. valign="top" align="left">
  817. <font color="#000000" size="-1" face="arial,helvetica,sanserif">
  818. try-catch
  819. </font>
  820. </td>
  821. <td bgcolor="#a0ddf0" colspan="" rowspan=""
  822. valign="top" align="left">
  823. <font color="#000000" size="-1" face="arial,helvetica,sanserif">
  824. Runs a set of tasks, with a provided error and clean-up handler.
  825. </font>
  826. </td>
  827. </tr>
  828. <tr>
  829. <td bgcolor="#a0ddf0" colspan="" rowspan=""
  830. valign="top" align="left">
  831. <font color="#000000" size="-1" face="arial,helvetica,sanserif">
  832. converter-def
  833. </font>
  834. </td>
  835. <td bgcolor="#a0ddf0" colspan="" rowspan=""
  836. valign="top" align="left">
  837. <font color="#000000" size="-1" face="arial,helvetica,sanserif">
  838. Register a type converter. These are used when configuring a task
  839. or data-type from attributes.
  840. </font>
  841. </td>
  842. </tr>
  843. <tr>
  844. <td bgcolor="#a0ddf0" colspan="" rowspan=""
  845. valign="top" align="left">
  846. <font color="#000000" size="-1" face="arial,helvetica,sanserif">
  847. type-def
  848. </font>
  849. </td>
  850. <td bgcolor="#a0ddf0" colspan="" rowspan=""
  851. valign="top" align="left">
  852. <font color="#000000" size="-1" face="arial,helvetica,sanserif">
  853. Register a task or data-type.
  854. </font>
  855. </td>
  856. </tr>
  857. <tr>
  858. <td bgcolor="#a0ddf0" colspan="" rowspan=""
  859. valign="top" align="left">
  860. <font color="#000000" size="-1" face="arial,helvetica,sanserif">
  861. import
  862. </font>
  863. </td>
  864. <td bgcolor="#a0ddf0" colspan="" rowspan=""
  865. valign="top" align="left">
  866. <font color="#000000" size="-1" face="arial,helvetica,sanserif">
  867. Register the contents of an antlib.
  868. </font>
  869. </td>
  870. </tr>
  871. </table>
  872. </blockquote>
  873. </td></tr>
  874. </table>
  875. </td>
  876. </tr>
  877. <!-- FOOTER -->
  878. <tr><td colspan="2">
  879. <hr noshade="" size="1"/>
  880. </td></tr>
  881. <tr><td colspan="2">
  882. <div align="center"><font color="#525D76" size="-1"><em>
  883. Copyright &#169; 2000-2002, Apache Software Foundation
  884. </em></font></div>
  885. </td></tr>
  886. </table>
  887. </body>
  888. </html>
  889. <!-- end the processing -->