ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Steve Loughran" <>
Subject Re: "Call" task
Date Fri, 07 Mar 2003 00:18:46 GMT

----- Original Message -----
From: "Dale Anson" <>
To: "Ant Users List" <>
Sent: Thursday, March 06, 2003 14:01
Subject: "Call" task

> Just sharing --
> A common question on this list is how to get a property set in a target
> after doing an <antcall>, the common answer is "you can't". I wrote a
> very simple task, so simple in fact that I've included the complete code
> below. Like AntCall, this task just calls a target in the current build
> file. The difference is that all properties from the calling target are
> available to the called target, and any properties set by the called
> target are immediately available in the calling target. Makes me wonder
> why AntCall wasn't written like this?

Because the authors didnt want it that way?

Right now <ant> and <antcall> effectively take a new environment down with
them. If you set all properties by the called target then you cannot <ant>
the same target twice and be sure it works, because in ant you cannot
overwrite properties.

View raw message