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.

subant.html 22 KiB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588
  1. <html>
  2. <head>
  3. <meta http-equiv="Content-Language" content="en-us">
  4. <title>Subant
  5. Task</title>
  6. </head>
  7. <body bgcolor="#ffffff" text="#000000" link="#525D76"
  8. alink="#525D76" vlink="#525D76">
  9. <table border="0" width="100%" cellspacing="4">
  10. <!-- PAGE HEADER -->
  11. <tr>
  12. <td>
  13. <table border="0" width="100%"><tr>
  14. <td valign="bottom">
  15. <font size="+3" face="arial,helvetica,sanserif"><strong>Subant
  16. Task</strong></font>
  17. <br><font face="arial,helvetica,sanserif">Calls a given target for all defined sub-builds.</font>
  18. </td>
  19. <td>
  20. <!-- PROJECT LOGO -->
  21. <a href="http://ant.apache.org/">
  22. <img src="../../images/ant_logo_large.gif" align="right" alt="Apache Ant" border="0">
  23. </a>
  24. </td>
  25. </tr></table>
  26. </td>
  27. </tr>
  28. <!-- START RIGHT SIDE MAIN BODY -->
  29. <tr>
  30. <td valign="top" align="left">
  31. <!-- Applying task/description -->
  32. <!-- Start Description -->
  33. <table border="0" cellspacing="0" cellpadding="2" width="100%">
  34. <tr><td>&nbsp;</td></tr>
  35. <tr><td bgcolor="#525D76">
  36. <font color="#ffffff" face="arial,helvetica.sanserif">
  37. <a name="description">
  38. <strong>Description</strong></a></font>
  39. </td></tr>
  40. <tr><td><blockquote>
  41. <p>
  42. Calls a given target for all defined sub-builds.
  43. This is an extension
  44. of ant for bulk project execution.
  45. <strong>This task must not be used outside of a
  46. <code>target</code> if it invokes the same build file it is
  47. part of.</strong>
  48. </p>
  49. <p><em>Since Ant 1.6</em></p>
  50. <table border="0" cellspacing="0" cellpadding="2" width="100%">
  51. <!-- Subsection heading -->
  52. <tr><td bgcolor="#828DA6">
  53. <font color="#ffffff" face="arial,helvetica.sanserif">
  54. <a name="Use with directories">
  55. <strong>Use with directories</strong></a></font>
  56. </td></tr>
  57. <!-- Subsection body -->
  58. <tr><td>
  59. <p>
  60. subant can be used with directory sets to execute a build from different directories.
  61. 2 different options are offered :
  62. </p>
  63. <ul>
  64. <li>
  65. to run the same build file <code>/somepath/otherpath/mybuild.xml</code>
  66. with different base directories, use the genericantfile attribute
  67. </li>
  68. <li>if you want to run <code>directory1/mybuild.xml</code>, <code>directory2/mybuild.xml</code>, <code>....</code>,
  69. use the antfile attribute. The subant task does not set the base directory for you in this case, because you can specify it in each build file.
  70. </li>
  71. </ul>
  72. </td></tr>
  73. </table>
  74. </blockquote></td></tr>
  75. </table>
  76. <!-- End Description -->
  77. <!-- Ignore -->
  78. <!-- Start Attributes -->
  79. <table border="0" cellspacing="0" cellpadding="2" width="100%">
  80. <tr><td>&nbsp;</td></tr>
  81. <tr><td bgcolor="#525D76">
  82. <font color="#ffffff" face="arial,helvetica.sanserif">
  83. <a name="attributes">
  84. <strong>Parameters</strong></a></font>
  85. </td></tr>
  86. <tr><td><blockquote>
  87. <table>
  88. <tr>
  89. <td bgcolor="#cccccc" valign="top" align="left">
  90. <font color="#000000" size="-1" face="arial,helvetica,sanserif"><b>Attribute</b></font>
  91. </td>
  92. <td bgcolor="#cccccc" valign="top" align="left">
  93. <font color="#000000" size="-1" face="arial,helvetica,sanserif"><b>Description</b></font>
  94. </td>
  95. <td bgcolor="#cccccc" valign="top" align="left">
  96. <font color="#000000" size="-1" face="arial,helvetica,sanserif"><b>Type</b></font>
  97. </td>
  98. <td bgcolor="#cccccc" valign="top" align="left">
  99. <font color="#000000" size="-1" face="arial,helvetica,sanserif"><b>Requirement</b></font>
  100. </td>
  101. </tr>
  102. <!-- Attribute Group -->
  103. <!-- Attribute Group -->
  104. <!-- Attribute -->
  105. <tr>
  106. <td bgcolor="#eeeeee" valign="top" align="left">
  107. <font color="#000000" size="-1" face="arial,helvetica,sanserif">antfile</font>
  108. </td>
  109. <td bgcolor="#eeeeee" valign="top" align="left">
  110. <font color="#000000" size="-1" face="arial,helvetica,sanserif">Build file name, to use in conjunction with directories.<br> Defaults to "build.xml".<br> If <code>genericantfile</code> is set, this attribute is ignored.</font>
  111. </td>
  112. <td bgcolor="#eeeeee" valign="top" align="left">
  113. <font color="#000000" size="-1" face="arial,helvetica,sanserif">String</font>
  114. </td>
  115. <td bgcolor="#eeeeee" valign="top" align="left" rowspan="10">
  116. <font color="#000000" size="-1" face="arial,helvetica,sanserif">Optional</font>
  117. </td>
  118. </tr>
  119. <!-- Attribute -->
  120. <tr>
  121. <td bgcolor="#eeeeee" valign="top" align="left">
  122. <font color="#000000" size="-1" face="arial,helvetica,sanserif">buildpath</font>
  123. </td>
  124. <td bgcolor="#eeeeee" valign="top" align="left">
  125. <font color="#000000" size="-1" face="arial,helvetica,sanserif">Set the buildpath to be used to find sub-projects.</font>
  126. </td>
  127. <td bgcolor="#eeeeee" valign="top" align="left">
  128. <font color="#000000" size="-1" face="arial,helvetica,sanserif">Path</font>
  129. </td>
  130. </tr>
  131. <!-- Attribute -->
  132. <tr>
  133. <td bgcolor="#eeeeee" valign="top" align="left">
  134. <font color="#000000" size="-1" face="arial,helvetica,sanserif">buildpathref</font>
  135. </td>
  136. <td bgcolor="#eeeeee" valign="top" align="left">
  137. <font color="#000000" size="-1" face="arial,helvetica,sanserif">Buildpath to use, by reference.</font>
  138. </td>
  139. <td bgcolor="#eeeeee" valign="top" align="left">
  140. <font color="#000000" size="-1" face="arial,helvetica,sanserif">Reference</font>
  141. </td>
  142. </tr>
  143. <!-- Attribute -->
  144. <tr>
  145. <td bgcolor="#eeeeee" valign="top" align="left">
  146. <font color="#000000" size="-1" face="arial,helvetica,sanserif">failonerror</font>
  147. </td>
  148. <td bgcolor="#eeeeee" valign="top" align="left">
  149. <font color="#000000" size="-1" face="arial,helvetica,sanserif">Sets whether to fail with a build exception on error, or go on.</font>
  150. </td>
  151. <td bgcolor="#eeeeee" valign="top" align="left">
  152. <font color="#000000" size="-1" face="arial,helvetica,sanserif">boolean</font>
  153. </td>
  154. </tr>
  155. <!-- Attribute -->
  156. <tr>
  157. <td bgcolor="#eeeeee" valign="top" align="left">
  158. <font color="#000000" size="-1" face="arial,helvetica,sanserif">genericantfile</font>
  159. </td>
  160. <td bgcolor="#eeeeee" valign="top" align="left">
  161. <font color="#000000" size="-1" face="arial,helvetica,sanserif">Build file path, to use in conjunction with directories.<br> Use <code>genericantfile</code>, in order to run the same build file with different basedirs.<br> If this attribute is set, <code>antfile</code> is ignored.</font>
  162. </td>
  163. <td bgcolor="#eeeeee" valign="top" align="left">
  164. <font color="#000000" size="-1" face="arial,helvetica,sanserif">File</font>
  165. </td>
  166. </tr>
  167. <!-- Attribute -->
  168. <tr>
  169. <td bgcolor="#eeeeee" valign="top" align="left">
  170. <font color="#000000" size="-1" face="arial,helvetica,sanserif">inheritall</font>
  171. </td>
  172. <td bgcolor="#eeeeee" valign="top" align="left">
  173. <font color="#000000" size="-1"
  174. face="arial,helvetica,sanserif">Corresponds to
  175. <code>&lt;ant&gt;</code>'s
  176. <code>inheritall</code> attribute but defaults
  177. to false in this task..</font>
  178. </td>
  179. <td bgcolor="#eeeeee" valign="top" align="left">
  180. <font color="#000000" size="-1" face="arial,helvetica,sanserif">boolean</font>
  181. </td>
  182. </tr>
  183. <!-- Attribute -->
  184. <tr>
  185. <td bgcolor="#eeeeee" valign="top" align="left">
  186. <font color="#000000" size="-1" face="arial,helvetica,sanserif">inheritrefs</font>
  187. </td>
  188. <td bgcolor="#eeeeee" valign="top" align="left">
  189. <font color="#000000" size="-1" face="arial,helvetica,sanserif">Corresponds to <code>&lt;ant&gt;</code>'s <code>inheritrefs</code> attribute.</font>
  190. </td>
  191. <td bgcolor="#eeeeee" valign="top" align="left">
  192. <font color="#000000" size="-1" face="arial,helvetica,sanserif">boolean</font>
  193. </td>
  194. </tr>
  195. <!-- Attribute -->
  196. <tr>
  197. <td bgcolor="#eeeeee" valign="top" align="left">
  198. <font color="#000000" size="-1" face="arial,helvetica,sanserif">output</font>
  199. </td>
  200. <td bgcolor="#eeeeee" valign="top" align="left">
  201. <font color="#000000" size="-1" face="arial,helvetica,sanserif">Corresponds to <code>&lt;ant&gt;</code>'s <code>output</code> attribute.</font>
  202. </td>
  203. <td bgcolor="#eeeeee" valign="top" align="left">
  204. <font color="#000000" size="-1" face="arial,helvetica,sanserif">String</font>
  205. </td>
  206. </tr>
  207. <!-- Attribute -->
  208. <tr>
  209. <td bgcolor="#eeeeee" valign="top" align="left">
  210. <font color="#000000" size="-1" face="arial,helvetica,sanserif">target</font>
  211. </td>
  212. <td bgcolor="#eeeeee" valign="top" align="left">
  213. <font color="#000000" size="-1" face="arial,helvetica,sanserif"></font>
  214. </td>
  215. <td bgcolor="#eeeeee" valign="top" align="left">
  216. <font color="#000000" size="-1" face="arial,helvetica,sanserif">String</font>
  217. </td>
  218. </tr>
  219. <!-- Attribute -->
  220. <tr>
  221. <td bgcolor="#eeeeee" valign="top" align="left">
  222. <font color="#000000" size="-1" face="arial,helvetica,sanserif">verbose</font>
  223. </td>
  224. <td bgcolor="#eeeeee" valign="top" align="left">
  225. <font color="#000000" size="-1" face="arial,helvetica,sanserif">
  226. Enable/ disable log messages showing when each sub-build path is entered/ exited.
  227. The default value is false.</font>
  228. </td>
  229. <td bgcolor="#eeeeee" valign="top" align="left">
  230. <font color="#000000" size="-1" face="arial,helvetica,sanserif">boolean</font>
  231. </td>
  232. </tr>
  233. </table>
  234. </blockquote></td></tr>
  235. </table>
  236. <!-- End Attributes -->
  237. <!-- Start Elements -->
  238. <table border="0" cellspacing="0" cellpadding="2" width="100%">
  239. <tr><td>&nbsp;</td></tr>
  240. <tr><td bgcolor="#525D76">
  241. <font color="#ffffff" face="arial,helvetica.sanserif">
  242. <a name="elements">
  243. <strong>Parameters as nested elements</strong></a></font>
  244. </td></tr>
  245. <tr><td><blockquote>
  246. <!-- Start Element -->
  247. <table border="0" cellspacing="0" cellpadding="2" width="100%">
  248. <tr><td>&nbsp;</td></tr>
  249. <tr><td bgcolor="#828DA6">
  250. <font color="#ffffff" face="arial,helvetica.sanserif" size="-1">
  251. <strong>any filesystem based <a href="../CoreTypes/resources.html#collection">resource collection</a></strong></font>
  252. </td></tr>
  253. <tr><td><blockquote>
  254. This includes <code>&lt;fileset&gt;</code>,
  255. <code>&lt;dirset&gt;</code> and <code>&lt;filelist&gt;</code>
  256. which are the nested resource collections supported prior
  257. to Ant 1.7.
  258. <!-- Ignore -->
  259. <!-- Ignore -->
  260. </blockquote></td></tr>
  261. </table>
  262. <!-- End Element -->
  263. <!-- Start Element -->
  264. <table border="0" cellspacing="0" cellpadding="2" width="100%">
  265. <tr><td>&nbsp;</td></tr>
  266. <tr><td bgcolor="#828DA6">
  267. <font color="#ffffff" face="arial,helvetica.sanserif" size="-1">
  268. <strong>dirset</strong> (org.apache.tools.ant.types.DirSet)</font>
  269. </td></tr>
  270. <tr><td><blockquote>
  271. Adds a directory set to the implicit build path. <p> <em>Note that the directories will be added to the build path in no particular order, so if order is significant, one should use a file list instead!</em>
  272. <!-- Ignore -->
  273. <!-- Ignore -->
  274. </blockquote></td></tr>
  275. </table>
  276. <!-- End Element -->
  277. <!-- Start Element -->
  278. <table border="0" cellspacing="0" cellpadding="2" width="100%">
  279. <tr><td>&nbsp;</td></tr>
  280. <tr><td bgcolor="#828DA6">
  281. <font color="#ffffff" face="arial,helvetica.sanserif" size="-1">
  282. <strong>filelist</strong> (org.apache.tools.ant.types.FileList)</font>
  283. </td></tr>
  284. <tr><td><blockquote>
  285. Adds an ordered file list to the implicit build path. <p> <em>Note that contrary to file and directory sets, file lists can reference non-existent files or directories!</em>
  286. <!-- Ignore -->
  287. <!-- Ignore -->
  288. </blockquote></td></tr>
  289. </table>
  290. <!-- End Element -->
  291. <!-- Start Element -->
  292. <table border="0" cellspacing="0" cellpadding="2" width="100%">
  293. <tr><td>&nbsp;</td></tr>
  294. <tr><td bgcolor="#828DA6">
  295. <font color="#ffffff" face="arial,helvetica.sanserif" size="-1">
  296. <strong>fileset</strong> (org.apache.tools.ant.types.FileSet)</font>
  297. </td></tr>
  298. <tr><td><blockquote>
  299. Adds a file set to the implicit build path. <p> <em>Note that the directories will be added to the build path in no particular order, so if order is significant, one should use a file list instead!</em>
  300. <!-- Ignore -->
  301. <!-- Ignore -->
  302. </blockquote></td></tr>
  303. </table>
  304. <!-- End Element -->
  305. <!-- Start Element -->
  306. <table border="0" cellspacing="0" cellpadding="2" width="100%">
  307. <tr><td>&nbsp;</td></tr>
  308. <tr><td bgcolor="#828DA6">
  309. <font color="#ffffff" face="arial,helvetica.sanserif" size="-1">
  310. <strong>property</strong> (org.apache.tools.ant.taskdefs.Property)</font>
  311. </td></tr>
  312. <tr><td><blockquote>
  313. Corresponds to <code>&lt;ant&gt;</code>'s nested <code>&lt;property&gt;</code> element.
  314. <!-- Ignore -->
  315. <!-- Ignore -->
  316. </blockquote></td></tr>
  317. </table>
  318. <!-- End Element -->
  319. <!-- Start Element -->
  320. <table border="0" cellspacing="0" cellpadding="2" width="100%">
  321. <tr><td>&nbsp;</td></tr>
  322. <tr><td bgcolor="#828DA6">
  323. <font color="#ffffff" face="arial,helvetica.sanserif" size="-1">
  324. <strong>propertyset</strong> (org.apache.tools.ant.types.PropertySet)</font>
  325. </td></tr>
  326. <tr><td><blockquote>
  327. Corresponds to <code>&lt;ant&gt;</code>'s nested <code>&lt;propertyset&gt;</code> element.
  328. <!-- Ignore -->
  329. <!-- Ignore -->
  330. </blockquote></td></tr>
  331. </table>
  332. <!-- End Element -->
  333. <!-- Start Element -->
  334. <table border="0" cellspacing="0" cellpadding="2" width="100%">
  335. <tr><td>&nbsp;</td></tr>
  336. <tr><td bgcolor="#828DA6">
  337. <font color="#ffffff" face="arial,helvetica.sanserif" size="-1">
  338. <strong>buildpath</strong> (org.apache.tools.ant.types.Path)</font>
  339. </td></tr>
  340. <tr><td><blockquote>
  341. Creates a nested build path, and add it to the implicit build path.
  342. <!-- Ignore -->
  343. <!-- Ignore -->
  344. </blockquote></td></tr>
  345. </table>
  346. <!-- End Element -->
  347. <!-- Start Element -->
  348. <table border="0" cellspacing="0" cellpadding="2" width="100%">
  349. <tr><td>&nbsp;</td></tr>
  350. <tr><td bgcolor="#828DA6">
  351. <font color="#ffffff" face="arial,helvetica.sanserif" size="-1">
  352. <strong>buildpathelement</strong> (org.apache.tools.ant.types.Path.PathElement)</font>
  353. </td></tr>
  354. <tr><td><blockquote>
  355. Creates a nested <code>&lt;buildpathelement&gt;</code>, and add it to the implicit build path.
  356. <!-- Ignore -->
  357. <!-- Ignore -->
  358. </blockquote></td></tr>
  359. </table>
  360. <!-- End Element -->
  361. <!-- manually written -->
  362. <!-- Start Element -->
  363. <table border="0" cellspacing="0" cellpadding="2" width="100%">
  364. <tr><td>&nbsp;</td></tr>
  365. <tr><td bgcolor="#828DA6">
  366. <font color="#ffffff" face="arial,helvetica.sanserif" size="-1">
  367. <strong>target</strong> (org.apache.tools.ant.taskdefs.Ant.TargetElement)</font>
  368. </td></tr>
  369. <tr><td><blockquote>
  370. You can specify multiple targets using nested <code>&lt;target&gt;</code> elements
  371. instead of using the target attribute. These will be executed as if
  372. Ant had been invoked with a single target whose dependencies are the
  373. targets so specified, in the order specified.
  374. <!-- Ignore -->
  375. <!-- Ignore -->
  376. <table border="1" cellpadding="2" cellspacing="0">
  377. <tr>
  378. <td valign="top"><b>Attribute</b></td>
  379. <td valign="top"><b>Description</b></td>
  380. <td align="center" valign="top"><b>Required</b></td>
  381. </tr>
  382. <tr>
  383. <td valign="top">name</td>
  384. <td valign="top">The name of the called target.</td>
  385. <td valign="top" align="center">Yes</td>
  386. </tr>
  387. </table>
  388. <p><em>since Ant 1.7</em>.</p>
  389. </blockquote></td></tr>
  390. </table>
  391. <!-- End Element -->
  392. <!-- manually written end -->
  393. </blockquote></td></tr>
  394. </table>
  395. <!-- End Elements -->
  396. <table border="0" cellspacing="0" cellpadding="2" width="100%">
  397. <tr><td>&nbsp;</td></tr>
  398. <tr><td bgcolor="#525D76">
  399. <font color="#ffffff" face="arial,helvetica.sanserif">
  400. <a name="examples">
  401. <strong>Examples</strong></a></font>
  402. </td></tr>
  403. <tr><td><blockquote>
  404. <pre>
  405. &lt;project name="subant" default="subant1"&gt;
  406. &lt;property name="build.dir" value="subant.build"/&gt;
  407. &lt;target name="subant1"&gt;
  408. &lt;subant target=""&gt;
  409. &lt;property name="build.dir" value="subant1.build"/&gt;
  410. &lt;property name="not.overloaded" value="not.overloaded"/&gt;
  411. &lt;fileset dir="." includes="*/build.xml"/&gt;
  412. &lt;/subant&gt;
  413. &lt;/target&gt;
  414. &lt;/project&gt;
  415. </pre>
  416. <p>
  417. this snippet build file will run ant in each subdirectory of the project directory,
  418. where a file called build.xml can be found.
  419. The property build.dir will have the value subant1.build in the ant projects called by subant.
  420. </p>
  421. <pre>
  422. &lt;subant target=""&gt;
  423. &lt;propertyset&gt;
  424. &lt;propertyref prefix="toplevel"/&gt;
  425. &lt;mapper type="glob" from="foo*" to="bar*"/&gt;
  426. &lt;/propertyset&gt;
  427. &lt;fileset dir="." includes="*/build.xml"/&gt;
  428. &lt;/subant&gt;
  429. </pre>
  430. <p>
  431. this snippet build file will run ant in each subdirectory of the project directory,
  432. where a file called build.xml can be found.
  433. All properties whose name starts with "foo" are passed, their names are changed to start with "bar" instead
  434. </p>
  435. <pre>
  436. &lt;subant target="compile" genericantfile="/opt/project/build1.xml"&gt;
  437. &lt;dirset dir="." includes="projects*"/&gt;
  438. &lt;/subant&gt;
  439. </pre>
  440. <p>
  441. assuming the subdirs of the project dir are called projects1, projects2, projects3
  442. this snippet will execute the compile target of /opt/project/build1.xml,
  443. setting the basedir to projects1, projects2, projects3
  444. </p>
  445. <!-- manually written -->
  446. <p>Now a little more complex - but useful - scenario. Assume that we have
  447. a directory structure like this:</p>
  448. <pre>
  449. root
  450. | common.xml
  451. | build.xml
  452. |
  453. +-- modules
  454. +-- modA
  455. | +-- src
  456. +-- modB
  457. +-- src
  458. <u><b>common.xml:</b></u><br>
  459. &lt;project&gt;
  460. &lt;property name="src.dir" value="src"/&gt;
  461. &lt;property name="build.dir" value="build"/&gt;
  462. &lt;property name="classes.dir" value="${build.dir}/classes"/&gt;
  463. &lt;target name="compile"&gt;
  464. &lt;mkdir dir="${classes.dir}"/&gt;
  465. &lt;javac srcdir="${src.dir}" destdir="${classes.dir}"/&gt;
  466. &lt;/target&gt;
  467. &lt;!-- more targets --&gt;
  468. &lt;/project&gt;
  469. <u><b>build.xml:</b></u><br>
  470. &lt;project&gt;
  471. &lt;macrodef name="iterate"&gt;
  472. &lt;attribute name="target"/&gt;
  473. &lt;sequential&gt;
  474. &lt;subant target="@{target}"&gt;
  475. &lt;fileset dir="modules" includes="*/build.xml"/&gt;
  476. &lt;/subant&gt;
  477. &lt;/sequential&gt;
  478. &lt;/macrodef&gt;
  479. &lt;target name="compile"&gt;
  480. &lt;iterate target="compile"/&gt;
  481. &lt;/target&gt;
  482. &lt;!-- more targets --&gt;
  483. &lt;/project&gt;
  484. <u><b>modules/modA/build.xml:</b></u><br>
  485. &lt;project name="modA"&gt;
  486. &lt;import file="../../common.xml"/&gt;
  487. &lt;/project&gt;
  488. </pre>
  489. <p>This results in very small buildfiles in the modules, maintainable
  490. buildfile (common.xml) and a clear project structure. Additionally
  491. the root buildfile is capable to run the whole build over all
  492. modules.
  493. </p>
  494. <pre>
  495. &lt;subant failonerror="false"&gt;
  496. &lt;fileset dir="." includes="**/build.xml" excludes="build.xml"/&gt;
  497. &lt;target name="clean"/&gt;
  498. &lt;target name="build"/&gt;
  499. &lt;/subant&gt;
  500. </pre>
  501. <p>Does a "clean build" for each subproject.</p>
  502. <!-- manually written -->
  503. </blockquote></td></tr>
  504. </table>
  505. </td>
  506. </tr>
  507. <!-- END RIGHT SIDE MAIN BODY -->
  508. <!-- FOOTER SEPARATOR -->
  509. <tr>
  510. <td>
  511. <hr noshade="" size="1">
  512. </td>
  513. </tr>
  514. <!-- PAGE FOOTER -->
  515. <tr>
  516. <td>
  517. <div align="center"><font color="#525D76" size="-1"><em>
  518. Copyright &copy; 2000-2006, The Apache Software Foundation. All Rights Reserved.
  519. </em></font></div>
  520. </td>
  521. </tr>
  522. </table>
  523. </body>
  524. </html>