ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From peter reilly <peter.rei...@corvil.com>
Subject Re: How to concatenate two strings?
Date Mon, 15 Sep 2003 08:33:11 GMT
You need to do:
<copy todir="../backup/dir">
  <fileset dir="src_dir"/>
  <filterset>
     <filter token="DIR" value="${example.dir}${file.separator}properties"/>
  </filterset>
</copy>

Peter

On Monday 15 September 2003 09:27, David Leal Valmaa wrote:
> Dear Members,
>
> I would like to replace some token with a value that I construct appending
> dynamically some information, for example:
>
> <copy todir="../backup/dir">
>     <fileset dir="src_dir"/>
>     <filterset>
>       <filter token="DIR" value="${example.dir} + @{file.separator} +
> properties"/> </filterset>
>   </copy>
>
> I would like to obtain something like this:
> c:\temp\example\properties
>
> instead I get, something like this:
> c:\temp\example + \ + properties
>
> so, it doesn't interpret the symbol +, as adding two strings.
>
> doing:
>
> <filter token="DIR" value = "${example.dir}" + "@{file.separator}" +
> "properties"/>
>
> gives a parser error:
>
>
>     BUILD FAILED
> file:/export/env/ams/WORK_DIR/webapps/desar/WEB-INF/ant/build.xml:96:
> Element type "echo" must be followed by either attribute specifications,
> ">" or "/>".
>
> Thanks in advance,
>
> David
>
>
>
> ---------------------------------
>
>
> David Leal Valmaña
>
> Tel
>
> 91 210 33 00 ext. 71 923
>
> Fax
>
> 91 597 05 62
>
> e-mail
>
> dleal@soluziona.com
>
> Soluziona, Grupo Unión Fenosa
>
> Calle Pedro Texeira 8 2da Planta. Madrid 28020
>
>
>
>
>
>
> ---------------------------------
> Do you Yahoo!?
> Yahoo! SiteBuilder - Free, easy-to-use web site design software


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


Mime
View raw message