ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jan.Mate...@rzf.fin-nrw.de
Subject RE: accessing macrodef attribute variables in <script> code
Date Fri, 20 Feb 2004 18:14:26 GMT
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>.


Jan

> -----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?
> 
> Thank you,
> Scott Stirling
> Workscape, Inc.
> 
> **************************************************************
> *********
> 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
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message