ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 21245] - jar rebuilds when it shouldn't
Date Sun, 06 Jul 2003 12:35:02 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=21245>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=21245

jar rebuilds when it shouldn't





------- Additional Comments From conor@cortexebusiness.com.au  2003-07-06 12:35 -------
This is the explanation for what is going on.

Since both filesets include a test1 directory, the resulting jar structure is
    0 Sun Jul 06 21:40:18 EST 2003 META-INF/
   110 Sun Jul 06 21:40:16 EST 2003 META-INF/MANIFEST.MF
     0 Sun Jul 06 20:52:26 EST 2003 test1/
     0 Sun Jul 06 20:52:26 EST 2003 test1/a
     0 Sun Jul 06 20:52:38 EST 2003 test1/b

That is, two physical test1 dirs map to a single test1 dir in the jar. The
modification time of the test1 directory within the jar is based on only one of
the actual test1 directories. If the test1 that is in the first fileset
processed was created earlier, the test1 from the other fileset will be
considered out of date with respect to the one in the Jar. So in the above
example the second test1, being newer than the test1 in the jar (by time)
triggers the rebuild.

Swapping the filesets around, causes the test1 in the jar to have a modification
time <= both physical test1 dirs. So, it is like this

     0 Sun Jul 06 21:52:42 EST 2003 META-INF/
   110 Sun Jul 06 21:52:40 EST 2003 META-INF/MANIFEST.MF
     0 Sun Jul 06 20:52:38 EST 2003 test1/
     0 Sun Jul 06 20:52:38 EST 2003 test1/b
     0 Sun Jul 06 20:52:26 EST 2003 test1/a

See how the modification time of test1 is now the later of the two. The jar is
not rebuilt.

I'm not sure if it is a bug. The way to fix this would be to select the newest
time for any overlapping resources in the jar, or to ignore dirs in the time
comparisons.

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


Mime
View raw message