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 01:52:17 GMT
I've solved my need by defining yet another property that is based on the
value of two other properties.  I understand how Ant works in terms of this
now.

-----Original Message-----
From: Dominique Devienne [mailto:DDevienne@lgc.com]
Sent: Saturday, July 20, 2002 5:14 PM
To: 'Ant Users List'
Subject: RE: unless attribute doesn't prevent depends?


Can you please explain what you are really trying to achieve? this thread is
not making sense!

targets listed in the 'depends' atrtibute are always executed before
if/unless is evaluation. This allows the dependent targets to check for
things/stuff (using <condition> for example), and set or not properties
indicating to the original target whether it should execute. Confusing
perhaps, but by design (or lack thereof!).

As I said, explain in details what you want to achieve (not some contrived
example), and I'm sure we'll find a way to achieve that using Ant. --DD

-----Original Message-----
From: Chris Bailey [mailto:chris@codeintensity.com]
Sent: Saturday, July 20, 2002 7:05 PM
To: Ant Users List
Subject: RE: unless attribute doesn't prevent depends?


Of course that only half solves the problem because it only works if you can
do an "if - unless".  If you need two if conditions that doesn't work.  I
tried using 'if="prop1,prop2"' but it didn't seem to work - can anyone
verify if this is acceptable?

-----Original Message-----
From: Chris Bailey [mailto:chris@codeintensity.com]
Sent: Saturday, July 20, 2002 5:00 PM
To: Ant Users List
Subject: RE: unless attribute doesn't prevent depends?


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>



--
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