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.

goals.html 43 kB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867
  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="">
  9. <title>Mutant Proposal - Mutant Goals</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>Mutant Proposal</strong></p>
  28. <ul>
  29. <li> <a href="./index.html">Introduction</a>
  30. </li>
  31. <li> <a href="./goals.html">Design Goals</a>
  32. </li>
  33. <li> <a href="./features.html">User Features</a>
  34. </li>
  35. <li> <a href="./developers.html">Task Developers</a>
  36. </li>
  37. <li> <a href="./design.html">Design Description</a>
  38. </li>
  39. </ul>
  40. </td>
  41. <td align="left" valign="top">
  42. <table border="0" cellspacing="0" cellpadding="2" width="100%">
  43. <tr><td bgcolor="#525D76">
  44. <font color="#ffffff" face="arial,helvetica,sanserif">
  45. <a name="Goals"><strong>Goals</strong></a>
  46. </font>
  47. </td></tr>
  48. <tr><td>
  49. <blockquote>
  50. <p>
  51. This page describes the key goals that have shaped the development of
  52. Mutant.
  53. </p>
  54. <p>
  55. The first section identifies a set of issues with Ant1 that have cropped up as
  56. Ant1 has evolved. The design implications of each issue are then summarized as a
  57. Mutant requirement. I do not want to suggest that these problems are unsolvable
  58. within the Ant1 design. Already I believe we have seen the Ant2 proposals
  59. influencing people trying to extend Ant1. These issues may be solvable, although at
  60. the risk of backward compatability impacts or further complication of the Ant1
  61. codebase.
  62. </p>
  63. <p>
  64. The second section covers a set of additional requirements that have emerged as
  65. the whole concept of Ant2 has developed. Many of these came from the discussions
  66. on the Ant-Dev mailing list.
  67. </p>
  68. <p>
  69. The realisation of these requirements as they impact a user is on the
  70. <a href="features.html">next page</a>. Th implications for task developers and
  71. Ant developers are discussed in the following sections.
  72. </p>
  73. </blockquote>
  74. </td></tr>
  75. </table>
  76. <table border="0" cellspacing="0" cellpadding="2" width="100%">
  77. <tr><td bgcolor="#525D76">
  78. <font color="#ffffff" face="arial,helvetica,sanserif">
  79. <a name="Ant1 Issues"><strong>Ant1 Issues</strong></a>
  80. </font>
  81. </td></tr>
  82. <tr><td>
  83. <blockquote>
  84. <table border="0" cellspacing="0" cellpadding="2" width="100%">
  85. <tr><td bgcolor="#828DA6">
  86. <font color="#ffffff" face="arial,helvetica,sanserif">
  87. <a name="Unrestricted core access"><strong>Unrestricted core access</strong></a>
  88. </font>
  89. </td></tr>
  90. <tr><td>
  91. <blockquote>
  92. <p>
  93. The interface between the Ant core and tasks is not controlled. It
  94. allows tasks almost complete access to the internal data structures of the
  95. core. This is poor encapsulation. Whilst most tasks do not need and do not
  96. use this access, its existence nonetheless prevents changes being made to
  97. the core without raising concerns about impacting backward compatability.
  98. </p>
  99. <p>
  100. The uncontrolled nature of the task-core interface also makes it difficult
  101. to reuse tasks and types in a different context without almost completely
  102. duplicating the Ant core
  103. </p>
  104. <div align="left">
  105. <table cellspacing="4" cellpadding="0" border="0">
  106. <tr>
  107. <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
  108. <td bgcolor="#023264" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
  109. <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
  110. </tr>
  111. <tr>
  112. <td bgcolor="#023264" width="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
  113. <td bgcolor="#ffffff">
  114. <p>
  115. A tightly defined interface between the core and the components (tasks and
  116. types) will allow the core implementation to be changed without the risk
  117. of impacting tasks. It will also allow components to be reused in other
  118. contexts.
  119. </p>
  120. </td>
  121. <td bgcolor="#023264" width="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
  122. </tr>
  123. <tr>
  124. <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
  125. <td bgcolor="#023264" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
  126. <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
  127. </tr>
  128. </table>
  129. </div>
  130. </blockquote>
  131. </td></tr>
  132. </table>
  133. <table border="0" cellspacing="0" cellpadding="2" width="100%">
  134. <tr><td bgcolor="#828DA6">
  135. <font color="#ffffff" face="arial,helvetica,sanserif">
  136. <a name="Lack of embedding support"><strong>Lack of embedding support</strong></a>
  137. </font>
  138. </td></tr>
  139. <tr><td>
  140. <blockquote>
  141. <p>
  142. Ant1 does not provide strong support for embedding Ant in other systems,
  143. particularly a GUI or IDE. The development of Antidote highlighted this
  144. difficultly. Antidote was forced to perform its own XML parsing so it could
  145. build its own model of the build. There is no communication medium for a GUI to
  146. communicate with the core. Without this capability any GUI will be limited to
  147. simply editing the XML representation of the build.
  148. </p>
  149. <div align="left">
  150. <table cellspacing="4" cellpadding="0" border="0">
  151. <tr>
  152. <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
  153. <td bgcolor="#023264" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
  154. <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
  155. </tr>
  156. <tr>
  157. <td bgcolor="#023264" width="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
  158. <td bgcolor="#ffffff">
  159. <p>
  160. The definition of a project model, a Java-based object-model of a build
  161. description would decouple Ant from the XML representation. This allows
  162. other representations to be used. Such an object model also forms the basis
  163. for communications between systems which want to embed Ant. An IDE could
  164. manipulate this project object model directly and pass to the core for
  165. processing without needing to convert to and from an external
  166. representations such as XML.
  167. </p>
  168. </td>
  169. <td bgcolor="#023264" width="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
  170. </tr>
  171. <tr>
  172. <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
  173. <td bgcolor="#023264" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
  174. <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
  175. </tr>
  176. </table>
  177. </div>
  178. </blockquote>
  179. </td></tr>
  180. </table>
  181. <table border="0" cellspacing="0" cellpadding="2" width="100%">
  182. <tr><td bgcolor="#828DA6">
  183. <font color="#ffffff" face="arial,helvetica,sanserif">
  184. <a name="Configuration done at Parse-Time"><strong>Configuration done at Parse-Time</strong></a>
  185. </font>
  186. </td></tr>
  187. <tr><td>
  188. <blockquote>
  189. <p>
  190. The original implementation of Ant1 performed all task configuration at the
  191. time the XML description of the build was parsed (parse-time). This approach
  192. could not handle dynamically created tasks very well since in some
  193. instances the type of the task to be configured was not known at parse-time.
  194. This limitation was overcome with the introduction of the UnknownElement and
  195. RuntimeConfigurable classes. While these work well, they are confusing and at
  196. times surprising to most Ant developers. Also some operations still occur at
  197. parse-time, notably creation of nested elements of known types. This could be
  198. overcome by going to a fully dynamic model but the fear of backward
  199. incompatability constrains this change from occuring.
  200. </p>
  201. <div align="left">
  202. <table cellspacing="4" cellpadding="0" border="0">
  203. <tr>
  204. <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
  205. <td bgcolor="#023264" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
  206. <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
  207. </tr>
  208. <tr>
  209. <td bgcolor="#023264" width="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
  210. <td bgcolor="#ffffff">
  211. <p>
  212. Execution-time configuration of tasks allows for the latest information to be
  213. used for configuration. It is also necessary to support the concept of the
  214. project model. The project model cannot contain execution-time information as it
  215. does in Ant1
  216. </p>
  217. <p>
  218. The decoupling of the parsing and exection phases, communicating through the
  219. medium of the project model will allow the core to be modularized. The parsing
  220. and execution phases can be separated and one replaced without impacting the
  221. other.
  222. </p>
  223. </td>
  224. <td bgcolor="#023264" width="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
  225. </tr>
  226. <tr>
  227. <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
  228. <td bgcolor="#023264" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
  229. <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
  230. </tr>
  231. </table>
  232. </div>
  233. </blockquote>
  234. </td></tr>
  235. </table>
  236. <table border="0" cellspacing="0" cellpadding="2" width="100%">
  237. <tr><td bgcolor="#828DA6">
  238. <font color="#ffffff" face="arial,helvetica,sanserif">
  239. <a name="Multiple execution"><strong>Multiple execution</strong></a>
  240. </font>
  241. </td></tr>
  242. <tr><td>
  243. <blockquote>
  244. <p>
  245. In Ant1, a task, once configured, may be used more than once - i.e. its
  246. execute method may be called more than once. This occurs when the Ant
  247. command line specifies the evaluation of two targets. If those targets have
  248. overlapping dependencies, the tasks in those overlapping dependencies will
  249. be executed twice. This arrangement requires task writers to preserve the
  250. state configured by Ant during the execution of the task so that the next
  251. execution has the correct configuration.
  252. </p>
  253. <p>
  254. Many task writers are not aware of this requirement. Frequently the task's
  255. state is changed during the execution method, which can lead to mysterious
  256. falures during subsequent executions. This need to preserve the configuration
  257. state makes writing tasks much harder.
  258. </p>
  259. <div align="left">
  260. <table cellspacing="4" cellpadding="0" border="0">
  261. <tr>
  262. <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
  263. <td bgcolor="#023264" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
  264. <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
  265. </tr>
  266. <tr>
  267. <td bgcolor="#023264" width="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
  268. <td bgcolor="#ffffff">
  269. <p>
  270. Once a task is configured, it should be executed once. If the execution of
  271. multiple targets is required, a new task instance should be created and
  272. configured from the same project model. If reuse of task instances is desired
  273. each instance must be reinitialized and reconfigured before use.
  274. </p>
  275. </td>
  276. <td bgcolor="#023264" width="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
  277. </tr>
  278. <tr>
  279. <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
  280. <td bgcolor="#023264" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
  281. <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
  282. </tr>
  283. </table>
  284. </div>
  285. </blockquote>
  286. </td></tr>
  287. </table>
  288. <table border="0" cellspacing="0" cellpadding="2" width="100%">
  289. <tr><td bgcolor="#828DA6">
  290. <font color="#ffffff" face="arial,helvetica,sanserif">
  291. <a name="No automatic deployment of tasks"><strong>No automatic deployment of tasks</strong></a>
  292. </font>
  293. </td></tr>
  294. <tr><td>
  295. <blockquote>
  296. <p>
  297. Ant1 has a set of well-known tasks (and types). A well-known task is one
  298. for which a mapping between the taskname and its implementing class is
  299. predefined in Ant. This mapping is provided by the two defaults.properties
  300. files in Ant's code. These well-known tasks do not need to be taskdef'd to
  301. make them available in a build file. Conversely tasks which are not in this
  302. list need to be explicitly taskdef'd.
  303. </p>
  304. <p>
  305. Note that this distinction is not the same as the core/optional
  306. distinction found in Ant1. An Ant1 core task is notionally supported by Ant
  307. without requiring any additional external libraries - it just requires the
  308. classes available in the 1.1 JDK, in Ant and in the libraries Ant uses such
  309. as the XML parser. An optional task is a task which requires JDK 1.2+
  310. features or the support of an external library, such as jakarta-regexp.
  311. </p>
  312. <p>
  313. The problem with this system is that there is no namespace management. If a
  314. new task is added to Ant, it may invalidate buildfiles which are already
  315. using that taskname via a taskdef. Actually the taskdef may continue to work or
  316. it may not - it will depend on the nested elements that the task definitions
  317. support (see above discussion of regarding cofiguration at parse-time)
  318. </p>
  319. <div align="left">
  320. <table cellspacing="4" cellpadding="0" border="0">
  321. <tr>
  322. <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
  323. <td bgcolor="#023264" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
  324. <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
  325. </tr>
  326. <tr>
  327. <td bgcolor="#023264" width="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
  328. <td bgcolor="#ffffff">
  329. <p>
  330. Tasks need to be deployed in libraries by either placing them in well known
  331. directories of an Ant install or by telling Ant where to look for them. Removing
  332. the central management of defined task names allows tasks libraries to be
  333. developed and maintained independently of Ant much more easily.
  334. </p>
  335. <p>
  336. Once centralised management of the task namespace is removed, there is,
  337. however, the possibility of name collision. A mechanism is required to allow a
  338. build file writer to select which particular tasks are assigned to which
  339. tasknames.
  340. </p>
  341. </td>
  342. <td bgcolor="#023264" width="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
  343. </tr>
  344. <tr>
  345. <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
  346. <td bgcolor="#023264" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
  347. <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
  348. </tr>
  349. </table>
  350. </div>
  351. </blockquote>
  352. </td></tr>
  353. </table>
  354. <table border="0" cellspacing="0" cellpadding="2" width="100%">
  355. <tr><td bgcolor="#828DA6">
  356. <font color="#ffffff" face="arial,helvetica,sanserif">
  357. <a name="Top level tasks"><strong>Top level tasks</strong></a>
  358. </font>
  359. </td></tr>
  360. <tr><td>
  361. <blockquote>
  362. <p>
  363. In Ant1 certain tasks may appear outside of any target. This is implemented as a
  364. set of hardcoded conditions in the XML parsing phase. The execution and
  365. configuration of these tasks does not involve the use of RuntimeConfigurable and
  366. UnknownElement.
  367. </p>
  368. <p>
  369. This hardcoding is not very inituitive. It is confusing to users who do not
  370. know why only some tasks may be run outside of a target. Also as the list of
  371. tasks that may be useful as a top-level task grows, further special cases must
  372. be added to the code making the code harder to maintain.
  373. </p>
  374. <div align="left">
  375. <table cellspacing="4" cellpadding="0" border="0">
  376. <tr>
  377. <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
  378. <td bgcolor="#023264" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
  379. <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
  380. </tr>
  381. <tr>
  382. <td bgcolor="#023264" width="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
  383. <td bgcolor="#ffffff">
  384. <p>
  385. The number of special names should be kept to a minimum. Special cases should
  386. be avoided as they are not inituitive.
  387. </p>
  388. </td>
  389. <td bgcolor="#023264" width="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
  390. </tr>
  391. <tr>
  392. <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
  393. <td bgcolor="#023264" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
  394. <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
  395. </tr>
  396. </table>
  397. </div>
  398. </blockquote>
  399. </td></tr>
  400. </table>
  401. <table border="0" cellspacing="0" cellpadding="2" width="100%">
  402. <tr><td bgcolor="#828DA6">
  403. <font color="#ffffff" face="arial,helvetica,sanserif">
  404. <a name="Build file inclusion is cumbersome"><strong>Build file inclusion is cumbersome</strong></a>
  405. </font>
  406. </td></tr>
  407. <tr><td>
  408. <blockquote>
  409. <p>
  410. In Ant1, the inclusion of a set of build file definitions or targets is achieved
  411. through the use of XML entities. This is just cumbersome.
  412. </p>
  413. <div align="left">
  414. <table cellspacing="4" cellpadding="0" border="0">
  415. <tr>
  416. <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
  417. <td bgcolor="#023264" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
  418. <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
  419. </tr>
  420. <tr>
  421. <td bgcolor="#023264" width="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
  422. <td bgcolor="#ffffff">
  423. <p>
  424. A simplified include mechanism is required to replace the entity based
  425. inclusion of Ant1.
  426. </p>
  427. </td>
  428. <td bgcolor="#023264" width="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
  429. </tr>
  430. <tr>
  431. <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
  432. <td bgcolor="#023264" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
  433. <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
  434. </tr>
  435. </table>
  436. </div>
  437. </blockquote>
  438. </td></tr>
  439. </table>
  440. <table border="0" cellspacing="0" cellpadding="2" width="100%">
  441. <tr><td bgcolor="#828DA6">
  442. <font color="#ffffff" face="arial,helvetica,sanserif">
  443. <a name="Classpath management"><strong>Classpath management</strong></a>
  444. </font>
  445. </td></tr>
  446. <tr><td>
  447. <blockquote>
  448. <p>
  449. Probably the greatest issue facing Ant1 today involves the management of the
  450. classpath and the associated visibility of classes. Most optional tasks in Ant1
  451. require the supporting classes for the task to be available on the system
  452. classpath. For example, the JUnit task is only usable if the JUnit jar is on
  453. the classpath. If it is not, Ant will complain about being unable to create the
  454. junit task.
  455. </p>
  456. <p>
  457. The usual solution when a user runs into this problem is to put the required jar
  458. into the ANT_HOME/lib directory. This just adds the required jar to the system
  459. classpath prior to starting Ant albeit without requiring the user to explicitly
  460. set the classpath.
  461. </p>
  462. <p>
  463. There are a number of issues with this approach. The classes on the
  464. classpath share the same classloader as Ant's classes and Ant's support
  465. libraries - particularly the XML parser. If a task wishes to use a specific XML
  466. parser, it may conflict with Ant's own parser. If two tasks require different
  467. versions of a supporting jar, these will conflict.
  468. </p>
  469. <p>
  470. Many tasks make use of factory objects (dynamic class instantiation, dynamic
  471. resource loading, etc). When the factory is in the system classpath it will not
  472. be able to load resources available in a taskdef'd task's custom classpath due
  473. to the delegating nature of classloaders. Such errors can be very confusing to
  474. users. More recent code is likely to attempt use of a context classloader but
  475. this is not set by Ant1 currently.
  476. </p>
  477. <div align="left">
  478. <table cellspacing="4" cellpadding="0" border="0">
  479. <tr>
  480. <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
  481. <td bgcolor="#023264" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
  482. <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
  483. </tr>
  484. <tr>
  485. <td bgcolor="#023264" width="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
  486. <td bgcolor="#ffffff">
  487. <p>
  488. Do not require jars to be added to ANT_HOME/lib to enable tasks. Allow users to
  489. specify the location of support jars on a per-library basis.
  490. </p>
  491. </td>
  492. <td bgcolor="#023264" width="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
  493. </tr>
  494. <tr>
  495. <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
  496. <td bgcolor="#023264" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
  497. <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
  498. </tr>
  499. </table>
  500. </div>
  501. </blockquote>
  502. </td></tr>
  503. </table>
  504. <table border="0" cellspacing="0" cellpadding="2" width="100%">
  505. <tr><td bgcolor="#828DA6">
  506. <font color="#ffffff" face="arial,helvetica,sanserif">
  507. <a name="Extensibility"><strong>Extensibility</strong></a>
  508. </font>
  509. </td></tr>
  510. <tr><td>
  511. <blockquote>
  512. <p>
  513. The earliest versions Ant1 did not explicitly support any datatypes. The only
  514. datatype, property, was actually created as a side-effect of running the
  515. <code>&lt;property&gt;</code> task. If it were to be implemented today, property
  516. would probably be known as a string datatype, perhaps associated with a
  517. <code>&lt;load-properties&gt;</code> task. This is also the reason property
  518. is one of those tasks which is allowed to exist outside of a target.
  519. </p>
  520. <p> As Ant1 evolved new types such as <code>&lt;path&gt;</code> and
  521. <code>&lt;fileset&gt;</code> were added. The concept of datatypes has continued
  522. to evolve to the point where users can now define new datatypes. It would be
  523. expected that in addition to new types there will be many sub-types created,
  524. such as new types of fileset. Ant1, however, does not strongly support such type
  525. extensibility. When a subtype is created by extending an existing type, Ant1
  526. requires it to be either used by reference or all tasks which accept the base
  527. type need to be modified to support the new type. Use by reference is not always
  528. possible. It will depend on whether the base type has been coded to support
  529. references. </p>
  530. <div align="left">
  531. <table cellspacing="4" cellpadding="0" border="0">
  532. <tr>
  533. <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
  534. <td bgcolor="#023264" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
  535. <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
  536. </tr>
  537. <tr>
  538. <td bgcolor="#023264" width="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
  539. <td bgcolor="#ffffff">
  540. <p>
  541. Support polymorphic behaviour, allowing a build file to pass a subtype to a
  542. task which is defined to accept the base type. Allow task interfaces to be
  543. defined in terms of interfaces.
  544. </p>
  545. <p>
  546. Move reference processing to the core to make it more regular removing the
  547. burden of type developers to explicitly support references.
  548. </p>
  549. </td>
  550. <td bgcolor="#023264" width="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
  551. </tr>
  552. <tr>
  553. <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
  554. <td bgcolor="#023264" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
  555. <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
  556. </tr>
  557. </table>
  558. </div>
  559. </blockquote>
  560. </td></tr>
  561. </table>
  562. <table border="0" cellspacing="0" cellpadding="2" width="100%">
  563. <tr><td bgcolor="#828DA6">
  564. <font color="#ffffff" face="arial,helvetica,sanserif">
  565. <a name="Project object does too much"><strong>Project object does too much</strong></a>
  566. </font>
  567. </td></tr>
  568. <tr><td>
  569. <blockquote>
  570. <p>
  571. In Ant1 the Project object takes on too many roles including all of the
  572. following:
  573. </p>
  574. <ul>
  575. <li>Holds the project model built when parsing the build file</li>
  576. <li>Holds the run-time state of the build through the properties and current
  577. task definitions</li>
  578. <li>Provides context for task execution. All tasks have a reference to their
  579. project instance and use it to access core functions</li>
  580. <li>Provides the implementation of common task operations</li>
  581. <li>Build event management</li>
  582. <li>Message logging</li>
  583. <li>Global filter definitions</li>
  584. <li>Java Version</li>
  585. <li>Property replacement</li>
  586. <li>Message Levels</li>
  587. <li>Utility functions such as boolean conversion and path translation</li>
  588. <li>Integration point for embedding Ant</li>
  589. </ul>
  590. <p> As a class, Project is not cohesive. Reuse of the Ant core functionality is
  591. difficulty as all of these concerns bring in many other support classes.
  592. </p>
  593. <div align="left">
  594. <table cellspacing="4" cellpadding="0" border="0">
  595. <tr>
  596. <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
  597. <td bgcolor="#023264" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
  598. <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
  599. </tr>
  600. <tr>
  601. <td bgcolor="#023264" width="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
  602. <td bgcolor="#ffffff">
  603. <p>
  604. Separate the various roles of Project into more cohesive classes.
  605. </p>
  606. </td>
  607. <td bgcolor="#023264" width="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
  608. </tr>
  609. <tr>
  610. <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
  611. <td bgcolor="#023264" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
  612. <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
  613. </tr>
  614. </table>
  615. </div>
  616. </blockquote>
  617. </td></tr>
  618. </table>
  619. </blockquote>
  620. </td></tr>
  621. </table>
  622. <table border="0" cellspacing="0" cellpadding="2" width="100%">
  623. <tr><td bgcolor="#525D76">
  624. <font color="#ffffff" face="arial,helvetica,sanserif">
  625. <a name="Other Goals"><strong>Other Goals</strong></a>
  626. </font>
  627. </td></tr>
  628. <tr><td>
  629. <blockquote>
  630. <p>
  631. In addition to the issues which arise from Ant1 limitations, there are a number
  632. of requirements which have emerged in the mailing list discussions about Ant2.
  633. This isn't a complete list - just the ones I picked up for Mutant.
  634. </p>
  635. <table border="0" cellspacing="0" cellpadding="2" width="100%">
  636. <tr><td bgcolor="#828DA6">
  637. <font color="#ffffff" face="arial,helvetica,sanserif">
  638. <a name="Limited project reuse"><strong>Limited project reuse</strong></a>
  639. </font>
  640. </td></tr>
  641. <tr><td>
  642. <blockquote>
  643. <p> In Ant1 the only way to reuse build file definitions is to use the
  644. <code>&lt;ant&gt;</code> task. While useful, it is relatively coarse-grained. It
  645. can also be tedious if you are trying to extend an existing project definition -
  646. that is, adding new targets while retaining a user's ability to access the
  647. existing targets. </p>
  648. <p>
  649. In addition to the extension of projects, it should be possible to compose
  650. projects creating dependencies between the targets of the different projects,
  651. and to access the data and definitions of one project by a controlling project
  652. </p>
  653. <div align="left">
  654. <table cellspacing="4" cellpadding="0" border="0">
  655. <tr>
  656. <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
  657. <td bgcolor="#023264" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
  658. <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
  659. </tr>
  660. <tr>
  661. <td bgcolor="#023264" width="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
  662. <td bgcolor="#ffffff">
  663. <p>
  664. Allow a project to extend and control other projects
  665. </p>
  666. </td>
  667. <td bgcolor="#023264" width="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
  668. </tr>
  669. <tr>
  670. <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
  671. <td bgcolor="#023264" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
  672. <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
  673. </tr>
  674. </table>
  675. </div>
  676. </blockquote>
  677. </td></tr>
  678. </table>
  679. <table border="0" cellspacing="0" cellpadding="2" width="100%">
  680. <tr><td bgcolor="#828DA6">
  681. <font color="#ffffff" face="arial,helvetica,sanserif">
  682. <a name="Ant1 Compatibility - Zero Friction"><strong>Ant1 Compatibility - Zero Friction</strong></a>
  683. </font>
  684. </td></tr>
  685. <tr><td>
  686. <blockquote>
  687. <p>
  688. While it has always been accepted that there will be come backward compatibility
  689. breaks in moving from Ant1 to Ant2, these should be minimized. If the changeover
  690. from Ant1 to Ant2 is difficult, it may never happen. On the other hand, the
  691. openness of the Ant1 interface means that some tasks will not work as expected -
  692. the most difficult being the <code>&lt;script&gt;</code> task.
  693. </p>
  694. <div align="left">
  695. <table cellspacing="4" cellpadding="0" border="0">
  696. <tr>
  697. <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
  698. <td bgcolor="#023264" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
  699. <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
  700. </tr>
  701. <tr>
  702. <td bgcolor="#023264" width="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
  703. <td bgcolor="#ffffff">
  704. <p>
  705. Achieve a practical level of compatability without degrading the integrity of
  706. the core's interfaces. A practical level of compatability is intentionally a
  707. vague measure but it would require the majority of projects in Gump to be built
  708. without noticeable differences from Ant1
  709. </p>
  710. </td>
  711. <td bgcolor="#023264" width="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
  712. </tr>
  713. <tr>
  714. <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
  715. <td bgcolor="#023264" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
  716. <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
  717. </tr>
  718. </table>
  719. </div>
  720. </blockquote>
  721. </td></tr>
  722. </table>
  723. <table border="0" cellspacing="0" cellpadding="2" width="100%">
  724. <tr><td bgcolor="#828DA6">
  725. <font color="#ffffff" face="arial,helvetica,sanserif">
  726. <a name="XML Configuration"><strong>XML Configuration</strong></a>
  727. </font>
  728. </td></tr>
  729. <tr><td>
  730. <blockquote>
  731. <p>
  732. In Ant1 configuration of Ant is achieved either through the execution of OS
  733. dependent scripts by the launcher scripts or though properties files which have
  734. the limited capability to set properties.
  735. </p>
  736. <div align="left">
  737. <table cellspacing="4" cellpadding="0" border="0">
  738. <tr>
  739. <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
  740. <td bgcolor="#023264" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
  741. <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
  742. </tr>
  743. <tr>
  744. <td bgcolor="#023264" width="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
  745. <td bgcolor="#ffffff">
  746. <p>
  747. Provide an XML based configuration system with rich capabilities to configure
  748. the operation of Ant.
  749. </p>
  750. </td>
  751. <td bgcolor="#023264" width="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
  752. </tr>
  753. <tr>
  754. <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
  755. <td bgcolor="#023264" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
  756. <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
  757. </tr>
  758. </table>
  759. </div>
  760. </blockquote>
  761. </td></tr>
  762. </table>
  763. <table border="0" cellspacing="0" cellpadding="2" width="100%">
  764. <tr><td bgcolor="#828DA6">
  765. <font color="#ffffff" face="arial,helvetica,sanserif">
  766. <a name="Aspects"><strong>Aspects</strong></a>
  767. </font>
  768. </td></tr>
  769. <tr><td>
  770. <blockquote>
  771. <p>
  772. In Ant1 there are many things which are common to a group of tasks but adding
  773. the capability to each task is repetitive and tedious. An example would be the
  774. failonerror attribute which controls whether a task will cause the build to stop
  775. when it fails. This started on just one task but has since been added to many
  776. other tasks as users want more fine control over when their builds stop. Aspects
  777. have been discussed as a mechanism for providing a single implementation of a
  778. concept or control that can then be applied to tasks independently.
  779. </p>
  780. <div align="left">
  781. <table cellspacing="4" cellpadding="0" border="0">
  782. <tr>
  783. <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
  784. <td bgcolor="#023264" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
  785. <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
  786. </tr>
  787. <tr>
  788. <td bgcolor="#023264" width="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
  789. <td bgcolor="#ffffff">
  790. <p>
  791. Investigate the use of an Aspect approach to provide common functionality
  792. across tasks with a single implementation
  793. </p>
  794. </td>
  795. <td bgcolor="#023264" width="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
  796. </tr>
  797. <tr>
  798. <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
  799. <td bgcolor="#023264" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
  800. <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
  801. </tr>
  802. </table>
  803. </div>
  804. </blockquote>
  805. </td></tr>
  806. </table>
  807. </blockquote>
  808. </td></tr>
  809. </table>
  810. </td>
  811. </tr>
  812. <!-- FOOTER -->
  813. <tr><td colspan="2">
  814. <hr noshade="" size="1"/>
  815. </td></tr>
  816. <tr><td colspan="2">
  817. <div align="center"><font color="#525D76" size="-1"><em>
  818. Copyright &#169; 2002, Apache Software Foundation
  819. </em></font></div>
  820. </td></tr>
  821. </table>
  822. </body>
  823. </html>
  824. <!-- end the processing -->