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.

intro.html 2.2 KiB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. <html>
  2. <head>
  3. <meta http-equiv="Content-Language" content="en-us">
  4. <title>Apache Ant User Manual - Introduction</title>
  5. </head>
  6. <body>
  7. <h1><a name="introduction">Introduction</a></h1>
  8. <p>Apache Ant is a Java-based build tool. In theory, it is kind of like
  9. <i>make</i>, without <i>make</i>'s wrinkles.</p>
  10. <h3>Why?</h3>
  11. <p>Why another build tool when there is already
  12. <i>make</i>,
  13. <i>gnumake</i>,
  14. <i>nmake</i>,
  15. <i>jam</i>,
  16. and
  17. others? Because all those tools have limitations that Ant's original author
  18. couldn't live with when developing software across multiple platforms.
  19. Make-like
  20. tools are inherently shell-based: they evaluate a set of dependencies,
  21. then execute commands not unlike what you would issue on a shell.
  22. This means that you
  23. can easily extend these tools by using or writing any program for the OS that
  24. you are working on; however, this also means that you limit yourself to the OS,
  25. or at least the OS type, such as Unix, that you are working on.</p>
  26. <p>Makefiles are inherently evil as well. Anybody who has worked on them for any
  27. time has run into the dreaded tab problem. &quot;Is my command not executing
  28. because I have a space in front of my tab?!!&quot; said the original author of
  29. Ant way too many times. Tools like Jam took care of this to a great degree, but
  30. still have yet another format to use and remember.</p>
  31. <p>Ant is different. Instead of a model where it is extended with shell-based
  32. commands, Ant is extended using Java classes. Instead of writing shell commands,
  33. the configuration files are XML-based, calling out a target tree where various
  34. tasks get executed. Each task is run by an object that implements a particular
  35. Task interface.</p>
  36. <p>Granted, this removes some of the expressive power that is inherent in being
  37. able to construct a shell command such as
  38. <nobr><code>`find . -name foo -exec rm {}`</code></nobr>, but it
  39. gives you the ability to be cross-platform - to work anywhere and
  40. everywhere. And
  41. hey, if you really need to execute a shell command, Ant has an
  42. &lt;exec&gt; task that
  43. allows different commands to be executed based on the OS it is executing
  44. on.</p>
  45. <hr>
  46. <p align="center">Copyright &copy; 2000-2002 Apache Software Foundation. All rights
  47. Reserved.</p>
  48. </body>
  49. </html>