ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dominique Devienne" <ddevie...@gmail.com>
Subject RE: Help with (regexp?) file mapper
Date Mon, 27 Jun 2005 15:39:45 GMT
> From: Emmanouil Batsis [mailto:Emmanouil.Batsis@eurodyn.com]
> It didn't work at first but then i remembered my machine at work runs
> windows; It works fine after changing the from attribute to
> (.+)\\(.+).xml. I think i saw something regarding the path seperator and
> how to make it transparent to the task so i'll look for that now. Many
> thanks for giving me a head start!

Yes, you've run into the ugly bit in mappers, namely the fact that the
file separator changes on different platforms, compounded by the fact
that the Windows separator is a special character in regexp.

Just using ${file.separator} is not enough, because it yields just
\ and not the escaped form. (maybe using \${file.separator} would
be cross-platform).

I think I remember a fix was introduced to 'normalize' filenames to
forward slashes prior to mapping them. I don't recall the new attribute
name though (if it indeed exists). --DD


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


Mime
View raw message