ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hanasaki <hanas...@hanaden.com>
Subject Re: ant 1.6.1 and using variable substituion in depends="${__}"
Date Sat, 24 Apr 2004 05:10:03 GMT
Hello Bill,

Guess I did a bad job explaining what I wish to do.  The goal is not to 
have conditional target execution.  The goal is to specify the depend 
target dynamically with a property that was set elsewhere.

Bill Rich wrote:
> If you just want to know if the property has a value set or not you can use if or unless.
> 
> <target name="Target12" if="someVar" depends="someTarget"...
> would mean that if someVar had any value set Target12 would be fired while
> 
> <target name="Target12" unless="someVar" depends="someTarget"...
> would mean that if someVar had never been set Target12 would be fired.
> 
> There can be no dependence on what the value is when used like this.  Since properties
are
> immutable if someVar is set or not set to any value at any time during the run the result
> is the same.
> 
> The target should also contain a "depends" for the target (someTarget) that can set the
> someVar property.
> 
> HTH
> 
> Bill Rich
> Wilandra Consulting LLC
> 1325 Addiewell Place
> San Jose, CA  95120-3905
> phone:      +1 408 268-2452
> mobile:     +1 408 410-9713
> Santa Cruz: +1 831 464-9007
> fax:        +1 413 669-9716
> billrich@wilandra.com or billrich@attglobal.net
> http://www.wilandra.com
> 
> -----Original Message-----
> From: hanasaki [mailto:hanasaki@hanaden.com]
> Sent: Friday, April 23, 2004 6:58 PM
> To: user
> Subject: ant 1.6.1 and using variable substituion in depends="${__}"
> 
> 
> Any way to use a variable/property in a depend like:
> 
> <target name="Target12" depends="${someVar}
> 
> thanks
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
> 

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


Mime
View raw message