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.
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.) http://svn.apache.org/viewvc/ant/core/trunk/src/main/org/apache/tools/ant/util/FileUtils.java?r1=277845&r2=278117
Indeed I used a FAT partition for data exchange between XP/Vista - Linux. On the main NTFS partitions it works fine.
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): dist: [zip] Building zip: D:\workspace\nl-webapp\dist\nl-webapp-src-20081217.zip archive-build: [copy] Warning: nl-webapp-src-20081217.zip modified in the future. [copy] Copying 1 file to F:\Archive\20081217 BUILD SUCCESSFUL Total time: 2 seconds ant version 1.7.0 v200803061910 WinXP D: NTFS F: FAT32 Same situation as #2 - using FAT32 for transfer between Windows and Linux. I believe this is a fairly common environment.