Difference between Ant and Maven.

Ant and maven both are build tools.They both can be used for compile, pulling dependence from repository and for creating war or ear files. Both are provided by the Apache.

Ant is a tool and it doesn't have formal conventions. If you are using Ant then you have to tell what to do in XML files therefore it can't be used in different types of project setup.

Maven is framework and it can also  act as a dependency management tool. It is declarative build tool so everything we can define in the pom.xml. 

Sr. No.KeyMavenAnt
Maven is a build automation framework based on the concept of a project object model(pom)
Ant is a Java library and command line tool whose can be used to compile your code, fetching dependencies and for packaging
It is framework
It is a tool box.
It has lifecycle.
It has no lifecycle . In ant each task is independent and we'll defined
It is declarative
It is procedural

Updated on: 09-Sep-2020

1K+ Views

Kickstart Your Career

Get certified by completing the course

Get Started