ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Laconia Data Systems" <webmas...@laconiadatasystems.com>
Subject Re: Macro param issue with dirname
Date Thu, 09 Dec 2004 12:49:56 GMT
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" <lc278@cornell.edu>
To: "Ant Users List" <user@ant.apache.org>
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: 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