ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Chris Bailey" <ch...@codeintensity.com>
Subject RE: unless attribute doesn't prevent depends?
Date Sun, 21 Jul 2002 00:00:06 GMT
So, it appears that a workaround is to specify both an if and unless to a
target.  e.g.:

<target name="wrapper" depends="subtarget" unless="prop1">

<target name="subtarget" if="prop2" unless="prop1">

-----Original Message-----
From: Shackelford, John-Mason [mailto:ShacJo@ncs.com]
Sent: Saturday, July 20, 2002 4:31 PM
To: 'Ant Users List'
Subject: RE: unless attribute doesn't prevent depends?


Chris,

> if I have an unless attribute for a target,
> that the depends for that target
> always get executed (even if the unless indicates
> that the target should not execute).

I am afraid this is how ant works. You'd need to add the same condition to
all dependencies.


John-Mason Shackelford

Software Developer
NCS Pearson - Measurement Services
2510 North Dodge St.
Iowa City, IA 52245
319-354-9200x6214
shacjo@ncs.com

> -----Original Message-----
> From: Chris Bailey [mailto:chris@codeintensity.com]
> Sent: Saturday, July 20, 2002 6:30 PM
> To: Ant Users List
> Subject: RE: unless attribute doesn't prevent depends?
>
>
> I should note, I tried it with the release 1.5 as well.
>
> -----Original Message-----
> From: Chris Bailey [mailto:chris@codeintensity.com]
> Sent: Saturday, July 20, 2002 4:25 PM
> To: AntMailingList
> Subject: unless attribute doesn't prevent depends?
>
>
> I'm using Ant 1.5Beta3 on Linux.  It appears that even if I
> have an unless
> attribute for a target, that the depends for that target
> always get executed
> (even if the unless indicates that the target should not
> execute).  This
> seems incorrect to me.  Is this the case?
>
> This is a problem if you create a wrapper task that simply
> contains a list
> of depends (so that each of those depends can have their own
> if attribute,
> etc.).
>
> ____
> Chris Bailey       mailto:chris@codeintensity.com
> Code Intensity       http://www.codeintensity.com
>
>
> --
> To unsubscribe, e-mail:
> <mailto:ant-user-unsubscribe@jakarta.apache.org>
> For additional commands, e-mail:
> <mailto:ant-user-help@jakarta.apache.org>
>
>
>
> --
> To unsubscribe, e-mail:
<mailto:ant-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-user-help@jakarta.apache.org>

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



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


Mime
View raw message