Friday, September 28, 2012

Maven Vs Apache Ivy + Ant ?

It's Obvious any project needs a build file...

Would you choose Maven Vs Ant + Ivy ?

Let's understand, what are the general expectation on a build library/solution ?

  1. Dependency management of libraries - Meaning, no need to keep the libraries/jars checked in to your repository, it can be as simple as defining in an external file Ex: Pom.xml / ivy.xml.
  2. Ability to build the application(.war, .ear etc.) - Meaning ability to write scripts to assemble/package an application. Ex: build.xml (Ant), assemble.xml (maven) etc.
To make an apple to apple comparison maven has to be compared with Ivy &  Ant, since maven taken care of both expectation mentioned above.

Pros & Cons,

  1. With Maven less scripting, put the files in the right folder as indicated by the maven archetype.
  2.  With Ant + Ivy, you still have to write your build file !!! Advantage is you can have a flexible folder structure & need not be restricted as in maven archetypes.
I kind of like Ant + Ivy combination, considering the flexibility of structure definition. But "With great powers, comes great responsibility" more scripting can cost you more, hmm.

Think about it !!!

Comments & your experience most welcome !



2 comments:

Deepan Karthik said...

How about gradle?. I hope gradle also simple to use. easy to manage dependencies. Also taken care of both expectation. Is it?

Senthil Balakrishnan said...

We use Gradle in my project, it's definitely a strong alternative to ant/maven.