Quantcast

Regexp mapper + Zip task on Windows

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Regexp mapper + Zip task on Windows

Gilles Querret-2
Hello,


Using this test case, I see a different behavior on Windows and Linux ; I'm
creating two files, then generating a ZIP file (with regexpmapper to rename
files), wait a few seconds (just in case there's  FS timestamp problem) and
re-execute the same Zip task.
On Linux, the second Zip task doesn't do anything (as expected) as the
files are not modified.
On Windows, the Zip file is always updated. With -v, I'm getting :
      [zip] us/xx/xxtest.r added as us/xx/xxtest.r is outdated.
      [zip] us/zz/zztest.r added as us/zz/zztest.r is outdated.
Using Ant 1.9.7, JDK 1.8 on both systems.

Am I doing something wrong, or is there a bug ?

<?xml version="1.0" encoding="utf-8"?>
<project name="test">
 <mkdir dir="src" />
 <touch file="src/xxtest.r" />
 <touch file="src/zztest.r" />
 <zip destFile="foo.zip">
   <mappedresources>
    <fileset dir="src" includes="*.r" />
    <regexpmapper from="^(([a-z][a-z]).*)\.r" to="us/\2/\1.r" />
   </mappedresources>
 </zip>
 <sleep seconds="5" />
 <zip destFile="foo.zip">
   <mappedresources>
    <fileset dir="src" includes="*.r" />
    <regexpmapper from="^(([a-z][a-z]).*)\.r" to="us/\2/\1.r" />
   </mappedresources>
 </zip>
</project>


--
Gilles QUERRET

Riverside Software
15d route de Bellevue • 69440 Mornant • France
Mob : +33 662.525.532
Loading...