What's Apache Ant, Apache Maven, What's the Difference?

By Xah Lee. Date: . Last updated: .

What is the difference between Apache Ant and Maven?

Both are for compiling/building Java software.

Apache Ant is like unix make, but using XML as build file (named build.xml). You have to tell it exactly what to do, like, source dir, target dir, make dir, delete dir, compile this file, etc.

Apache Maven is more modern. It also uses XML as config file (named pom.xml). By default it assumes a common project directory structure by convention.

Ant is much simpler. Maven is a framework.

more detail: http://stackoverflow.com/questions/603189/differences-between-ant-and-maven

What's Apache Ant?

Apache Ant logo
Apache Ant logo, designed by Nick King

Apache Ant is a software tool for automating software build processes. It is similar to Make but is implemented using the Java language, requires the Java platform, and is best suited to building Java projects.

The most immediately noticeable difference between Ant and Make is that Ant uses XML to describe the build process and its dependencies, whereas Make uses Makefile format. By default the XML file is named build.xml.

from Wikipedia Apache Ant

Apache Ant home page at http://ant.apache.org/

What's Apache Maven?

Maven logo
Apache Maven logo

Maven is a build automation tool used primarily for Java projects. Maven addresses two aspects of building software: First, it describes how software is built, and second, it describes its dependencies. Contrary to preceding tools like Apache Ant it uses conventions for the build procedure, and only exceptions need to be written down. An XML file describes the software project being built, its dependencies on other external modules and components, the build order, directories, and required plug-ins. It comes with predefined targets for performing certain well-defined tasks such as compilation of code and its packaging. Maven dynamically downloads Java libraries and Maven plug-ins from one or more repositories such as the Maven 2 Central Repository, and stores them in a local cache.[3] This local cache of downloaded artifacts can also be updated with artifacts created by local projects. Public repositories can also be updated.

from Wikipedia Apache Maven

http://maven.apache.org/