ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jacob Kjome <>
Subject odd behavior on <target ... unless="someproperty">
Date Mon, 09 Sep 2002 18:15:05 GMT


I'm using Ant-1.5.1beta1.

I'm having an issue with a target running its dependencies even though
unless="someproperty" is specified on that target *and* the
"someproperty" was specified on the command line as

Here is the relevant Ant code...

        unless="subproject" >

            message="Please enter the subproject. eg... [all|dbroggisch|other...]:"
            addproperty="subproject" />


        unless="subtarget" >

            message="Please enter the subtarget. eg... [all|clean|compile|install|remove]:"
            addproperty="subtarget" />


        depends="specify.subproject,specify.subtarget" />

        depends="" >


So, when the "check.subproject.control" gets called, it runs its
dependency first which is "", which should
skip its dependencies of "specify.subproject" and "specify.subtarget"
if the property "subprojectskip" exists which it does when entered on
the command line such as...

ant -Dsubprojectskip=true contrib

However, both the "specify.subproject" and "specify.subtarget" targets
get invoked and prompt me for input.  I want to be able to disable
prompting for input and it seems like what I'm currently doing should
properly disable it, but it doesn't seem to work.

Am I missing something here?

The other weird thing about this is that if I do the following, I
don't get prompted:

ant -Dsubproject=dbroggisch -subtarget=compile contrib

So, the "unless" on "specify.subproject" and "specify.subtarget" seem
to be honored....although they don't have dependencies so maybe if I
added dependencies I would see the same behavior of those dependencies
running when they shouldn't just like in "".

Any ideas?  Have I discovered a bug in Ant-1.5.1beta1?


Best regards,

To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

View raw message