ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Michael Sunde" <msu...@actional.com>
Subject RE: Use of macrodef
Date Sat, 24 Jan 2004 02:29:38 GMT
Hi,

Have you tried using lower case: anothervalue

Michael

> -----Original Message-----
> From: Glebow, Philip BGI SF [mailto:Philip.Glebow@barclaysglobal.com]
> Sent: Friday, January 23, 2004 9:18 PM
> To: Apache Ant User Mailing List (E-mail)
> Subject: Use of macrodef
> 
> 
> Hello,
> 
>   I'm having difficulty using macrodef in Ant 1.6.  It seems 
> to support only one attribute and I need two or more.  Here 
> is an example of my macrodef:
> 
> ================================================
> <macrodef name="phil">
>   <attribute name="value"/>
>   <sequential>
>     <echo message="@{value}"/>
>   </sequential>
> </macrodef>
> ================================================
> 
>   Which I call it from this target:
> 
> ================================================
> <target name="philTest">
>   <phil value="Barclays"/>
> </target>
> ================================================
> 
>   It yields the following output:
> 
> ================================================
> philTest:
>      [echo] Barclays
> 
> BUILD SUCCESSFUL
> Total time: 1 second
> ================================================
> 
>   However, when I alter the macrodef like this:
> 
> ================================================
> <macrodef name="phil">
>   <attribute name="value"/>
>   <attribute name="anotherValue"/>
>   <sequential>
>     <echo message="@{value}"/>
>     <echo message="@{anotherValue}"/>
>   </sequential>
> </macrodef>
> ================================================
> 
>   and call it from this target:
> 
> ================================================
> <target name="philTest">
>   <phil value="Barclays" anotherValue="Global Investors"/>
> </target>
> ================================================
> 
>   I always get this message:
> 
> ================================================
> philTest:
> 
> BUILD FAILED
> E:\Module\gladis\Tools\wl7deploy.xml:321: required attribute 
> anotherValue not set
> 
> Total time: 1 second
> ================================================
> 
>   Am I doing something incorrectly or is this a bug?  Thanks.
> 
> Phil
>   
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
> 
> 

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


Mime
View raw message