Pages

Thursday, September 20, 2012

Ant Vs Maven

Well this has been a highly debated topic among java developers. Some prefer ant while other maven. So what is the better build tool.

Imho i think both have their advantages and disadvantages. if you use ant

  • your project directories are not predefined, therefore flexible. You can build the project in your own way.
  • Unlike maven you do not need internet to work.
  • Unlike maven there will be no conflicting jar downloads or broken dependencies since developer him/her self mentions adds the libraries.
  • But you need to manage the dependencies of the dependencies which sometimes is a headache.
  • Easy setup and usage.
  • Not the best tool if the project is huge.
  • Support for managing versions of dependencies and the project it self is not good.
Let's see the maven facts
  • You can just put dependencies in the pom.xml file and maven will download it for you.
  • You do not need to manage dependencies of dependencies, since maven automatically handles it.
  • You can manage versions of the project, dependency versions easily.
  • Good if the project is large.
  • Project structure is not flexible. You will have to go with default maven structure.
  • You have to have internet to work with.
  • There may have broken dependencies.
yes as you see both has it's own advantages and disadvantages. However as a java developer I believe you need to learn both the build tools since the type of tool you need to work with will vary from project to project. In my case it's 50-50. So I wouldn't fancy only one build tool but both.

No comments:

Post a Comment