But you can already do that with ant-contrib's <if> task I understand, provided you can use 1.5 beta, and are willing to invest the effort of configuring them. But I agree, if/unless/os on more (if not all) tasks would be good too. --DD
-----Original Message----- From: Scott Ellsworth [mailto:[EMAIL PROTECTED]] Sent: Friday, June 07, 2002 1:12 PM To: Ant Users List Subject: Re: <echo> with if/unless - a request On Friday, June 7, 2002, at 08:37 AM, Dominique Devienne wrote: > Better yet, factor the conditions in a base class, and derive from it. > That way, you can add the conditions to any task you want that derives > from Task (basically simple tasks). Man - o - man, I would love to see this in more ANT tasks. Simple if support, like exists for targets, would make certain of my scripts a LOT cleaner - vis: <target jar-manifest if="jar.main-class"> <manifest> (the code to insert a main class) </manifest> <fileset ...> </target> <target jar-no-manifest unless="jar.main-class"> <fileset ...> </target> <target jar depends="jar-manifest, jar-no-manifest"" /> could just become <target jar > <manifest if="jar.main-class"> (the code to insert a main class) </manifest> <fileset ...> </target> This is still declarative in the sense that ANT likes, but I would not have to split targets into a gaziillion bits depending on what value I want sent to a single task in a larger target. Scott -- 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]>
