I just want to say, props to Mark on something that I will definitely be using in my own scripts, since it is the most elegant solution I have yet seen. I hope that this or something like it can be included in the distribution in the future.
Question to Mark: what would you think of something like this:
<switch property="foo" match="xyz"> ... </switch>
which would execute when ${foo} => "xyz", instead of being restricted to only testing for "true" or "false". That would greatly simplify creation of something like a build configuration file, since I wouldn't have to write a bunch of <condition ...><equals .../></condition>. I would be happy to attempt to write a patch for you if you like (assuming you like my idea at all :->).
Thank you!
Mark Dumas wrote:
Hello,
This is my first post so bear with me. I came up with a few custom Ant tasks/classes that have been very useful and I wanted to pass them along.
A Switch is a task container that tests for a condition represented by a property. If the property value is "true", inner tasks are executed depending on if they are identified in the pass and fail list properties.
This allows users to specify multiple switch conditions in a single target without the need for multiple, bulky targets.
The end result is a psuedo IF-THEN-ELSE construct.
Sections are very simple helpers to Switches although they can stand alone. The examples in the html files will explain it all I think.
Please view the readme.txt file for more details.
Thanks,
-Mark Dumas [EMAIL PROTECTED]
------------------------------------------------------------------------
-- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
-- Furthermore, I believe bacon prevents hair loss.
Peter Davis Developer, Speaklink Inc. [EMAIL PROTECTED]
