ant me harder
Geek
Speaking of Ant, why on earth is Ant not forwards compatible? Why does it not even attempt to try?
A library I need to use does not come with Javadocs pre-built (this is the same library that has a massive API and likes to make massive API changes between, say, version 1.0.0-pre2 and 1.0.0-rc1 - talk about making developer's lives harder) so I need to build them myself. The download comes with source and an Ant build file (in a non-standard place, of course; it couldn't be that easy) so I should just be able to build the documentation. But no, the new version of the library also now uses an Ant 1.6-specific attribute on the javadoc task and I am working with Mac OS X, which comes with Ant 1.5.3. The attribute is completely unessential; some fluff about generating links to something-or-other. So why does ant 1.5 then refuse to build the target?
Now, Ant uses an XML build file. XML defines a strict error-handling rules. This is a good thing, because you do not have to deal with HTML-like tag soup (unless you are reading RSS feeds; in which case it seems like everyone who writes feed-generating software is in some sort of competition to see who can generate the most invalid, least well-formed stream of data possible and still have such a lack of timidity as to still call it XML). But none of this means an application that uses XML needs to be equally as anal. Especially one that often extends its schema as often as Ant does, or that gets used for so many different projects, as Ant does.
I guess I could just upgrade Ant (but apparently 1.6 breaks JUnit tests somehow and I do not want to fight that battle right now) or I could edit the build file to remove the offending attribute (which is what I did), but why should I have to? Especially for an attribute that is optional in 1.6. Sigh.
Forward compatibility people! It is not that hard and makes your user's lives much, much easier.
Comments
I'm seriously unimpressed with ant. When I was at Deutsche, we were trying to write extensions for it to allow it to do deploys to the product's architecture. It works fine for simple things, btu as soon as you try to extend it in a serious way you run into all sorts of nasty limitations that you have to work around. Also.. I just find it quite difficult to get things to work. Today I was trying to do this..
{snippet of code was here describing an attempt to get a war task to exclude some files, helpfully snipped by the wiki engine}
src and target were directories under build. I fiddled with it for ages and ... it just ignored me and kept including that stuff in the war. Either I'm crazy, or else it's quite buggy, because I've run into these situations with it before. It's possible I'm crazy, but I went away from it and came back and had a fiddle well past the usual point at which you realise you made a stupid typo and get it fixed.
Posted by: Craig Turner on June 7, 2005 10:15 PM
Having said all that.. I haven't found anything better. I much prefer ant and my usual command line browsing and text editor of choice over any of the IDEs. Eclipse is nice, but there are still lots of situations where I feel like I have to fight it to make things happen, particularly when there are multiple people working on a project, or where you bring an existing project into eclipse during its development.
Ant is far better than IDE build systems or make.
Now there's an interesting complement.
Posted by: Craig Turner on June 7, 2005 10:21 PM
Add a Comment