ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefan Bodewig <bode...@apache.org>
Subject Re: Selectors not executed on Zipfileset
Date Sat, 13 Mar 2021 12:03:12 GMT
On 2021-03-08, Gilles Querret wrote:

> I think I've found an issue with selectors which are not executed on
> Zipfileset. Here is a very small test case to reproduce the issue:

The selectors that can be nested directly into a fileset (and this into
a zipfileset which inherits the behavior) are FileSelectors that can
only be applied to real files. For non-File resources you'd need
ResourceSelectors and they are not directly supported as nested elements
of the zipfileset - rather you'd wrap the whole thing into a <restrict>
container.

I.e instead of

>   <copy toDir="target/d3">
>     <zipfileset src="target/f1.zip">
>       <contains text="def" />
>     </zipfileset>
>   </copy>

you use

   <copy toDir="target/d3">
     <restrict>
       <zipfileset src="target/f1.zip"/>
       <contains text="def" />
     </restrict>
   </copy>

This could and should be documented more clearly. I'll try to do so.

Stefan

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


Mime
View raw message