--- Stefan Bodewig <[EMAIL PROTECTED]> wrote: > DH> I have a need to test if a property is set "true" or "false". > > How does the property get its value?
It gets set by a user env var -- it's used as a filter token replacement value for a template file that gen's a .java file. It replaces a token that stands in for a boolean value (hence: true|false). It's a boolean used for turning on/off debug code -- in other words, the java equivalent of #ifdef DEBUG :) And I wanted to be able to check the value in order to make a decision about what the output dir should be (ie., to allow the same source-tree to be compiled into two different output dirs -- one where the source has been compiled with debug available, the other without). I could diddle the output dir setting at the wrapper-script level, but I didn't think I could using <ant> (which I'd wanted to use in an auto-build that builds both flavors). But it's all become academic, because of a message I've only just now gotten around to receiving (which can't be explained by any logic, since it's from back in August). It was sent to the user list by David Weller -- the *hopefully soon to be* immortalized author of the "Ant for Mortals" doc. (David? - hullo?) The message is in the August archive: http://archive.covalent.net/jakarta/ant-user/2000/08/0210.xml It shows an example of re-setting a property value using <ant> -- which I swear I *tried* to use before, but couldn't get it to work (so I did this horribly hacky workaround, where I <exec> 'sh' with 'ant -D...' args -- I know, I know -- yuk!) Anyway, I've lifted his example, slotted my stuff into it, resetting not only the debug property but the output dir property as well, and it works like a champ. Go figure. So (once again :), I withdraw my request for something special just for me. Thanks, Diane ===== ([EMAIL PROTECTED]) __________________________________________________ Do You Yahoo!? Send instant messages & get email alerts with Yahoo! Messenger. http://im.yahoo.com/
