ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Nico Seessle" <>
Subject Fw: Using "if" in a target?
Date Sun, 17 Sep 2000 21:55:41 GMT
----- Original Message -----
From: "Diane Holt" <>
To: <>
Sent: Sunday, September 17, 2000 11:35 PM
Subject: Re: Using "if" in a target?

> So "if" just checks to see if a property exists, not whether it's actually
> set to anything? And the fact that I pass a define for the p4client
> property, even though there's no value for it, makes that property "exist"
> for ant? So, is there no way to test whether a property actually has a
> value?

Should this be "fixed" in some way?

The following could be done
1. If -Dname= is passed to ant assume that the user don't want to set this
property (may break build-files)
2. Require the property specified for if=""/unless="" to contain one of the
"boolean-values" "yes", "on" or "true" (this will break build-files, at
least mine :-) )
3. Require the property specified for if=""/unless="" to contain anything
other than nothing (the empty string) (for if)  and dont't just check for
non-existence Or check for containing nothing or being non-existent (for
unless). (should not break so much; not mine and not ant's build-file). If
you use the available-task which seems the most common way to me the
property is set to "true" if you don't specify somethng else so this should
not be a problem.


View raw message