Ant Tutorial «Prev  Next»


Optional Ant Tasks

Optional tasks are bundled with Ant and depend on libraries that do not belong to the Ant project (core tasks have no such dependences), and they come bundled as part of the Ant distribution, as do the libraries, so you can still use them in your projects. If the tasks that come bundled with Ant do not give you the options you want, you have two choices. First, you can use Ant to run a command-line tool if one exists that does what you want to do. Second, you can write your own task, which simply means you would write a Java class that implements the desired behavior. You can then use this custom task in future projects and distribute it.
Writing a custom task has the same advantages that Ant has over other build tools in that your new task can go wherever Ant can. If your project demanded a step that was possible only at the command line on Windows, then you could not build it on Unix unless you wrote a custom task. Java and Ant are portable; Windows tools are not necessarily so.

  1. .NET Tasks
  2. ANTLR
  3. Attrib
  4. Cab
  5. Chgrp
  6. Chown
  7. Clearcase Tasks
  8. Continuus/Synergy Tasks
  9. Depend
  10. EJB Tasks
  11. Echoproperties
  12. FTP
  13. IContract
  14. Image
  15. Jarlib-available
  16. Jarlib-display
  17. Jarlib-manifest
  18. Jarlib-resolve
  19. JavaCC
  20. Javah
  21. JspC
  22. JDepend
  23. JJDoc
  24. JJTree
  25. Jlink
  26. JProbe Coverage
  27. JUnit
  28. JUnitReport
  29. Metamata Metrics
  30. Metamata Audit
  31. MimeMail
  32. MParse
  33. Native2Ascii
  34. NetRexxC
  35. Perforce Tasks
  36. PropertyFile
  37. Pvcs
  38. RenameExtensions
  39. ReplaceRegExp
  40. RExec
  41. Rpm
  42. ServerDeploy
  43. Setproxy
  44. Scp
  45. Script
  46. Scriptdef
  47. Sound
  48. SourceOffSite
  49. Splash
  50. Sshexec
  51. Starteam Tasks
  52. Stylebook
  53. Symlink
  54. Telnet
  55. Test
  56. Translate
  57. Visual Age for Java Tasks
  58. Microsoft Visual SourceSafe Tasks
  59. Weblogic JSP Compiler
  60. XmlValidate