ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Burgess, Benjamin" <BBurg...@tiaa-cref.org>
Subject RE: using multiple properties in the 'if' and 'unless' conditions
Date Mon, 26 Jun 2006 13:44:09 GMT
Here is a simple example showing how flexible, easy, and legible this
is:

	<target name="-myTarget.init">
		<condition property="somethingANDsomethingelse">
			<and>
				<isset property="something"/>
				<isset property="somethingelse"/>
			</and>
		</condition>
	</target>
	
	<target name="myTarget" depends="-myTarget.init"
if="somethingANDsomethingelse">
		<dosomething/>
	</target>

This provides all the functionality needed; I would be against further
complicating Ant for maintainers and users by adding complex new
unnecessary features.

Ben

-----Original Message-----
From: Dominique Devienne [mailto:ddevienne@gmail.com] 
Sent: Thursday, June 22, 2006 5:31 PM
To: Ant Developers List
Subject: Re: using multiple properties in the 'if' and 'unless'
conditions

It's believed that you can easily combine the various conditions in
one <condition>, that sets a single property based on as complex a
logic as <condition>'s nested <or>/<and> allows, so it's not
necessary.

When you remember that targets listed in 'depends' are executed before
'if' / 'unless' are evaluated, you can easily execute the <condition>
before the target and test if/unless on its results.

--DD

On 6/22/06, Paul.Mackay@nokia.com <Paul.Mackay@nokia.com> wrote:
> Hello,
>
> Has the possibility of adding multiple conditions to the target 'if'
and
> 'unless' attributes ever been considered? Are there any reasons why
this
> change would be a bad idea?
>
> cheers
>
> paul
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org



**************************************************************
This message, including any attachments, contains confidential information intended for a
specific individual and purpose, and is protected by law.  If you are not the intended recipient,
please contact sender immediately by reply e-mail and destroy all copies.  You are hereby
notified that any disclosure, copying, or distribution of this message, or the taking of any
action based on it, is strictly prohibited.
TIAA-CREF
**************************************************************


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org


Mime
View raw message