I seem to remember there's an <if><else> task-nester in ant-contrib (or elsewhere) which allows this kind of thing. Its certainly been mentioned before on the ant-user list (not only since I've brought it up in the past ;-) ) I decided not to use it however, opting to use the task method instead. If you're interested, take a look through the archives. Here's an extract from -DD to prove it :)
[..snip] ....to the **conditional tasks** from ant-contrib on SourceForge. They have the advantage to be looked over by ANT commiters like Stefan Bodewig (I believe). They do require ANT 1.5 beta for proper operation I've heard too. They also are build by the Apache/Jakarta GUMP build if I recall a post from Stefan correctly. [..snip] Also Klaus Petzold posted his own <if> task to this list too. I dont think this is included in the core of ANT however. Cheers -Geoff -----Original Message----- From: Tibor Strausz [mailto:[EMAIL PROTECTED]] Sent: 15 August 2002 03:52 PM To: 'Ant Users List' Subject: RE: move dir if available ok like the hack :-) genarly speaking is it posible to skip a part of a target when some property is true or set or someting?? tibi > -----Original Message----- > From: Geoff Meakin [mailto:[EMAIL PROTECTED]] > Sent: Thursday, August 15, 2002 4:39 PM > To: Ant Users List > Subject: RE: move dir if available > > > Well as a bit of a hack you can move a null directory. > That is > > <move todir=""> > <fileset dir=""/> > </move> > > Which will do nothing (but it does attempt to self-referential move. > > How does this help, you might ask? > Well you can then use your <available> to define a property to be null > if the dir doesnt exist, or the dir name if it does, and then > apply this move task to it. This saves you doing another target. > > Cheers > -Geoff > > > -- > To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]> -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]> -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
