ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Matt Benson <>
Subject Re: Access source file from mapper
Date Mon, 11 Dec 2006 20:59:18 GMT
--- Dominique Devienne <> wrote:

> > I did not find anything :-(. I was just hoping
> there would be a trick somewhere.
> Maybe this is too weird, but this could possibly
> work:

Right; the problem is that a <mapper> is, in longhand,
a "filename mapper."  NAME being the key.  Mappers
were never designed to know more than a file's name. 
So the closest you'll probably get anytime soon would
be to implement a selector that can relate the file's
type to its content, and use this in conjunction with
ac:for, perhaps like (if my understanding of the
problem is close enough):

<property name="exts" value="tif,gif,png,jpg" />

<ac:for param="ext" list="${exts}">
    <copy todir="dest">
      <fileset dir="src">
        <custom-sel type="@{ext}" />
      <globmapper from="*.*"  to="*.@{ext}" />

Is that really so much worse?



Need a quick answer? Get one in minutes from people who know.
Ask your question on

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message