ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Stirling, Scott" <scott.stirl...@workscape.com>
Subject RE: accessing macrodef attribute variables in <script> code
Date Fri, 20 Feb 2004 19:24:21 GMT
> From: Jan.Materne@rzf.fin-nrw.de [mailto:Jan.Materne@rzf.fin-nrw.de]
> 
> You can access the properties by using @{name}. Inside a 
> script you have to do a
>    name = "@{name}";
> 
> But maybe have a look at <scriptdef>.

Shoot, you are right.  Thanks a lot.  I wasn't putting quotes around the attribute dereference.
 This does work.

Thanks,
Scott S.
Workscape

> > -----Original Message-----
> > From: Stirling, Scott [mailto:scott.stirling@workscape.com]
> > Sent: Friday, February 20, 2004 7:11 PM
> > To: Ant Users List
> > Subject: accessing macrodef attribute variables in <script> code
> > 
> > 
> > Hi,
> > 
> > Just wondering if this is a current limitation with code 
> > inside of <script>'s, and/or if there's a workaround.
> > 
> > I'd like to use a Beanshell <script> inside a <macrodef> to 
> > access the values of attributes set by the <macrodef>.  
> > Actually I am using the ant-contrib <for> task with a 
> > <script> task, but it should be the same for both.  Getting 
> > project properties inside a script is no problem with the 
> > project Java API, but what about getting macrodef attribute 
> > values in the scripting language of choice?

***********************************************************************
This message is intended only for the use of the intended recipient and
may contain information that is PRIVILEGED and/or CONFIDENTIAL.  If you
are not the intended recipient, you are hereby notified that any use,
dissemination, disclosure or copying of this communication is strictly
prohibited.  If you have received this communication in error, please
destroy all copies of this message and its attachments and notify us
immediately.
***********************************************************************


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


Mime
View raw message