I was going to post a comment on Dion’s blog about his
entry on Maven
when I realized that Mike posted it for me…
In short, ant‘s <import> and <macrodef> are absolute life savers. They
have brought a lot of sanity into my build files, which I thought were already
pretty lean and mean:
- All my build files have shrunk a lot thanks to <macrodef> ("extract
- All the targets contain fewer commands, and they clearly state their
intent thanks to well-chosen names ("keep methods short").
- The macros contain a set of sensible defaults that make most of their
invocation straightforward and with rarely more than a couple of parameters
("program for the default case").
These rules of thumbs coupled with the following simple guidelines:
- Everything that may vary from an installation to another should go into
a build.properties, all the rest goes into your build file.
- Break down your build files logically (e.g. I like to have all the
macros defined in build-macros.xml and <import> it everywhere I need it).
… give me a feeling of empowerment and control over my infrastructure.
Another important point is that I only need to know two languages to find my
way in ant (Java and ant‘s XML) while Maven requires me to
learn four different languages: Java, ant‘s XML, Maven’s XML
and… gulp… Jelly.
I still like the idea behind Maven but even today, when I see that the same
criticisms we were hearing two years ago still crop up on a regular basis, it
doesn’t make me very confident on my ability to diagnose Maven meltdowns.