aspose file tools*
The moose likes Ant, Maven and Other Build Tools and the fly likes ant or maven Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » Ant, Maven and Other Build Tools
Bookmark "ant or maven" Watch "ant or maven" New topic
Author

ant or maven

sam liya
Ranch Hand

Joined: Nov 25, 2008
Posts: 1225
what are the diffeerences/benifits of ant and maven?
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 16308
    
  22

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!


Customer surveys are for companies who didn't pay proper attention to begin with.
Vivek Singh
Ranch Hand

Joined: Oct 27, 2009
Posts: 92
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

Joined: Nov 03, 2009
Posts: 47
@ Vivek
http://www.sonatype.com/books/maven-book/reference/
Follow this link and download ebook for maven.
Martijn Verburg
author
Bartender

Joined: Jun 24, 2003
Posts: 3274
    
    5

And welcome to Javaranch Abhijit Kamatkar!


Cheers, Martijn - Blog,
Twitter, PCGen, Ikasan, My The Well-Grounded Java Developer book!,
My start-up.
Rajubhai Kotwal
Ranch Hand

Joined: Nov 03, 2009
Posts: 47
@ Martijn Verburg

Thank you very much.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: ant or maven