• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Should I master a build tool?

 
Hussein Baghdadi
clojure forum advocate
Bartender
Posts: 3479
Clojure Mac Objective C
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 5852
7
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Moving to the build tools forums...
 
Hussein Baghdadi
clojure forum advocate
Bartender
Posts: 3479
Clojure Mac Objective C
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sorry, I missed the right forum.
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 34071
331
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ant is *substantially* easier to master than Maven, IMO. Ant is simplistic, procedural, obvious. Maven... not so much.
 
Martijn Verburg
author
Bartender
Posts: 3275
5
Eclipse IDE Java Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Tim Holloway
Saloon Keeper
Pie
Posts: 17989
47
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Hussein Baghdadi
clojure forum advocate
Bartender
Posts: 3479
Clojure Mac Objective C
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 3479
Clojure Mac Objective C
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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).
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic