Hello Dominique, Ok, then how can I wrap the <input ...> in a conditional to make it prompt for input if, and only if, the property "subprojectskip" does *not* exist?
Jake Monday, September 09, 2002, 1:17:20 PM, you wrote: DD> Haven't read till the end, but by design target's run their dependencies DD> (targets listed in the 'depends' attribute) before evaluating the DD> 'if'/'unless'. Confusing yes, but by design. --DD DD> -----Original Message----- DD> From: Jacob Kjome [mailto:[EMAIL PROTECTED]] DD> Sent: Monday, September 09, 2002 1:15 PM DD> To: Ant Users List DD> Subject: odd behavior on <target ... unless="someproperty"> DD> Hi, DD> I'm using Ant-1.5.1beta1. DD> I'm having an issue with a target running its dependencies even though DD> unless="someproperty" is specified on that target *and* the DD> "someproperty" was specified on the command line as DD> "-Dsomeproperty=true". DD> Here is the relevant Ant code... DD> <target DD> name="specify.subproject" DD> unless="subproject" > DD> <input DD> message="Please enter the subproject. eg... DD> [all|dbroggisch|other...]:" DD> addproperty="subproject" /> DD> </target> DD> <target DD> name="specify.subtarget" DD> unless="subtarget" > DD> <input DD> message="Please enter the subtarget. eg... DD> [all|clean|compile|install|remove]:" DD> addproperty="subtarget" /> DD> </target> DD> <target DD> name="specify.property.control" DD> unless="subprojectskip" DD> depends="specify.subproject,specify.subtarget" /> DD> <target DD> name="check.subproject.control" DD> depends="specify.property.control" > DD> .... DD> .... DD> .... DD> </target> DD> So, when the "check.subproject.control" gets called, it runs its DD> dependency first which is "specify.property.control", which should DD> skip its dependencies of "specify.subproject" and "specify.subtarget" DD> if the property "subprojectskip" exists which it does when entered on DD> the command line such as... DD> ant -Dsubprojectskip=true contrib DD> However, both the "specify.subproject" and "specify.subtarget" targets DD> get invoked and prompt me for input. I want to be able to disable DD> prompting for input and it seems like what I'm currently doing should DD> properly disable it, but it doesn't seem to work. DD> Am I missing something here? DD> The other weird thing about this is that if I do the following, I DD> don't get prompted: DD> ant -Dsubproject=dbroggisch -subtarget=compile contrib DD> So, the "unless" on "specify.subproject" and "specify.subtarget" seem DD> to be honored....although they don't have dependencies so maybe if I DD> added dependencies I would see the same behavior of those dependencies DD> running when they shouldn't just like in "specify.property.control". DD> Any ideas? Have I discovered a bug in Ant-1.5.1beta1? DD> Jake -- Best regards, Jacob mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
