On Fri, Aug 22, 2008 at 11:03 AM, Eric Wood <[EMAIL PROTECTED]> wrote:
> I have a target that I only want to execute if a property is set, but it
> executes the dependencies regardless.

Yes, the dependencies to get hit before the test is done. There's a
reason for that:


<target name="foo"
    depends "foo-test"
    if='foo-test-passes"/>

<target name="foo-test">
<condition property="foo-test-passes"
     <some condition>
</condition>

This allows me to run my target "foo", but only if I pass the
"foo-test". Otherwise, there would be no easy way to run a target
based upon a more complex condition than whether a particular property
is set or not.

Your work around is pretty much the way to make sure that you don't
run dependencies if the target is not suppose to be executed.

--
David Weintraub
[EMAIL PROTECTED]

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to