Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

ant or maven

 
sam liya
Ranch Hand
Posts: 1240
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
what are the diffeerences/benifits of ant and maven?
 
Tim Holloway
Saloon Keeper
Pie
Posts: 18169
53
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
With Ant, you have total control over the project layout and how the project is built. The price is that you have to manually set everything up and you have to manually script the build.xml.

With Maven, you can often generate the project from an archetype, including the files needed to make it an Eclipse or IntelliJ project. Maven will automatically download and use (shared/cached) copies of dependency jars that you declare, and will then automatically do the same for any dependencies that those resources have. The price is that you have to adhere to Maven's directory structure (or get into a protracted fight with configurations), and there's no easy way to list the valid project goals like there is in Ant.

The Maven rigid directory layout isn't all bad. It does possess the virtue that you can pretty much depend on knowing where to find things in a project that gets dumped on you cold. Also, its heavy reliance on cached resources means that one Maven project I have zips (after cleaning) down to under 3MB, but when I do a "mvn install", results in the creation of a project of nearly 40MB. Since I periodically ship source snapshots out on a fairly slow datalink, I can definitely appreciate that!
 
Vivek Singh
Ranch Hand
Posts: 92
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
From where i can learn Maven or ANT.
Which is better to learn? Please provide some good links to learn the basics and learn scripting also.
 
Rajubhai Kotwal
Ranch Hand
Posts: 47
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
@ Vivek
http://www.sonatype.com/books/maven-book/reference/
Follow this link and download ebook for maven.
 
Martijn Verburg
author
Bartender
Posts: 3275
5
Eclipse IDE Java Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
And welcome to Javaranch Abhijit Kamatkar!
 
Rajubhai Kotwal
Ranch Hand
Posts: 47
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
@ Martijn Verburg

Thank you very much.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic