Bug 43032 - jar reports warning class modified in future on Windows FAT filesystems
Summary: jar reports warning class modified in future on Windows FAT filesystems
Status: NEW
Alias: None
Product: Ant
Classification: Unclassified
Component: Core tasks (show other bugs)
Version: 1.7.0
Hardware: PC Windows XP
: P2 regression (vote)
Target Milestone: ---
Assignee: Ant Notifications List
Depends on:
Reported: 2007-08-04 08:38 UTC by Ronald Lamprecht
Modified: 2018-09-11 15:20 UTC (History)
0 users


Note You need to log in before you can comment on or make changes to this bug.
Description Ronald Lamprecht 2007-08-04 08:38:35 UTC
On a small project with just a few classes a target "all" that compiles and
builds the jar task will result in warnings "*.class modified in the future" for
each class.

This happens only on Windows (XP, Vista tested) with ant 1.7.0 (current nightly
build, too). Ant 1.6.2 and other operating systems look fine. It is likely
related to the 2s timestamp resolution on Windows. Similar problems have been
reported for early ant versions about 1.3 in general for Windows.

A nasty workaround is to add a <sleep seconds="2" /> for the jar target. One
second results just in less classes reporting the warning depending on the
boundary of the seconds.
Comment 1 J.M. (Martijn) Kruithof 2007-08-05 07:49:32 UTC
Are you using a FAT filesystem? Since version 278117 (included in Ant 1.7.0) of
FileUtils we assume a millisecond resolution in timestamping on windows NT
(actually the resolution on NTFS is 100 ns. (XP and Vista included.)

Comment 2 Ronald Lamprecht 2007-08-05 13:01:44 UTC
Indeed I used a FAT partition for data exchange between XP/Vista - Linux. On the
main NTFS partitions it works fine.
Comment 3 Charles Parker 2008-12-17 08:22:45 UTC
I encounter this warning every time I use the copy task to copy recently created zip, jar, or war files from NTFS (my workspace) to FAT32 (my build archive):

      [zip] Building zip: D:\workspace\nl-webapp\dist\nl-webapp-src-20081217.zip
     [copy] Warning: nl-webapp-src-20081217.zip modified in the future.
     [copy] Copying 1 file to F:\Archive\20081217
Total time: 2 seconds

ant version 1.7.0 v200803061910

F: FAT32

Same situation as #2 - using FAT32 for transfer between Windows and Linux. I believe this is a fairly common environment.