Ant is a java based build tool designed to be cross-platform, easy to use, extensible and scalable. It can be used in small projects, or it can be used in a very large multiteam software project.
The first question comes in our mind is, are we supporting multiple platform?
With Makefile what we can do?
How it is going to call another batch file?
How it is going to call other shell script?
How about tight IDE integration?
How many Makefiles I have to write for a project having almost One Thousand java files?
Is Ant faster than Make?
Make is the automated build tool widley used in nearly every small and large C or C++ project. In Make we list target, their dependencies and the actions to bring each target up to date.
In Make Phony targets like "clean" or "all" can have no dependencies that is they always execute their commands or can be dependent upon real targets. Makefile have their own language syntax, requiring a separate knowledge set for their authors, Make is a platform dependent hence GNU Make lacks platform-independencey, requires multiple versions of the same makefile one for each target platform this to be maintained and distributed, this makes it difficult or impossible for anyone but an expert user.
Make creates a new instance of the VM with every file that needs to be compiled, compile times grow linearly with the number of source files in a project. As you have to write multiple Makfiles for any size of project whether it be a small or very large project make doesn't care. Ant calls the Java compiler once for all files in a < fileset > . Another major problem with Makefile is of white spaces, we have to use Emacs to properly write the Makefile so that we can make sure that no unintended spaces creep in should be their (The original designer of the make file format knew after the first week that the tab thing would be a problem. But he had dozens of users and didn't want to break compatibility).
Ant has became the industry standard, its really easy to put a single build file at the root of the project and put the source on Linux/Solaries/WIN/Mac/OSX and build your project. So why Ant is great build tool?
Yeah so Ant
enhance deployment quality, provide cool flexible development environments, Deployments would be matter of typing 'ant deploy' at the command prompt so deploy it directly to production systems, parameterization and customization for build-time is provided, help with database driven application, J2EE deployment descriptor is taken care of, IDE friendly and automate it all by crafting an interactive build process.
Ant uses XML build files to describe what to build, in each build.xml file contains project this project is divided into targets and these targets contains the tasks, you can still send mails through post and wait for one month to get reply, you can break the stone with traditional hammer but why do the things harder way? when you got email facility, you got stone crushing machines.
References:
Apache Ant
Why Ant is angry?
Standards to be followed while writing Build file
JAVA DEVELOPMENT with Ant by Erik Hatcher and Steve Loughran
Ant The Definitive Guide by Jesse Tilly and Eric M. Burke