ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bell, Aaron" <Aaron.B...@bskyb.com>
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.

Cheers
- Aaron

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


-----Original Message-----
From: Jacob Kjome [mailto:hoju@visi.com]
Sent: Friday, November 14, 2003 5:29 AM
To: user@ant.apache.org
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...

http://issues.apache.org/bugzilla/show_bug.cgi?id=23942
http://marc.theaimsgroup.com/?l=ant-dev&m=106664032815130&w=2
http://marc.theaimsgroup.com/?l=ant-user&m=106674668723133&w=2

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

Jake


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



.


-----------------------------------------------------------------------
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: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Mime
View raw message