ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dominique Devienne <>
Subject Re: avoid duplicates with pathconvert and mappers
Date Mon, 15 Apr 2013 11:14:40 GMT
On Mon, Apr 15, 2013 at 11:22 AM, Patrick Martin <> wrote:

> However, the id 1 gets duplicated. Is there anyway I can avoid this dupe?
> The pathconvert attribute preserveduplicates="false" does not bring any
> help here. also tried the uniq filter in a filtermapper, without luck.

If it's like the Unix uniq, you need to sort before you apply uniq, as
(Unix) uniq collapses only consecutive duplicates.

Although I'm not sure this applies here, since the mapper likely only sees
each value in turn, so the uniq would need to keep internal state (set of
values seen so far) to be valid here, as a sort mapper would need to see
all values before outputting any, something <chainedmapper> may not
support. I don't recall whether a <mapper> can "veto" a value, i.e. filter
it out, but that must be possible if there's a uniq mapper.

Just conjectures here. --DD

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message