I realize it’s been out for over a year, but Ant 1.6 is a huge improvement over previous versions. Macros and imports make life so much easier when writing complex build scripts. I especially love the ability to simulate Maven-like pre- and postGoals with the import feature. It’s even more flexible than Maven in this regard, as Maven doesn’t allow preGoals and postGoals to have prequisites.
Ant-contrib has some nice tasks that make writing ant files easier. It makes ant more like a scripting language than a makefile, but sometimes pragmatism has to win out over purity.
I’ll save comments about Ivy for another post. Needless to say, I’m pretty pleased.
As expected, our build times with ant (especially when running automated tests) are now significantly faster than they were with Maven, and without that out-of-memory annoyance. A comment from Scott Farquhar suggested that Maven, like Ant, could also have its unit tests configured to run in a single, separate thread. That this option is not listed in the maven documentation for this feature is, I feel, representative of the sad state of Maven plugin documentation. However, when I actually tried this on a branch that still has the maven build running, the majority of the unit tests failed due to a LinkageError when loading the Node class. Google suggests others have run into this issue, as well. At this point, I refuse to read another line of Jelly to figure out a problem in a build we no longer support.
The biggest downside to this change is that we’ve lost all the features that came for free from the default set of Maven plugins. I’ve been able to get the important features (such as war file generation, JSP compilation, and appserver installation and control) replaced with some custom ant import files. I’m currently working on a replacement for the Intellij IDEA maven plugin.
For any Maven lovers who may stumble upon this post: I have no doubt that Maven works amazingly well for you, and chances are quite good that the reason I couldn’t get it to work the way I wanted is because I’m a moron.
I’m fine with that. I hope you are too.