File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Ant, Maven and Other Build Tools and the fly likes Should I master a build tool? 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 "Should I master a build tool?" Watch "Should I master a build tool?" New topic
Author

Should I master a build tool?

Hussein Baghdadi
clojure forum advocate
Bartender

Joined: Nov 08, 2003
Posts: 3479

Hey,
I'm pretty familiar with Ant and Maven and I have no problems using them both but should I master them both? or one is sufficient? (being a better programmer perspective).
Which build tool is easier to master, Ant or Maven?
Maybe I'm wrong but I think it is Maven.
Thanks for help and time.
Peter Johnson
author
Bartender

Joined: May 14, 2008
Posts: 5827
    
    7

Moving to the build tools forums...


JBoss In Action
Hussein Baghdadi
clojure forum advocate
Bartender

Joined: Nov 08, 2003
Posts: 3479

Sorry, I missed the right forum.
Jeanne Boyarsky
internet detective
Marshal

Joined: May 26, 2003
Posts: 30537
    
150

John,
It's likely you won't need to master them both as only one would be used in that depth on a given project.

As for which is easier, it depends on what you mean by "master." If you mean just using it, Maven is easier because there are less points to deal with. If you mean extending it and writing your own tasks/plugins, I'm under the impressions Ant is easier.


[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

Ant is *substantially* easier to master than Maven, IMO. Ant is simplistic, procedural, obvious. Maven... not so much.
Martijn Verburg
author
Bartender

Joined: Jun 24, 2003
Posts: 3274
    
    5

I think you'll need to learn both (anecdotal evidence shows that they are both popular). The Ant in Action and Maven Definitive Guide books will save you many times over.


Cheers, Martijn - Blog,
Twitter, PCGen, Ikasan, My The Well-Grounded Java Developer book!,
My start-up.
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 16065
    
  21

Actually, Ant is more upfront about things, since you have to explictly define each step in the build process. Maven does a lot of "magic", and I don't like magic. The flipside of that, however, it that you can do lots of different things (such as javadoc generation) without having to code them up in the project definition.

However, Maven is my preferred build tool these days for 2 reasons:

1. I have a lot of projects that pull in tons of standard libraries. Maven will do that automatically, and keep cached copies of the libraries so I don't have to have them replicating all over my fileystem. Ant doesn't do that out of the box - it needs help.

2. While I don't really like the Maven standard project directory organization all that much, it is standard, so I know that if I hand off a project to someone else, they'll know where everything is without having to puzzle out my/my employer's project idiosyncrasies.

An extra benefit to Maven came when I ran into a real show-stopped problem using Apache OpenJPA. I changed the dependency in the Maven POM to use Hibernate JPA, did a small mod to the JPA config file, and a "mvn clean package". Just that simple and I was back in the running. If it had been an Ant-based project, I would have had to fetch the Hibernate libraries AND make multiple changes to build.xml.


Customer surveys are for companies who didn't pay proper attention to begin with.
Hussein Baghdadi
clojure forum advocate
Bartender

Joined: Nov 08, 2003
Posts: 3479

Martijn Verburg wrote:I think you'll need to learn both (anecdotal evidence shows that they are both popular). The Ant in Action and Maven Definitive Guide books will save you many times over.

I'm familiar with the both Ant and Maven but I don't consider myself proficient, I like to know one and know it well.
Hussein Baghdadi
clojure forum advocate
Bartender

Joined: Nov 08, 2003
Posts: 3479

Tim Holloway wrote:Actually, Ant is more upfront about things, since you have to explictly define each step in the build process. Maven does a lot of "magic", and I don't like magic. The flipside of that, however, it that you can do lots of different things (such as javadoc generation) without having to code them up in the project definition.

However, Maven is my preferred build tool these days for 2 reasons:

1. I have a lot of projects that pull in tons of standard libraries. Maven will do that automatically, and keep cached copies of the libraries so I don't have to have them replicating all over my fileystem. Ant doesn't do that out of the box - it needs help.

2. While I don't really like the Maven standard project directory organization all that much, it is standard, so I know that if I hand off a project to someone else, they'll know where everything is without having to puzzle out my/my employer's project idiosyncrasies.

An extra benefit to Maven came when I ran into a real show-stopped problem using Apache OpenJPA. I changed the dependency in the Maven POM to use Hibernate JPA, did a small mod to the JPA config file, and a "mvn clean package". Just that simple and I was back in the running. If it had been an Ant-based project, I would have had to fetch the Hibernate libraries AND make multiple changes to build.xml.

What about Ant + Ivy?
I don't know but I don't like Ant so much, I find it is tedious to write and maintain build files and I don't know if it is handle complex projects easily.
On the other hand, Maven saves us a lot of typing and maintaining (maybe I'm lazy) but its performance isn't really great (Maven 3 supposed to boost performance as I read).
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Should I master a build tool?