Mr Evans
Hard to believe that anyone would name a file @filename
I would suggest downloading and isntalling ant-contrib
http://sourceforge.net/projects/ant-contrib

then constructing the filename with special characters to a mutable variable
http://ant-contrib.sourceforge.net/tasks/variable_task.html

and then assign your build.xml immutable property ${root-filename} to the
constructed mutable variable

then using it in your macrodef
file=${root-filename}

Understand?
Martin-
----- Original Message ----- 
From: "Laran Evans" <[EMAIL PROTECTED]>
To: "Ant Users List" <[EMAIL PROTECTED]>
Sent: Wednesday, December 08, 2004 1:47 PM
Subject: Macro param issue with dirname


> So what's wrong with this? Intellij tells me that the @{root} in
> file="@{root}" on line 4 is not allowed.
>
> Does the string value of the param not properly get interpreted as a file?
>
>    <macrodef name="auto-deploy-web-app">
>      <attribute name="root"/>
>      <sequential>
>        <dirname property="auto-deploy-app-name" file="@{root}"/>
>        <copy todir="${my.dir.auto-deploy}">
>
>        </copy>
>      </sequential>
>    </macrodef>
>
>
> -- 
> Laran Evans - Cornell University
> p: (607) 255-6864 f: (607) 255-0327
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to