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.

features.html 8.1 KiB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217
  1. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
  2. <html>
  3. <head>
  4. <meta http-equiv="Content-Language" content="en-us">
  5. <title>Ant2 feature list</title>
  6. <style type="text/css">
  7. .comment {
  8. COLOR: #900000;
  9. BACKGROUND: #ffa;
  10. }
  11. </style>
  12. </head>
  13. <body bgcolor="#FFFFFF">
  14. <p class="comment">If something looks like this, this is either a
  15. request for input or a &quot;REVISIT&quot; marker or similar.</p>
  16. <h1>Ant2 Goals</h1>
  17. <p>Even though Ant2 is expected to be incompatible with the
  18. current Ant1 series, it still has the same goals. Ant is a Java
  19. based build tool and this remains the main focus of it. The
  20. original goals of simplicity, understandability and extensibility
  21. still stand and Ant2 will try to achieve them even better than
  22. Ant1 does.</p>
  23. <h2>Simplicity and Understandability</h2>
  24. <p>These two goals are closely related. Ant build files shall be
  25. easy to read and understand - at the same time it should be easy
  26. to write a custom Ant task and to use the utility classes that
  27. Ant2 provides.</p>
  28. <p>Ant2 shall be more consistent than Ant1 is - this means:</p>
  29. <ul>
  30. <li>core tasks will use the same attribute names for common
  31. functionality</li>
  32. <li>similar tasks will be unified to use similar forms.</li>
  33. <li>different implementations for the same functionality will be
  34. hidden behind facade tasks.</li>
  35. <li>properties and data types will be unified so that they share
  36. the same namespace and inheritance rules. <i
  37. class="comment">Need to talk about how ${} expansion works for
  38. filesets and so on.</i></li>
  39. </ul>
  40. <p>Furthermore some things will have to become more explicit:</p>
  41. <ul>
  42. <li>remove all magic properties</li>
  43. <li>make build file writers explicitly state which
  44. filters/filtersets a copy task will use</li>
  45. <li>add scoping rules for properties so that not all of them
  46. will be inherited by sub-builds, only those that have been
  47. specified explicitly. <i class="comment">Fill in details once
  48. they&apos;ve been sorted out.</i></li>
  49. </ul>
  50. <p>The front-ends for Ant2 shall be smart enough to automatically
  51. detect the required libraries (like <code>tools.jar</code>), the
  52. use of native scripts shall be kept to a minimum.</p>
  53. <p>Build file writers can attach a message to targets that will be
  54. presented to the user if that target is going to be skipped (based
  55. on the if/unless attribute of the target).</p>
  56. <h2>Extensibility</h2>
  57. <p>Ant2 like Ant1 uses build files written in XML as its main
  58. input, but it will not be restricted to it. The core of Ant2 will
  59. work on an object model of Project/Target/Task that is independent
  60. of any external representation.</p>
  61. <p>As an extension of the current <code>&lt;taskdef&gt;</code>
  62. concept, tasks can be bundled into task libraries (together with
  63. data types and other utility classes). These task libraries are
  64. special JAR archives that somehow describe the contained tasks to
  65. Ant. Ant will automatically know all tasks contained in task
  66. libraries that have been placed into a special directory - in
  67. addition task libraries can be referenced and used in a build file
  68. explicitly. <i class="comment">Fill in details once they&apos;ve been
  69. sorted out.</i></p>
  70. <p>It has become apparent, that several &quot;aspects&quot; of
  71. tasks are so common that task writers find themselves duplicating
  72. code all over again - things like classpath handling or &quot;do
  73. we stop the build if this task fails?&quot; functionality for
  74. example. Ant2 will provide a way to let the user attach an
  75. &quot;aspect handler&quot; to a project - all attributes that live
  76. in a certain namespace are going to be passed to this handler. <i
  77. class="comment">Need to talk about TaskContext here.</i></p>
  78. <p>Ant2 will farm out common functionality from tasks into utility
  79. classes so that task writers can benefit from a tested and stable
  80. framework - they shouldn&apos;t need to deal with existing tasks
  81. directly (like some tasks &quot;abuse&quot; the
  82. <code>&lt;touch&gt;</code> task in Ant1).</p>
  83. <h1>New/Modified Features</h1>
  84. <p>Ant2 will run the build process fully dynamically, which means
  85. that task won&apos;t be instantiated before they are actually being run
  86. and <code>${}</code> expansion will see the very latest value of a
  87. property. It will be possible to reassign values of properties via
  88. a built-in task.</p>
  89. <h2>Compatibility with Ant1</h2>
  90. <p>Ant2 is going to break Ant1 in several ways:</p>
  91. <ul>
  92. <li>Tasks written for Ant1 won&apos;t work in Ant2 as the API of
  93. Ant&apos;s core and the names of utility classes are going to
  94. change. There will probably be adaptors and utility classes to
  95. ease the transition for task writers.</li>
  96. <li>Build files written for Ant1 will probably not be valid in
  97. Ant2 or at least not yield the same results. It is expected that
  98. Ant2 will come with a tool to translate Ant1 build files into
  99. equivalent Ant2 versions</li>
  100. <li>magic properties like <code>build.compiler</code> may
  101. disappear and be replaced by a different customization
  102. concept.</li>
  103. <li>Ant2 is going to require a JDK version 1.2 or above and a
  104. JAXP compliant parser version 1.1 or above.</li>
  105. </ul>
  106. <h2>Support Integration of Ant Into Other Tools</h2>
  107. <p>Ant2 will have a clear separation between the front-end that is
  108. responsible for user interactions, the object model that
  109. represents the project to build and the part of Ant that runs the
  110. build process itself <i class="comment">Name that TaskEngine,
  111. ProjectEngine, ExecutionEngine or what?</i>. This separation is
  112. expected to ease the integration of Ant (or parts of it) into
  113. other products.</p>
  114. <p>Ant2 itself will include a command line front-end and Antidote
  115. will become the GUI front-end to it. Other front-ends like a
  116. servlet front-end are expected <i class="comment">outside of
  117. Ant&apos;s core</i> as well.</p>
  118. <p>In addition to this separation, the following features should
  119. help people who want to integrate Ant into their products:</p>
  120. <ul>
  121. <li>It will be possible to cancel a running build process.</li>
  122. </ul>
  123. <h2>More Control for Users and Build File Writers</h2>
  124. <p>Ant2 will use a <code>BuildListener</code> concept similar to
  125. the one of Ant1 but may provide a richer set of events. It will be
  126. possible to attach and detach listeners to a build process from
  127. within the build file and to modify the behavior of attached
  128. listeners.</p>
  129. <h2>Documentation System</h2>
  130. <p>All tasks will be documented in XML files using a common DTD <i
  131. class="comment">Still need to define it</i> - task libraries are
  132. expected to include the documentation using this DTD inside the
  133. library itself.</p>
  134. <h2>Better Subbuild Handling</h2>
  135. <p class="comment">Is there something beyond &quot;should become
  136. better&quot; right now?</p>
  137. <h1>Rejected Features</h1>
  138. <p>This is list is not complete, it just highlights some of the
  139. rejected features and tries to explain why they&apos;ve been
  140. rejected.</p>
  141. <p>For a complete listing of all requested features, see <a
  142. href="requested-features.html">requested-features.html</a>. The
  143. discussion on all topics can be followed in the <a
  144. href="http://marc.theaimsgroup.com/?l=ant-dev&r=1&w=2">archives
  145. for ant-dev</a> in threads starting from 2001-03-21 - the subject
  146. lines contained either <code>[VOTE]</code> or
  147. <code>[DISC]</code>.</p>
  148. <h1>Ideas for New Tasks and Tools</h1>
  149. <p>Please refer to <a
  150. href="requested-features.html">requested-features.html</a> in the
  151. section &quot;I. Things that don&apos;t affect the core but are
  152. requests for new tasks or enhancements to existing tasks.&quot;
  153. for this.</p>
  154. <hr>
  155. <p align="center">$Id$</p>
  156. <p align="center">Copyright &copy; 2001 Apache Software
  157. Foundation. All rights Reserved.</p>
  158. </body>
  159. </html>