Ant is open source build framework provided by Apache Foundation, based on Java. At can help us to automate day to day tasks mainly for software build procedure. It can also serve as developer tool to automate day to day mundane tasks like start-stop services, delete logs, update database, codebase etc.
Ant takes XML configuration file as input build File. Build file contains the tags based instructions on what & how to perform certain tasks.
Build file may mention more than one target definitions. Each target may have one or more tasks to perform. Target can be passed as another input to Ant script, to instruct which target to perform. Target may have dependency on some other targets. In such case, dependency targets are executed first, followed by tasks in current target.
Each target may have one or more tasks to perform like copy files, delete files, compile, execute etc. Tasks are in built tag definitions of Ant. Ant provides rich set of inbuilt tasks viz copy, delete, echo, exec etc. Those in built tasks can be used passing attributes as their inputs. Also customized ant tasks can also be developed.
XML based build file may be viewed as static configuration. For dynamic configurations, input values can be passed through command line arguments or resource files.