Tuesday, 26 April 2016

Ant vs. Maven vs. Gradle


Ant

+ Simple to learn
+ Popular

- No convention ; Need to define the project layout (structure)
- XML becomes complicated and unmanageable for long term project

Use Ant when :

  • No need of dependency management
  • Quick development of project
  • Legacy project unfit for Maven convention


Maven

+ Dependency management

  • Just declare dependencies, Maven will download them over the network (Like, Ant+Ivy)
  • Also manage Dependencies of the dependencies (Transitive dependencies)

+ Has convention to write configuration ; No need to provide project structure
+ has a Life cycle

- Dependencies cannot handle well conflicts between different versions of same library
- Difficult to write complex scripts and customized tasks

Use Maven when : 
  • Product development, to manage multiple versions and branches 
  • Several teams working on dependent modules


Gradle

+ combines good parts of both tools
+ Life cycle like Maven
   Compile, Static analysis, Testing, Packaging and deployment
+ Doesn't use XML
+ Short and clear script

No comments:

Post a Comment

Note: only a member of this blog may post a comment.