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.

ant_in_anger.html 47 KiB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161
  1. <head>
  2. <title>
  3. Ant in Anger
  4. </title>
  5. </head>
  6. <body bgcolor="#FFFFFF" text="#000000">
  7. <h1 align="center">Ant in Anger:
  8. </h1>
  9. <h2 align="center">
  10. Using Apache Ant in a Production Development System
  11. </h2>
  12. <h4 align="center">
  13. Steve Loughran<br>
  14. Last updated 2002-11-09
  15. </h4>
  16. <a name="introduction">
  17. <h2>Introduction</h2>
  18. </a>
  19. <a href="http://ant.apache.org/">Apache Ant</a>
  20. can be an invaluable tool in a team development process -or it can
  21. be yet another source of problems in that ongoing crises we call
  22. development . This
  23. document contains some strategies and tactics for making the most of
  24. Ant. It is moderately frivolous in places, and lacks almost any actual
  25. examples of Ant xml. The lack of examples is entirely deliberate -it
  26. keeps document maintenance costs down. Most of the concepts covered
  27. don't need the detail about XML representations, as it is processes we
  28. are concerned about, not syntax. Finally, please be aware that the
  29. comments here are only suggestions which need to be customised to meet
  30. your own needs, not strict rules about what should and should not be
  31. done.
  32. <p>
  33. Firstly, here are some assumptions about the projects which this
  34. document covers:
  35. <ul>
  36. <li> Pretty much pure Java, maybe with some legacy cruft on the edges.
  37. <li> Team efforts, usually with the petulant prima-donnas all us Java
  38. programmers become once we realise how much in demand we are.
  39. <li> A fairly distributed development team -spread across locations and
  40. maybe time zones.
  41. <li> Separate sub projects -from separate beans in a big
  42. enterprise application to separate enterprise applications which need to
  43. be vaguely aware of each other.
  44. <li> Significant mismatch between expectations and time available to
  45. deliver. 'Last Week' is the ideal delivery date handed down from above,
  46. late next century the date coming up from below.
  47. <li> Everyone is struggling to keep up with platform and tool evolution.
  48. <li> Extensive use of external libraries, both open and closed source.
  49. </ul>
  50. What that all means is that there is no time to spend getting things
  51. right, you don't have that tight control on how the rest of the team
  52. works and the development process is often more one of chaos minimisation
  53. than anything else. The role of Ant in such projects is to ensure that
  54. the build, test and deploy processes run smoothly, leaving you with all
  55. the other problems.
  56. <a name="core">
  57. <h2>Core Practices</h2>
  58. </a>
  59. <h3>
  60. Clarify what you want Ant to do</h3>
  61. Ant is not a silver bullet. It is just another rusty bullet in the armory of
  62. development tools available at your disposal. Its primary purpose is to
  63. accelerate the construction and deployment of Java projects. You could certainly
  64. extend Ant to do anything Java makes possible: it is easy to imagine writing an
  65. image processing task to help in web site deployment by shrinking and
  66. recompressing jpeg files, for example. But that would be pushing the boundary of
  67. what Ant is really intended to do -so should be considered with care.
  68. <P>
  69. Ant is also a great adjunct to an IDE; a way of doing all the housekeeping of
  70. deployment and for clean, automated builds. But a good modern IDE is a
  71. productivity tool in its own right -one you should consider keeping using. Ant
  72. just lets you give the teams somewhat more freedom in IDE choice -&quot;you can
  73. use whatever you want in development, but Ant for the deployment
  74. builds&quot; Now that many modern open source and commercial IDEs
  75. include Ant support (including jEdit, Forte, Eclipse and IDEA),
  76. developers can use a great IDE, with Ant providing a rigorous and portable
  77. build process integrated into the tool.
  78. <h3>
  79. Define standard targets
  80. </h3>
  81. When you have multiple sub projects, define a standard set of targets.
  82. Projects with a split between interface and implementation jar files
  83. could consider <b>impl</b> and <b>intf</b> targets -with separate
  84. <b>debug-impl</b>and <b>debug-intf</b> targets for the debug version.
  85. And of course, the ubiquitous <b>clean</b> target.
  86. <P>
  87. With standard target names, it is easy to build encompassing Ant build
  88. files which just hand off the work to the classes below using the
  89. <a href="manual/CoreTasks/ant.html">&lt;ant&gt;</a>
  90. task. For example. the clean target could be handed down to the <tt>intf</tt> and
  91. <tt>impl</tt> subdirectories from a parent directory
  92. <pre>&lt;target name=&quot;clean&quot; depends=&quot;clean-intf, clean-impl&quot;&gt;
  93. &lt;/target&gt;
  94. &lt;target name=&quot;clean-intf&quot; &gt;
  95. &lt;ant dir=&quot;intf&quot; target=&quot;clean&quot; /&gt;
  96. &lt;/target&gt;
  97. &lt;target name=&quot;clean-impl&quot;&gt;
  98. &lt;ant dir=&quot;impl&quot; target=&quot;clean&quot; /&gt;
  99. &lt;/target&gt; </pre>
  100. If you give targets a <tt>description</tt> tag, then calling <tt>ant
  101. -projecthelp</tt> will list all tasks with their description as 'main targets', and
  102. all tasks without a description as subtargets. Describing all your
  103. entry points is therefore very useful, even before a project becomes big and complicated.
  104. <h3>
  105. Extend Ant through new tasks
  106. </h3>
  107. If Ant does not do what you want, you can use the
  108. <a href="manual/CoreTasks/exec.html">exec</a> and
  109. <a href="manual/CoreTasks/java.html">java</a> tasks or
  110. <a href="manual/OptionalTasks/script.html">inline scripting</a> to extend it. In a
  111. project with many build.xml files, you soon find that having a single
  112. central place for implementing the functionality keeps maintenance
  113. overhead down. Implementing task extensions through Java code seems
  114. extra effort at first, but gives extra benefits:-
  115. <ul>
  116. <li>Cross platform support can be added later without changing any
  117. build.xml files</li>
  118. <li>The code can be submitted to the Ant project itself, for other
  119. people to use and maintain</li>
  120. <li>It keeps the build files simpler</li>
  121. </ul>
  122. In a way, it is it this decoupling of functionality, "the tasks", from
  123. the declaration of use, "the build file", that has helped Ant succeed.
  124. If you have to get something complex done in Make or an IDE, you have a
  125. hairy makefile that everyone is scared of, or an IDE configuration that
  126. is invariably very brittle. But an Ant task is reusable and shareable
  127. among all Ant users. Many of the core and optional tasks in Ant today,
  128. tasks you do or will come to depend on, were written by people trying to
  129. solve their own pressing problems.
  130. <h3>
  131. Embrace Automated Testing
  132. </h3>
  133. <b>(alternatively "recriminate early, recriminate often")</b>
  134. <p>
  135. Ant lets you call <a href="manual/OptionalTasks/junit.html">JUnit</a>
  136. tasks, which unit test the code your team has written. Automated testing
  137. may seem like extra work at first, but JUnit makes writing unit tests so
  138. easy that you have almost no reason not to. Invest the time in learning
  139. how to use JUnit, write the test cases, and integrate them in a 'test'
  140. target from Ant so that your daily or hourly team build can have the
  141. tests applied automatically. One of the free to download chapters of
  142. <a href="http://manning.com/antbook/">Java Development with Ant</a>
  143. shows you how to use JUnit from inside Ant.
  144. <p>
  145. Once you add a way to fetch code from the SCM system, either as an Ant
  146. task, in some shell script or batch file or via some continuous
  147. integration tool. the integration test code can be a pure Ant task run
  148. on any box dedicated to the task. This is ideal for verifying that the
  149. build and unit tests work on different targets from the usual
  150. development machines. For example, a Win95/Java1.1 combination could be
  151. used even though no developer would willingly use that configuration
  152. given the choice.
  153. <p>
  154. System tests are harder to automate than unit tests, but if you can
  155. write java code to stress large portions of the system -even if the code
  156. can not run as JUnit tasks- then the <a href= "manual/CoreTasks/java.html">java</a>
  157. task can be used to invoke them. It is best to specify that you want a
  158. new JVM for these tests, so that a significant crash does not break the
  159. full build. The Junit extensions such as
  160. <a href="http://httpunit.sourceforge.net/">HttpUnit</a> for web pages, and
  161. <a href="http://jakarta.apache.org/cactus/">Cactus</a> for J2EE and servlet
  162. testing help to expand the testing framework. To test properly you will still
  163. need to invest a lot of effort in getting these to work with your project, and
  164. deriving great unit, system and regression tests -but your customers will love
  165. you for shipping software that works.
  166. <h3>Learn to Use and love the add-ons to Ant</h3>
  167. The Ant distribution is not the limit of the Ant universe, it is only
  168. the beginning. Look at the
  169. <A href="http://ant.apache.org/external.html">
  170. External Tools and Tasks page
  171. </A> for an up to date list. Here are some of them that .
  172. <ul>
  173. <li>
  174. <a hef="http://checkstyle.sourceforge.net/">Checkstyle</a><br>
  175. This tool audits your code and generates HTML reports of wherever any
  176. style rule gets broken. Nobody can hide from the code police now! tip:
  177. start using this early, so the corrections are less.
  178. <li>
  179. <A href="http://ant-contrib.sf.net/">Ant-contrib</A><br>
  180. This sourceforge project contains helper tasks that are kept separate
  181. from core Ant for ideological purity; the foreach and trycatch tasks in
  182. particular. These give you iteration and extra error handling. Also on
  183. the site is the &lt;cc&gt; task suite, that compile and link native code
  184. on a variety of platforms.
  185. <li>
  186. <a href="http://xdoclet.sourceforge.net/">XDoclet</a>
  187. XDoclet adds attributed oriented programming to Java. By adding javadoc
  188. tags to your code you can have XDoclet automatically generate web.xml
  189. descriptors, taglib descriptors, EJB interfaces, JMX interface classes,
  190. Castor XML/SQL bindings, and many more. The key here is that all those
  191. fiddly little XML files you need to create, and those interfaces EJB and
  192. JMX requires to to implement, all can be autogenerated from your Java
  193. code with a few helper attributes. This reduces
  194. errors and means you can change your code and have the rest of the app
  195. take its cue from the source. Never do EJB, JMX or webapps without it!
  196. </ul>
  197. <a name="crossplatform">
  198. <h2>
  199. Cross Platform Ant
  200. </h2>
  201. </a>
  202. Ant is the best foundation for cross platform Java development and
  203. testing to date. But if you are not paying attention, it is possible to
  204. produce build files which only work on one platform -or indeed, one
  205. single workstation.
  206. <p>
  207. The common barriers to cross-platform Ant are the use of command line
  208. tools (exec tasks) which are not portable, path issues, and hard coding
  209. in the location of things.
  210. <h3>Command Line apps: <a href="manual/CoreTasks/exec.html">Exec</a>/
  211. <a href= "manual/CoreTasks/apply.html">Apply</a></h3>
  212. The trouble with external invocation is that not all functions are found
  213. cross platform, and those that are often have different names -DOS
  214. descendants often expect .exe or .bat at the end of files. That can be
  215. bad if you explicitly include the extension in the naming of the command
  216. (don't!), good when it lets you keep the unix and DOS versions of an
  217. executable in the same bin directory of the project without name
  218. clashes arising.
  219. <p>
  220. Both the command line invocation tasks let you specify which platform
  221. you want the code to run on, so you could write different tasks for each
  222. platform you are targeting. Alternatively, the platform differences
  223. could be handled inside some external code which Ant calls. This can be
  224. some compiled down java in a new task, or an external script file.
  225. <h3>Cross platform paths</h3>
  226. Unix paths use forward slashes between directories and a colon to
  227. split entries. Thus
  228. <i>"/bin/java/lib/xerces.jar:/bin/java/lib/ant.jar"</i> is
  229. a path in unix. In Windows the path must use semicolon separators,
  230. colons being used to specify disk drives, and backslash separators
  231. <i>"c:\bin\java\lib\xerces.jar;c:\bin\java\lib\ant.jar"</i>.
  232. <p>
  233. This difference between platforms (indeed, the whole java classpath
  234. paradigm) can cause hours of fun.
  235. <p>
  236. Ant reduces path problems; but does not eliminate them entirely. You
  237. need to put in some effort too. The rules for handling path names are
  238. that 'DOS-like pathnames are handled', 'Unix like paths are handled'.
  239. Disk drives -'C:'- are handled on DOS-based boxes, but placing them in
  240. the build.xml file ruins all chances of portability. Relative file paths
  241. are much more portable. Semicolons work as path separators -a fact which
  242. is useful if your Ant invocation wrapper includes a list of jars as a
  243. defined property in the command line. In the build files you may find it
  244. better to build a classpath by listing individual files (using location=
  245. attributes), or by including a fileset of *.jar in the classpath
  246. definition.
  247. <p>
  248. There is also the <a
  249. href="manual/CoreTasks/pathconvert.html">PathConvert</a> task which
  250. can put a fully resolved path into a property. Why do that? Because then
  251. you can use that path in other ways -such as pass it as a parameter to
  252. some application you are calling, or use the replace task to patch it
  253. into a localised shell script or batch file.
  254. <p>
  255. Note that DOS descended file systems are case insensitive (apart from
  256. the obscure aberration of the WinNT posix subsystem run against NTFS),
  257. and that Windows pretends that all file extensions with four or more
  258. letters are also three letter extensions (try DELETE *.jav in your java
  259. directories to see a disastrous example of this).
  260. <p>
  261. Ant's policy on case sensitivity is whatever the underlying file system
  262. implements, and its handling of file extensions is that *.jav does not
  263. find any .java files. The Java compiler is of course case sensitive -you can
  264. not have a class 'ExampleThree' implemented in "examplethree.java".
  265. <p>
  266. Some tasks only work on one platform -<a href= "manual/CoreTasks/chmod.html">
  267. Chmod</a> being a classic example. These tasks usually result in just a
  268. warning message on an unsupported platform -the rest of the target's
  269. tasks will still be called. Other tasks degrade their functionality on
  270. platforms or Java versions. In particular, any task which adjusts the
  271. timestamp of files can not do so properly on Java 1.1. Tasks which can
  272. do that - <a href="manual/CoreTasks/get.html">Get</a>, <a
  273. href="manual/CoreTasks/touch.html">Touch</a> and <A href="manual/CoreTasks/unzip.html">
  274. Unjar/Unwar/Unzip</a> for example, degrade their functionality on
  275. Java1.1, usually resorting to the current timestamp instead.
  276. <p>
  277. Finally, Perl makes a good place to wrap up Java invocations cross
  278. platform, rather than batch files. It is included in most Unix
  279. distributions, and is a simple download for <a href=
  280. "http://www.activestate.com/Products/ActivePerl/"> Win32 platforms from
  281. ActiveState</a>. A Perl file with .pl extension, with the usual Unix
  282. path to perl on the line 1 comment and marked as executable can be run
  283. on Windows, OS/2 and Unix and hence called from Ant without issues. The
  284. perl code can be left to resolve its own platform issues. Dont forget to
  285. set the line endings of the file to the appropriate platform when you
  286. redistribute Perl code; <a
  287. href="manual/CoreTasks/fixcrlf.html">&lt;fixCRLF&gt;</a>
  288. can do that for you.
  289. <a name="team">
  290. <h2>Team Development Processes</h2>
  291. </a>
  292. Even if each team member is allowed their choice of IDE/editor, or even
  293. OS, you need to set a baseline of functionality on each box. In
  294. particular, the JDKs and jars need to be in perfect sync. Ideally pick
  295. the latest stable Java/JDK version available on all developer/target
  296. systems and stick with it for a while. Consider assigning one person to
  297. be the contact point for all tools coming in -particularly open source
  298. tools when a new build is available on a nightly basis. Unless needed,
  299. these tools should only really be updated monthly, or when a formal
  300. release is made.
  301. <p>
  302. Another good tactic is to use a unified directory tree, and add on extra
  303. tools inside that tree. All references can be made relative to the tree.
  304. If team members are expected to add a directory in the project to their
  305. path, then command line tools can be included there -including those
  306. invoked by Ant exec tasks. Put everything under source code control and
  307. you have a one stop shop for getting a build/execute environment purely
  308. from CVS or your equivalent.
  309. <a name="deploying">
  310. <h2>Deploying with Ant</h2>
  311. </a>
  312. One big difference between Ant and older tools such as Make is that the
  313. processes for deploying Java to remote sites are reasonably well
  314. evolved in Ant. That is because we all have to do it these days, so
  315. many people have put in the effort to make the tasks easier.
  316. <p>
  317. Ant can <a href="manual/CoreTasks/jar.html">Jar</a>, <a href=
  318. "manual/CoreTasks/tar.html"> Tar</a> or <a
  319. href="manual/CoreTasks/zip.html">Zip</a> files for deployment, while the
  320. <a href="manual/CoreTasks/war.html">War</a> task extends the jar task
  321. for better servlet deployment.
  322. <a href = "manual/OptionalTasks/jlink.html">Jlink</a> is a
  323. jar generation file which lets you merge multiple sub jars. This is
  324. ideal for a build process in which separate jars are generated by sub
  325. projects, yet the final output is a merged jar. <a href=
  326. "manual/OptionalTasks/cab.html">Cab</a> can be used on Win32 boxes to
  327. build a cab file which is useful if you still have to target IE deployment.
  328. <p>
  329. The <a href = "index.html#ftp">ftp</a> task lets you move stuff up to a
  330. server. Beware of putting the ftp password in the build file -a property
  331. file with tight access control is slightly better. The <a href=
  332. "manual/CoreTasks/fixcrlf.html">FixCRLF task</a> is often a useful interim step if
  333. you need to ensure that files have Unix file extensions before upload. A
  334. WebDav task has long been discussed, which would provide a more secure
  335. upload to web servers, but it is still in the todo list. Rumour has it
  336. that there is such a task in the jakarta-slide libraries. With MacOS X,
  337. Linux and Windows XP all supporting WebDAV file systems, you may even be able
  338. to use <a href="manual/CoreTasks/copy.html">&lt;copy&gt;</a> to deploy
  339. though a firewall.
  340. <p>
  341. EJB deployment is aided by the <a href="manual/OptionalTasks/ejb.html">ejb tasks</a>,
  342. while the
  343. <a
  344. href="manual/OptionalTasks/serverdeploy.html">&lt;serverdeploy&gt;</a>
  345. suite can deploy to multiple servers. The popularity of Ant has
  346. encouraged vendors to produce their own deployment tasks which they
  347. redistribute with their servers. For example, the Tomcat4.1 installation
  348. includes tasks to deploy, undeploy and reload web applications.
  349. <p>
  350. Finally, there are of course the fallbacks of just copying files to a
  351. destination using <a href="manual/CoreTasks/copy.html">Copy</a> and <a href =
  352. "index.html#copydir">Copydir</a> , or just sending them to a person or
  353. process using <a href= "manual/CoreTasks/mail.html">Mail</a> or the attachment
  354. aware <a href= "manual/OptionalTasks/mimemail.html">MimeMail</a>.
  355. In one project our team even used Ant to build CD images through a build followed
  356. by a long set of Copy tasks, which worked surprisingly well, certainly
  357. easier than when we mailed them to the free email service on
  358. myrealbox.com, then pulled them down from the far end's web browser, which we
  359. were running over WinNT remote desktop connection, that being tunneled
  360. through SSH.
  361. <a name="directories">
  362. <h2> Directory Structures</h2>
  363. </a>
  364. How you structure your directory tree is very dependent upon the
  365. project. Here are some directory layout patterns which can be used as
  366. starting points. All the jakarta projects follow a roughly similar
  367. style, which makes it easy to navigate around one form one project to
  368. another, and easy to clean up when desired.
  369. <h3>Simple Project</h3>
  370. The project contains sub directories
  371. <table width="100%">
  372. <tr>
  373. <td><b>bin</b>
  374. </td>
  375. <td>common binaries, scripts -put this on the path.
  376. </td>
  377. </tr>
  378. <tr>
  379. <td><b>build</b>
  380. </td>
  381. <td>This is the tree for building; Ant creates it and can empty it
  382. in the 'clean' project.
  383. </td>
  384. </tr>
  385. <tr>
  386. <td><b>dist</b>
  387. </td>
  388. <td>Distribution outputs go in here; the directory is created in Ant
  389. and clean empties it out
  390. </td>
  391. </tr>
  392. <tr>
  393. <td><b>doc</b>
  394. </td>
  395. <td>Hand crafted documentation
  396. </td>
  397. </tr>
  398. <tr>
  399. <td><b>lib</b>
  400. </td>
  401. <td>Imported Java libraries go in to this directory
  402. </td>
  403. </tr>
  404. <tr>
  405. <td><b>src</b>
  406. </td>
  407. <td>source goes in under this tree <i>in a heirarchy which matches
  408. the package names<i>. The dependency rules of &lt;javac&gt; requires this.
  409. </td>
  410. </tr>
  411. </table>
  412. The bin, lib, doc and src directories should be under source code control.
  413. Slight variations include an extra tree of content to be included in the
  414. distribution jars -inf files, images, etc. These can go under source
  415. too, with a <tt>metadata</tt> directory for web.xml and similar
  416. manifests, and a <tt>web</tt> folder for web content -JSP, html, images
  417. and so on. Keeping the content in this folder (or sub heirarchy)
  418. together makes it easier to test links before deployment. The actual
  419. production of a deployment image -such as a war file- can be left to the
  420. appropriate Ant task: there is no need to completely model your source tree
  421. upon the deployment heirarchy.
  422. <p>
  423. Javadoc output can be
  424. directed to a doc/ folder beneath build/, or to doc/javadoc.
  425. <h3>Interface and Implementation split</h3>
  426. If the interface is split from the implementation code then this can be
  427. supported with minor changes just by having a separate build path for
  428. the interface directory -or better still just in the jar construction:
  429. one jar for interface and one jar for implementation.
  430. <h3>Loosely Coupled Sub Projects</h3>
  431. In the loosely coupled approach multiple projects can have their own
  432. copy of the tree, with their own source code access rights.
  433. One difference to consider is only having one instance of the bin and
  434. lib directories across all projects. This is sometimes good -it helps
  435. keep copies of xerces.jar in sync, and sometimes bad -it can update
  436. foundational jar files before unit testing is complete.
  437. <p>
  438. To still have a single build across the sub projects, use parent
  439. build.xml files which call down into the sub projects.
  440. <p>
  441. This style works well if different teams have different code
  442. access/commitment rights. The risk is that by giving extra leeway to the
  443. sub projects, you can end up with incompatible source, libraries, build
  444. processes and just increase your workload and integration grief all round.
  445. <p>
  446. The only way to retain control over a fairly loosely integrated
  447. collection of projects is to have a fully automated build
  448. and test process which verifies that everything is still compatible. Sam
  449. Ruby runs one for all the apache java libraries and emails everyone when
  450. something breaks; your own project may be able to make use of
  451. <A href="http://cruisecontrol.sourceforge.net/">Cruise Control</a> for
  452. an automated, continuous, background build process.
  453. <h3>Integrated sub projects</h3>
  454. Tightly coupled projects have all the source in the same tree; different
  455. projects own different subdirectories. Build files can be moved down to
  456. those subdirectores (say src/com/iseran/core and src/com/iseran/extras),
  457. or kept at the top -with independent build files named core.xml and
  458. extras.xml
  459. <p>
  460. This project style works well if everyone trusts each other and the
  461. sub projects are not too huge or complex. The risk is that a split to a
  462. more loosely coupled design will become a requirement as the projects
  463. progress -but by the time this is realised schedule pressure and
  464. intertwined build files make executing the split well nigh impossible.
  465. If that happens then just keep with it until there is the time to
  466. refactor the project directory structures.
  467. <a name="antupdate">
  468. <h2>
  469. Ant Update Policies
  470. </h2>
  471. </a>
  472. Once you start using Ant, you should have a policy on when and how the
  473. team updates their copies. A simple policy is "every official release
  474. after whatever high stress milestone has pushed all unimportant tasks
  475. (like sleep and seeing daylight) on the back burner". This insulates you
  476. from the changes and occasional instabilities that Ant goes through
  477. during development. Its main disadvantage is that it isolates you from
  478. the new tasks and features that Ant is constantly adding.
  479. <p>
  480. Often an update will require changes to the build.xml files. Most
  481. changes are intended to be backwards compatible, but sometimes an
  482. incompatible change turns out to be
  483. necessary. That is why doing the update in the lull after a big
  484. milestone is important. It is also why including ant.jar and related
  485. files in the CVS tree helps ensure that old versions of your software
  486. can be still be built.
  487. <p>
  488. The most aggressive strategy is to get a weekly or daily snapshot of the
  489. ant source, build it up and use it. This forces you to tweak the
  490. build.xml files more regulary, as new tasks and attributes can take
  491. while to stabilise. You really have to want the new features, enjoy
  492. gratuitous extra work or take pleasure in upsetting your colleagues to
  493. take this approach.
  494. <p>
  495. Once you start extending Ant with new tasks, it suddenly becomes much
  496. more tempting to pull down regular builds. The most recent Ant builds
  497. are invariably the the best platform for writing your extensions, as you
  498. can take advantage of the regular enhancements to the foundational
  499. classes. It also prevents you from wasting time working on something
  500. which has already been done. A newly submitted task to do something
  501. complex such as talk to EJB engines, SOAP servers or just convert a text
  502. file to uppercase may be almost exactly what you need -so take it,
  503. enhance it and offer up the enhancements to the rest of the world. This
  504. is certainly better than starting work on your 'text case converter'
  505. task on Ant 0.8 in isolation, announcing its existence six months latter
  506. and discovering that instead of adulation all you get are helpful
  507. pointers to the existing implementation. The final benefit of being
  508. involved with the process is that it makes it easier for your tasks to
  509. be added with the Ant CVS tree, bringing forward the date when Ant has
  510. taken on all the changes you needed to make to get your project to work.
  511. If that happens you can revert to an official Ant release, and get on
  512. with all the other crises.
  513. <p>
  514. You should also get on the <a href =
  515. "mailto:dev-subscribe@ant.apache.org" > dev mailing list
  516. </a>, as it is where the other developers post their work, problems and
  517. experience. The volume can be quite high: 40+ messages a day, so
  518. consider routing it to an email address you don't use for much else. And
  519. don't make everyone on the team subscribe; it can be too much of a
  520. distraction.
  521. <a name="install">
  522. <h2>
  523. Installing with Ant.
  524. </h2>
  525. </a>
  526. Because Ant can read environment variables, copy, unzip and delete files
  527. and make java and OS calls, it can be used for simple installation
  528. tasks. For example, an installer for tomcat could extract the
  529. environment variable TOMCAT_HOME, stop tomcat running, and copy a war
  530. file to TOMCAT_HOME/webapps. It could even start tomcat again, but the
  531. build wouldn't complete until tomcat exited, which is probably not what
  532. was wanted.
  533. <p>
  534. The advantage of using Ant is firstly that the same install targets
  535. can be used from your local build files (via an <tt>ant</tt> invocation
  536. of the install.xml file), and secondly that a basic install target is
  537. quite easy to write. The disadvantages of this approach are that the
  538. destination must have an up to date version of Ant correctly
  539. pre-installed, and Ant doesn't allow you to handle failures well -and a
  540. good installer is all about handling when things go wrong, from files
  541. being in use to jar versions being different. This means that Ant is not
  542. suited for shrink wrapped software, but it does work for deployment and
  543. installation to your local servers.
  544. <p>
  545. One major build project I was involved in had an Ant install build file
  546. for the bluestone application server, which would shutdown all four
  547. instances of the app server on a single machine, copy the new version of
  548. the war file (with datestamp and buildstamp) to an archive directory,
  549. clean up the current deployed version of the war and then install the
  550. new version. Because bluestone restarted JVMs on demand, this script was
  551. all you needed for web service deployment. On the systems behind the
  552. firewall, we upped the ante in the deployment process by using the ftp
  553. task to copy out the war and build files, then the telnet task to
  554. remotely invoke the build file. The result was we had automated
  555. recompile and redeploy to local servers from inside our IDE (Jedit) or
  556. the command line, which was simply invaluable. Imagine pressing a button
  557. on your IDE toolbar to build, unit test, deploy and then functional test
  558. your webapp.
  559. <p>
  560. One extra trick I added later was a junit test case to run through the
  561. install check list. With tests to verify access permissions on network
  562. drives, approximate clock synchronisation between servers, DNS
  563. functionality, ability to spawn executables and all the other trouble
  564. spots, the install script could automatically do a system health test
  565. during install time and report problems. [The same tests could also be
  566. invoked from a JMX MBean, but that's another story].
  567. <p>
  568. So, Ant is not a substitute for a real installer tool, except in the
  569. special case of servers you control, but in that context it does let
  570. you integrate remote installation with your build.
  571. <a name="tips">
  572. <h2>
  573. Tips and Tricks</h2>
  574. </a>
  575. <dl>
  576. <dt><b>
  577. get
  578. </b><dd>
  579. The <a href="manual/CoreTasks/get.html">&lt;get&gt;</a> task can fetch any URL, so be used
  580. to trigger remote server side code during the build process, from remote
  581. server restarts to sending SMS/pager messages to the developer
  582. cellphones.
  583. <dt><b>
  584. i18n
  585. </b><dd>
  586. Internationalisation is always trouble. Ant helps here with the <A href=
  587. "manual/OptionalTasks/native2ascii.html">native2ascii</a> task which can escape out all non
  588. ascii characters into unicode. You can use this to write java files
  589. which include strings (and indeed comments) in your own non-ASCII
  590. language and then use native2ascii to convert to ascii prior to feeding
  591. through javac. The rest of i18n and l12n is left to you...
  592. <dt><b>
  593. Use Property Files
  594. </b><dd>
  595. Use external property files to keep per-user settings out the build
  596. files -especially passwords. Property files can also be used to
  597. dynamically set a number of properties based on the value of a single
  598. property, simply by dyamically generating the property filename from the
  599. source property. They can also be used as a source of constants across
  600. multiple build files.
  601. <dt><b>
  602. Faster compiles with Jikes
  603. </b><dd>
  604. The <a href="http://www.jikes.org/">jikes compiler</a> is usually much
  605. faster than javac, does dependency checking and has better error
  606. messages (usually). Get it. Then set
  607. build.compiler to "jikes" for it to be used in your build files.
  608. Doing this explicitly in your build files is a bit dubious as it requires the
  609. whole team (and sub projects) to be using jikes too -something you can only
  610. control in small, closed source projects. But if you set
  611. <tt>ANT_OPTS&nbsp;=&nbsp;-Dbuild.compiler=jikes</tt>
  612. in your environment, then all your builds on your system will use
  613. Jikes automatically, while others can choose their own compiler, or let
  614. ant choose whichever is appropriate for the current version of Java.
  615. <dt><b>
  616. #include targets to simplify multi build.xml projects
  617. </b><dd>
  618. You can import XML files into a build file using the XML parser itself.
  619. This lets a multi-project development program share code through reference,
  620. rather than cut and paste re-use. It also lets one build up a file of
  621. standard tasks which can be reused over time. Because the import
  622. mechanism is at a level below which Ant is aware, treat it as
  623. equivalent to the #include mechanism of the 'legacy' languages C and
  624. C++.
  625. <p>
  626. There are two inclusion mechanisms, an ugly one for all parsers and a
  627. clean one. For now, the ugly
  628. method is the most portable:-
  629. <pre>
  630. &lt;!DOCTYPE project [
  631. &lt;!ENTITY propertiesAndPaths SYSTEM &quot;propertiesAndPaths.xml&quot;&gt;
  632. &lt;!ENTITY taskdefs SYSTEM &quot;taskdefs.xml&quot;&gt;
  633. ]&gt;
  634. &amp;propertiesAndPaths;
  635. &amp;taskdefs;
  636. </pre>
  637. The cleaner method using XInclude/Xpath will let you include named
  638. targets from one build file or another, using
  639. <a href="http://www.w3.org/XML/Linking">
  640. the xpointer syntax</a>. You'll need to wait for the W3C proposals
  641. to finalise and the java XML parsers to implement it before
  642. using xpointer references.
  643. <p>
  644. Before you go overboard with using XML inclusion, note that the
  645. <tt>&lt;ant&gt;</tt> task lets you call any target in any other build
  646. file -with all your property settings propagating down to that target.
  647. So you can actually have a suite of utility targets
  648. -"deploy-to-stack-a", "email-to-team", "cleanup-installation" which can
  649. be called from any of your main build files, perhaps with subtly changed
  650. parameters. Indeed, after a couple of projects you may be able to create
  651. a re-usable core build file which contains the core targets of a basic
  652. Java development project -compile, debug, deploy- which project specific
  653. build files call with their own settings. If you can achive this then
  654. you are definately making your way up the software maturity ladder. With
  655. a bit of work you may progress from being a SEI CMM Level 0 organisation
  656. "Individual Heroics are not enough" to SEI CMM Level 1, "Projects only
  657. succeed due to individual heroics"
  658. <p>
  659. NB, <tt>&lt;ant&gt;</tt> copies all your properties unless the
  660. <i>inheritall</i> attribute is set to false. Before that attribute
  661. existed you had to carefully name all property definitions in all build
  662. files to prevent unintentional overwriting of the invoked property by
  663. that of the caller, now you just have to remember to set
  664. <tt>inheritall="false"</tt> on all uses of the &lt;ant&gt; task.
  665. <dt><b>
  666. Implement complex Ant builds through XSL
  667. </b><dd>
  668. XSLT can be used to dynamically generate build.xml files from a source
  669. xml file, with the <a href="manual/CoreTasks/style.html">&lt;xslt&gt;</a> task controlling
  670. the transform. This is the current recommended strategy for creating
  671. complex build files dynamically. However, its use is still apparently
  672. quite rare -which means you will be on the bleeding edge of technology.
  673. <dt><b>
  674. Change the invocation scripts
  675. </b><dd>
  676. By writing your own invocation script -using the DOS, Unix or Perl
  677. script as a starting point- you can modify Ant's settings and behavior for an
  678. individual project. For example, you can use an alternate variable to
  679. ANT_HOME as the base, extend the classpath differently, or dynamically
  680. create a new command line property 'project.interfaces' from all .jar
  681. files in an interfaces directory.
  682. <p>
  683. Having a custom invocation script which runs off a CVS controlled
  684. library tree under PROJECT_HOME also lets you control Ant versions
  685. across the team -developers can have other copies of Ant if they want,
  686. but the CVS tree always contains the jar set used to build your project.
  687. <p>
  688. You can also write wrapper scripts which invoke the existing Ant
  689. scripts. This is an easy way to extend them. The wrapper scripts can add
  690. extra definitions and name explicit targets, redefine ANT_HOME and
  691. generally make development easier. Note that "ant" in Windows is really
  692. "ant.bat", so should be invoked from another batch file with a "CALL
  693. ant" statement -otherwise it never returns to your wrapper.
  694. <dt><b>
  695. Write all code so that it can be called from Ant
  696. </b><dd>
  697. This seems a bit strange and idealistic, but what it means is that you should
  698. write all your java code as if it may be called as a library at some point in
  699. future. So do not place calls to <tt>System.exit()</tt> deep in the code -if you
  700. want to exit a few functions in, raise an exception instead and have
  701. <tt>main()</tt> deal with it.
  702. <p>
  703. Moving one step further, consider proving an Ant Task interface to the
  704. code as a secondary, primary or even sole interface to the
  705. functionality. Ant actually makes a great bootloader for Java apps as it
  706. handles classpath setup, and you can re-use all the built in tasks for
  707. preamble and postamble work. Some projects, such as
  708. <a href="http://xdoclet.sf.net">XDoclet</a> only run under Ant, because
  709. that is the right place to be.
  710. <!-- <dt><b>
  711. Use Antidote as the invocation tool
  712. </b><dd>
  713. Even if you edit Ant files by hand, Antidote makes a good execution tool
  714. because it eliminates the startup time of the JVM, perhaps even some of
  715. the XML parsing delays.
  716. -->
  717. <dt><b>
  718. Use the replace task to programmatic modify text files in your project.
  719. </b><dd>
  720. Imagine your project has some source files -BAT files, ASPX pages (!), anything
  721. which needs to be statically customised at compile time for particular
  722. installations, such driven from some properties of the project such as JVM options, or the URL
  723. to direct errors too. The replace task can be used to modify files, substituting text and creating
  724. versions customised for that build or destination. Of course, per-destination customisation
  725. should be delayed until installation, but if you are using Ant for the remote installation
  726. that suddenly becomes feasible.
  727. <dt><b>
  728. Use the mailing lists
  729. </b><dd>
  730. There are two
  731. <a href="http://ant.apache.org/mail.html">mailing lists</a>
  732. related to Ant, user and developer. Ant user is where <i>all</i>
  733. questions related to using Ant should go. Installation, syntax, code
  734. samples, etc -post your questions there or search the archives for
  735. whether the query has been posted and answered before. Ant-developer
  736. is where Ant development takes place -so it is <i>not</i> the place to
  737. post things like "I get a compilation error when I build my project" or
  738. "how do I make a zip file". If you are actually extending Ant, on the other
  739. hand, it is the ideal place to ask questions about how to add new tasks, make
  740. changes to existing ones -and to post the results of your work, if you want them
  741. incorporated into the Ant source tree.
  742. </dl>
  743. <a name="puttingtogether">
  744. <h2>
  745. Putting it all together
  746. </h2>
  747. </a>
  748. What does an Ant build process look like in this world? Assuming a
  749. single directory structure for simplicity, the build file
  750. should contain a number of top level targets
  751. <ul>
  752. <li>build - do an (incremental) build
  753. <li>test - run the junit tests
  754. <li>clean - clean out the output directories
  755. <li>deploy - ship the jars, wars, whatever to the execution system
  756. <li>publish - output the source and binaries to any distribution site
  757. <li>fetch - get the latest source from the cvs tree
  758. <li>docs/javadocs - do the documenation
  759. <li>all - clean, fetch, build, test, docs, deploy
  760. <li>main - the default build process (usually build or build & test)
  761. </ul>
  762. Sub projects 'web', 'bean-1', 'bean-2' can be given their own build
  763. files -web.xml, bean-1.xml, bean-2.xml- with the same entry points.
  764. Extra toplevel tasks related to databases, web site images and the like
  765. should be considered if they are part of the process.
  766. <p>
  767. Debug/release switching can be handled with separate initialisation
  768. targets called before the compile tasks which define the appropriate
  769. properties. Antcall is the trick here, as it allows you to have two paths
  770. of property initialisation in a build file.
  771. <p>
  772. Internal targets should be used to structure the process
  773. <ul>
  774. <li> init - initialise properties, extra-tasks, read in per-user
  775. property files.
  776. <li> init-release - initialise release properties
  777. <li> compile - do the actual compilation
  778. <li> link/jar - make the jars or equivalent
  779. <li> staging - any pre-deployment process in which the output is dropped
  780. off then tested before being moved to the production site.
  781. </ul>
  782. The switching between debug and release can be done by making
  783. init-release conditional on a property, such as <tt>release.build</tt>
  784. being set :-
  785. <pre>&lt;target name=&quot;init-release&quot; if=&quot;release.build&quot;&gt;
  786. &lt;property name=&quot;build.debuglevel&quot; value=&quot;lines,source&quot;/&gt;
  787. &lt;/target&gt;
  788. </pre>
  789. You then have dependent targets, such as "compile", depend on this
  790. conditional target; there the 'default' properties are set, and then the
  791. property is actually used. Because Ant properties are <i>immutable</i>,
  792. if the release target was executed its settings will override the
  793. default values:
  794. <pre>&lt;target name=&quot;compile&quot; depends=&quot;init,init-release&quot;&gt;
  795. &lt;property name=&quot;build.debuglevel&quot; value=&quot;lines,vars,source&quot;/&gt;
  796. &lt;echo&gt;debug level=${build.debuglevel}&lt;/echo&gt;
  797. &lt;javac destdir=&quot;${build.classes.dir}&quot;
  798. debug=&quot;true&quot;
  799. debuglevel=&quot;${build.debuglevel}&quot;
  800. includeAntRuntime=&quot;false&quot;
  801. srcdir=&quot;src&quot;&gt;
  802. &lt;classpath refid=&quot;compile.classpath&quot;/&gt;
  803. &lt;/javac&gt;
  804. &lt;/target&gt;
  805. </pre>
  806. As a result, we now have a build where the release mode only includes
  807. the filename and line debug information (useful for bug reports), while
  808. the development system included variables too.
  809. <p>
  810. It is useful to define a project name property which can be echoed in
  811. the init task. This lets you work out which Ant file is breaking in a
  812. multi file build.
  813. <p>
  814. What goes in to the internal Ant tasks depends on your own projects. One
  815. very important tactic is 'keep path redefinition down through
  816. references' - you can reuse paths by giving them an ID and then
  817. referring to them via the 'refid' attribute you should only need to
  818. define a shared classpath once in the file; filesets can be reused
  819. similarly.
  820. <p>
  821. Once you have set up the directory structures, and defined the Ant tasks
  822. it is time to start coding. An early priority must be to set up the
  823. automated test process, as that not only helps ensures that the code
  824. works, it verifies that the build process is working.
  825. <p>
  826. And that's it. The build file shouldn't need changing as new source
  827. files get added, only when you want to change the deliverables or part
  828. of the build process. At some point you may want to massively
  829. restructure the entire build process, restructuring projects and the
  830. like, but even then the build file you have should act as a foundation
  831. for a split build file process -just pull out the common properties into
  832. a properties file all build files read in, keep the target names unified
  833. and keep going with the project. Restructuring the source code control
  834. system is often much harder work.
  835. <h2>The Limits of Ant</h2>
  836. Before you start adopting Ant as the sole mechanism for the build
  837. process, you need to be aware of what it doesn't do.
  838. <p>
  839. <h3>It's not a scripting language</h3>
  840. Ant lets you declare what you want done, with a bit of testing of the
  841. platform and class libraries first to enable some platform specific
  842. builds to take place. It does not let you specify how to handle things
  843. going wrong (a listener class can do that), or support complex
  844. conditional statements.
  845. <p>
  846. If your build needs to handle exceptions then look at the sound listener
  847. as a simple example of how to write your own listener class. Complex
  848. conditional statements can be handled by having something else do the
  849. tests and then build the appropriate Ant task. XSLT can be used for
  850. this.
  851. <h3>It's not Make</h3>
  852. Some of the features of make, specifically inference rules and
  853. dependency checking are not included in Ant. That's because they are
  854. 'different' ways of doing a build. Make requires you to state
  855. dependencies and the build steps, Ant wants you to state tasks and the
  856. order between them, the tasks themselves can do depedency checking or
  857. not. A full java build using Jikes is so fast that dependency checking
  858. is relatively moot, while many of the other tasks (but not all), compare
  859. the timestamp of the source file with that of the destination file
  860. before acting.
  861. <h3>It's not meant to be a nice language for humans</h3>
  862. XML isn't a nice representation of information for humans. It's a
  863. reasonable representation for programs, and text editors and source code
  864. management systems can all handle it nicely. But a complex Ant file can
  865. get ugly because XML is a bit ugly, and a complex build is, well,
  866. complicated. Use XML comments so that the file you wrote last month
  867. still makes sense when you get back to it, and use Antidote to edit the
  868. files if you prefer it.
  869. <h3>Big projects still get complicated fast</h3>
  870. Large software projects create their own complexity, with inter-dependent
  871. libraries, long test cycles, hard deployment processes and a multitude of
  872. people each working on their own bit of the solution. That's even before
  873. the deadlines loom close, the integration problems become insurmountable,
  874. weekends become indistinguishable from weekdays in terms of workload and
  875. half the team stops talking to the other half. Ant may simplify the
  876. build and test process, and can eliminate the full time 'makefile engineer'
  877. role, but that doesn't mean that someone can stop 'owning the build'.
  878. Being in charge of the build has to mean more than they type 'ant all' on
  879. their system, it means they need to set the standards of what build tools to
  880. use, what the common targets, what property names and files should be
  881. and generally oversee the sub projects build processes. On a small project,
  882. you don't need to do that -but remember: small projects become big projects
  883. when you aren't looking. If you start off with a little bit of process, then
  884. you can scale it if needed. If you start with none, by the time you need
  885. it it will be too late.
  886. <h3>You still need all the other foundational bits of a software
  887. project</h3>
  888. If you don't have an source code management system, you are going to end
  889. up hosed. If you don't have everything under SCM, including web pages,
  890. dependent jars, installation files, you are still going to end up hosed,
  891. it's just a question of when it's going to happen.
  892. CVS is effectively free and works well with Ant, but Sourcesafe, Perforce,
  893. Clearcase and StarTeam also have Ant tasks. These tasks
  894. let you have auto-incrementing build counters, and automated file
  895. update processes.
  896. <p>
  897. You also need some kind of change control process, to resist
  898. uncontrolled feature creep. Bugzilla is a simple and low cost tool for
  899. this, using Ant and a continuous test process enables a rapid evolution of code
  900. to adapt to those changes which are inevitable.
  901. <h2>Endpiece</h2>
  902. Software development is meant to be fun. Being in the maelstrom of a
  903. tight project with the stress of integration and trying to code
  904. everything up for an insane deadline can be fun -it is certainly
  905. exhilirating. Adding a bit of automation to the process may make things
  906. less chaotic, and bit less entertaining, but it is a start to putting
  907. you in control of your development process. You can still have fun, you
  908. should just have less to worry about, a shorter build/test/deploy cycle
  909. and more time to spend on feature creep or important things like skiing.
  910. So get out there and have fun!
  911. <a name="reading">
  912. <h2>Further Reading</h2>
  913. </a>
  914. <ul>
  915. <li>
  916. <a
  917. href="http://www.martinfowler.com/articles/continuousIntegration.html">
  918. <i>Continuous Integration</i></a>; Martin Fowler. <br>
  919. A paper on using Ant within a software project
  920. running a continuous integration/testing proces.
  921. <li><i> Refactoring</i>; Martin Fowler, ISBN: 0201485672 <br>
  922. Covers JUnit as well as tactics for making some headway with the mess of
  923. code you will soon have.
  924. <li><a href="http://manning.com/antbook/"><i>Java Development with
  925. Ant</i></a>;
  926. Erik Hatcher and Steve Loughran. <br>
  927. Arguably the only book on Ant worth owning;
  928. certainly it's the only one written by Ant developers.
  929. <li>
  930. <a href="http://www.iseran.com/Steve/papers/when_web_services_go_bad.html">
  931. <i>When Web Services Go Bad</i></a>; Steve Loughran.<br>
  932. One of the projects this paper is based on.
  933. </ul>
  934. <a name="author">
  935. <h3>About the Author</h3>
  936. </a>
  937. Steve Loughran is a research scientist at a corporate R&amp;D lab,
  938. currently on a sabbatical building production web services against
  939. implausible deadlines for the fun of it. He is also a committer on
  940. Apache Ant and Apache Axis, and co-author of
  941. <a href="http://manning.com/antbook/"><i>Java Development with Ant</i></a>.
  942. He thinks that if you liked this document you'll love that book because
  943. it doesn't just explain Ant, it goes into processes, deployment and best practices
  944. and other corners of stuff that really make Ant useful. (It would
  945. have been easier to just rehash the manual, but that wouldn't have been
  946. so useful or as much fun).
  947. <p>
  948. For questions related to this document, use the Ant mailing list.
  949. <hr>
  950. <p align="center">Copyright &copy; 2000-2003 Apache Software Foundation. All rights
  951. Reserved.</p>
  952. </body>