ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Matthew Inger <ma...@sedonacorp.com>
Subject Re: [antlist] modifying a property value
Date Mon, 30 Jul 2001 18:18:32 GMT
Aha, yes, but property changes are not filtered back up through antcall.
In order for you to achieve the desired affect you have to either:

1) force the call to the other target by putting in the list of "depends"

or

2) write a task that will call another target and allow you to filter values
    back up.  If anyone is interested, i have written such a task, which 
mostly
    is a duplicate of antcall with some stuff removed that wasn't necessary
    for what i was doing, but it lets you specify properties which will be
    filtered back up:

        <call target="mytarget">
          <param name="something" value="somevalue" />
          <returnvalue name="ReturnValueProp" />
        </call>

    and you can specify as many properties as you want to filter up, but
    you have to explicity declare which ones, and they always take on the
    same property name (ie, you can't say take property x, and filter it 
back
    up as property y), though I suppose that wouldn't be too difficult 
to support,
    but i'd rather not.

if you're interested, i'll mail you the task.

personally, i would like to see something like this in the ant core, but i'm
willing to bet that it'll be to "programmery" in nature, and will get shot
down.



Samson, Lyndon [IT] wrote:

>If you use antcall, all tasks descended from the called task have the value
>of the new property. 
>
>-----Original Message-----
>From: T Master [mailto:tmaster@iknowledgeinc.com]
>Sent: Friday, July 27, 2001 5:30 PM
>To: ant-user@jakarta.apache.org
>Subject: [antlist] modifying a property value
>
>
>Apologies if this has been brought up before....
>
>I have a property, location,  set to value "foo".
>I use this in target "fetch", that uses property location.
>I have another target "backup", that needs to call target "fetch", but give
>location a different value.
>
>Is this possible?  How?
>
>T Master
>




Mime
View raw message