Thursday, 26 June 2008

Friendly if/then constructs in ant

Sometimes I wonder if a post is interesting to me because it is new to me but everyone else already knows about it.

Anyway, here goes. I wanted to do an If/else test in my build file and the < condition> construct produced some unbelievably ugly code. After considerable hunting I found ant-contrib.sourceforge.net


This has got a range of new constructs. The manual pages are here
My problem was that I wanted to test if a property had been set and to one of two specific values. This is what I ended up with.

1 comment:

Andy Kayley said...

This was/is in the build.xml file in the es code base, you must have escaped from looking at that.