Ant testing jar for differences  
Author Message
AndyP





PostPosted: 2005-6-17 1:02:00 Top

java-programmer, Ant testing jar for differences
Hi,

I'm trying to implement this logic in an Ant build script:

1) Put all .class files into a new tempLatestBuild.jar
2) If HASH(tempLatestBuild.jar) != HASH(
previousLatestBuild.jar) replace...

I've done this with web.xml and various other config files,
but jars change everytime (even though the .class and MANIFEST.MF file
do not).

With the <jar> task, the MANIFEST.MF timestamp was different
every time in the resultant jar.... So I changed it to a <zip> task
and copied in the MANIFEST.MF by hand.

This fixed the timestamp issue, but there are still two bytes
difference, and I can't see what they are. All the flags on the files
look ok (examined in winzip and when unzipped).

Has anyone done this kind of thing?

Cheers,