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.

design guide.xml 4.5 kB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. <?xml version="1.0"?>
  2. <?xml-stylesheet href="docbookx.css" type="text/css"?>
  3. <!--DOCTYPE article SYSTEM "docbookx.dtd"-->
  4. <article>
  5. <artheader>
  6. <title>Utah Design and Programmer's Guide</title>
  7. <author>
  8. <firstname>James Duncan</firstname>
  9. <surname>Davidson</surname>
  10. </author>
  11. <copyright>
  12. <year>2000</year>
  13. <holder>The Apache Software Foundation</holder>
  14. </copyright>
  15. </artheader>
  16. <para>This document describes the design goals for Utah, a proposed
  17. replacement for the current Ant build tool. I'm calling this work "Utah" as I
  18. hope to be done with it by the end of the W3C DOM Working Group meeting taking
  19. place in Orem Utah Mar 20-23. No other meaning is intended to be conveyed by
  20. the codename.</para>
  21. <sect1>
  22. <title>History</title>
  23. <para>Ant was originally designed as a small, lightweight
  24. <trademark>Java</trademark> based build tool. It was first created out of shear
  25. frustration with make and all its variants. </para>
  26. <para>This first public version of Ant, Ant 1.0 which was released as part
  27. of the Tomcat and Watchdog code drops from Sun Microsystems, was quite popular.
  28. Everyone loved its simplicity. However, everyone wanted to do something
  29. different. Lots of solutions were proposed, some were hacked in. At some point
  30. it was necessary to take a clean look at what it was becoming and the types of
  31. problems it was really intended to solve.Utah is that fresh look It is probably
  32. not going to be entirely backwards compatible, but it is hoped that by starting
  33. out with a fresh look at the goals and requirements of Ant, we can end up with
  34. a better tool.</para>
  35. </sect1>
  36. <sect1>
  37. <title>Design Goals</title>
  38. <para>Simplicity: </para>
  39. <para>Ant must be simple to use and simple to extend. Of course, the
  40. definition of simple can vary depending on which audience is chosen. For Ant,
  41. since it is a build tool aimed at Java developers, the goal is simplicity of
  42. use and extension for a competent Java programmer.</para>
  43. <para>Understandability: </para>
  44. <para>The way Ant works should be clearly understandable for a first time
  45. as well as a veteran user. The mechanism to extend Amsterdam must be
  46. understandable. And the build file syntax must be eminently
  47. understandable.</para>
  48. <para>Extensibility: </para>
  49. <para>Ant must provide an easy to use extensibility path. Extensions must
  50. be easy to write for the programmer and easy to place where they can best be
  51. used.</para>
  52. </sect1>
  53. <sect1>
  54. <title>Runtime Conceptual Overview</title>
  55. <para>Ant works with entities called Projects. A Project is a collection of
  56. Property definitions, Task definitions, and Targets.</para>
  57. <para>A Property is a mutable name-value pair that is scoped to the
  58. Project. As Tasks within Targets are executed, the Property list of the Project
  59. can be added to, Property values can be changed, and Properties can even be
  60. removed. This allows runtime information to be passed to the Tasks either by
  61. the user or by programmatic result of preceding Tasks.</para>
  62. <para>A Target is a unit of work within the Project. For example, a Project
  63. could have a Target that built a set of classes in development mode, another
  64. Target that packaged the classes into a distributable form, and yet another
  65. Target that cleaned up everything. Targets can indicate that they depend on
  66. other Targets. If such a dependency is indicated, the runtime ensures that the
  67. Target that is depended on is executed before executing any Tasks for the
  68. current Target.</para>
  69. <para>Targets contain Tasks. More accurately, they contain implementations
  70. of a Task. For example, a Task that performs basic Java classfile compilation
  71. is provided with Ant. Another task that performs the JAR operation is provided.
  72. These Tasks are very different, but each implements the Task interface. Each
  73. Task is configured for its purpose. When a Target is executed, the sequence of
  74. Tasks within that target are executed in turn.</para>
  75. <para>More specifically, when a Target is executed, the list of Tasks for
  76. that Target is retrieved by the runtime. Each Task is created as a new object,
  77. its configuration methods called with the information that is used, and then
  78. the Task is executed. By performing configuration just before the Task is
  79. executed, any properties that were defined or modified by other Tasks can
  80. affect the currently running task.</para>
  81. </sect1>
  82. </article>