ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefan Bodewig <>
Subject Re: Selectors not executed on Zipfileset
Date Mon, 15 Mar 2021 17:54:14 GMT
On 2021-03-15, Gilles Querret wrote:

> I've used the <contains> selector in this example, but my use case is
> in fact similar to the <different> selector, where a comparison is
> done on both the source file and the target file. I assume that this
> is not possible within the restrict element ?

You are right, you cannot use it for non-file resources.

Every FileSelector is a ResourceSelector, so technically Ant might allow
such a construct, but it wouldn't work - as <different> restricts itself
to file-system resources.

It would probably be possible to generalize <different> to arbitrary
resources, but this hasn't happened so far.

If we were to allow a non-file-system target (like a target
ResourceCollection) the lookup "find the target resource if it exists"
could become expensive as our ResourceCollections are really only
iterators - so we'd do a linear search inside of the target
collection. In the case of a target ZIP archive, we'd re-open the ZIP
and scan it for each and every resource encountered by the selector..


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

View raw message