Ant vs Maven
Specification | ANT | Maven |
---|---|---|
Formal Convention(project directory structure) | Instructions have to be given to the Ant about source location and output path. | Maven knows source code directory and byte code in classes and produces a JAR file in target. |
Procedural | Ant is imperative and follows a procedure to perform tasks. | Maven is declarative. If pom.xml file is created and source file is saved in a default directory, Maven will take care of the remaining tasks. |
Life Cycle | Goals and goal dependencies have to be defined. | Install command will execute the default plug-in goals like compile and creating jar. |
Speed | Faster than Maven. | Slow. |
Incremental Compilation Support | Compiles the sources that are modified. | Compiles all the sources. |
Tool Type | Ant is a Build Tool. | Maven is a Project Management Tool. |
Re-usability | Scripts are not re-usable | Plug-in builds are highly reusable. |
Transitive Dependencies Support | Not possible. | Maintains dependencies of dependency. |
Ideal use | Controlling build process is the ideal use. | Managing dependencies and building articrafts is the ideal use. |
Complexity | Ant is Complex | Maven is less complex than Ant. |