ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gilles Querret <g.quer...@riverside-software.fr>
Subject Selectors not executed on Zipfileset
Date Mon, 08 Mar 2021 12:14:16 GMT
Hello,


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:

<project>
  <mkdir dir="target/d2" />
  <mkdir dir="target/d3" />

  <mkdir dir="src" />
  <echo file="src/test1.txt" message="abc" />
  <echo file="src/test2.txt" message="def" />
  <echo file="src/test3.txt" message="hij" />
  <zip destFile="target/f1.zip">
    <fileset dir="src" />
  </zip>

  <echo message="Standard fileset" />
  <copy toDir="target/d2">
    <fileset dir="src">
      <contains text="def" />
    </fileset>
  </copy>

  <echo message="ZIP fileset" />
  <copy toDir="target/d3">
    <zipfileset src="target/f1.zip">
      <contains text="def" />
    </zipfileset>
  </copy>
</project>
When executed, the first copy task only copies one file (test2.txt which
contains def), but the second copy task copies all three files. My original
problem was coming from the <different> selector, also not executed on
zipfileset, but it was easier to reproduce with <contains>.
Is that a known issue ? Or just the expected behavior ?

Gilles


-- 
Gilles QUERRET

Riverside Software
91 chemin des églantiers • 69440 Taluyers • France
Mob : +33 662.525.532

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