From Wikibooks, open books for an open world
What is Apache Ant?
- An operating system and language neutral XML based "Build Tool"
- A scripting language for executing any complex file-system processes that can be run from a command line interface
- A.N.T. – Another Neat Tool
- Used for Building the Project
History of Ant
- Built by James Duncan Davidson
- Frustrated with the UNIX "make"
- Invented while turning a product from Sun into open source
- Make used "tab" as a record separator
- Tabs frequently got converted to spaces during copy/paste operations
Why is Ant Strategic?
Ant is important because it helps organizations create repeatable build processes.
Repeatability is critical to organizations reaching the next level of CMU's Capability Maturity Model :
Ant helps you get from the Initial to the Repeatable level.
Ant is a Process Discipline
- Process discipline helps ensure that existing practices are retained during times of stress
- When these practices are in place, projects are performed and managed according to their documented plans
- Answers the Question: How did the prior developer compile, test and install their system?
- Excellent aid for software archeologists
Software Project Lifecycle
- Version 1 and version 2 of a software package are frequently done by different groups
- Sometimes version 1 and 2 are done years apart by different teams in different countries
- Contractors and internal staff need to use the same tools
- Shared development processes, like those used in the Open Source community, would be almost impossible without tools like Ant
Ant is Operating System and Language Neutral
- Builds run on both Windows and UNIX/Linux systems
- Should run anywhere a Java VM runs
- Ant files "know" about file separators "/" vs. "\"
- Build targets can still do OS-specific tasks
- Works with anything that can be done from the command line
- Easy to extend (with Java)
- It is possible to extend with other languages as long as they have Java bindings but in practice, most people use Java to extend Ant
- If you are familiar with XML (or even HTML) you will probably learn Ant quickly
- If you are not already familiar with XML you will need to learn some XML before you use Ant
- One of the best ways of doing this is to read many small Ant sample tasks
- This book should help you do this