--- Scotte Zinn <[EMAIL PROTECTED]> wrote:
> As with the comma-separated list of targets for depends, the comma in
> the if would be AND operations.  The case where I came across it is a
> test that has two parameters that I wanted to externalize from the build
> spec itself.  I wanted the test to run whenever all of the other tests
> are run and only if these two parameters were both set.  As it stands
> now, the test has to be run specifically and if the parameters are not
> set, so be it, the test will fail.

It's probably unlikely that you'll get anything like this in Ant1, so you
could either do some local mods to Ant, or, since you only need to check
for two properties, you could do a little workaround and use if and unless
in combination -- eg:

<target name="runNeedyTest" depends="chkBar" if="foo" unless="bar.notSet">
  [tasks]
</target>
<target name="chkBar" unless="bar">
  <property name="bar.notSet" value="true"/>
</target>

Target "runNeedyTest" will only run if both "foo" and "bar" are set.

(P.S. Totally off-topic... anyone out there an HTML whiz? :)

Diane

>   -----Original Message-----
>   From: Jose Alberto Fernandez [mailto:[EMAIL PROTECTED]
>   Sent: May 19, 2001 10:40 AM
>   To: [EMAIL PROTECTED]
>   Subject: RE: Multiple properties in target's if/unless
> 
> 
>   And the meaning of the coma is? AND, OR, NAND. Does it means the same
> for
> "if" and for "unless".
> 
>   This is just a slippery slope....
> 
>   Jose Alberto
> 
>     -----Original Message-----
>     From: Scotte Zinn [mailto:[EMAIL PROTECTED]
>     Sent: Saturday, May 19, 2001 2:26 PM
>     To: [EMAIL PROTECTED]
>     Subject: Multiple properties in target's if/unless
> 
> 
>     I came across a need for multiple properties to be checked with a
> target's if clause and it wasn't possible.  I could do it using multiple
> targets, each with an if clause, but that really seemed cludgy.
> 
>     Is there another way of doing this?  Will Ant be extended to allow a
> comma-separated list of properties in the if/unless block similar to the
> depends clause?
> 
>     -- Scotte
> 
> 


=====
([EMAIL PROTECTED])



__________________________________________________
Do You Yahoo!?
Yahoo! Auctions - buy the things you want at great prices
http://auctions.yahoo.com/

Reply via email to