ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bell, Aaron" <>
Subject RE: macrodef and properties
Date Fri, 14 Nov 2003 08:51:09 GMT
Hi Jacob,

I have come across this. From the Ant manual (Property Task):

"Properties are immutable: whoever sets a property first freezes it for the
rest of the build; they are most definately [sic] not variable."

Here we see a feature of macrodef: it is not like a function call. It does
not have 'local' variables.

I don't think basic property behaviour will be changed. If you want local
variables - i.e. a property given a different value on each target call -
you must use antcall.

- Aaron

Aaron Bell
CRM Release Management
int tel. 5448
ext tel. (01506) 485448

-----Original Message-----
From: Jacob Kjome []
Sent: Friday, November 14, 2003 5:29 AM
Subject: macrodef and properties

I have a macrodef where It does some work, then does a <pathconvert> which 
stores the result in a property, then something else uses that property 
value.   When I make calls to this, the first call works fine, but 
subsequent calls use the previously set property which, apparently, is set 
globally in the build.  This isn't very useful at all.  Is this going to be 
changed.  I saw the following conversations, but I'm not completely sure if 
the issues raised/fixed there affect my issue...

Will the stuff in bug 23942 solve my issue?  If so, when is this patch 
going to be applied?  I'm using the latest 1.6 CVS.  Is my only workaround 
using <antcall>?  Wasn't the whole point of <macrodef> to get rid of the 
necessity for <antcall>?


To unsubscribe, e-mail:
For additional commands, e-mail:


Information in this email may be privileged, confidential and is 
intended exclusively for the addressee.  The views expressed may
not be official policy, but the personal views of the originator.
If you have received it in error, please notify the sender by return
e-mail and delete it from your system.  You should not reproduce, 
distribute, store, retransmit, use or disclose its contents to anyone.
Please note we reserve the right to monitor all e-mail
communication through our internal and external networks.

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message