It seems like building a jar or zip from the exact same source files will always yield a different file. I tried this both using the java jar command, and the jar and zip tasks in ant.
It appears to be due to the fact that new jars/zips have the timestamp set to the current time on each stored file.
Is there a way to force a zip tool to simply use the timestamp on the file on the filesystem to ensure that a jar built from the exact same source will appear exactly the same?
Ok, a coworker and I came up with a solution that works for us.
Instead of reengineering our entire build process to not delete any class or jar files, we use this procedure:
Yeah, I know it sounds kludgy, but it sure beats rewriting build script to take this into account. Also, we can do a completely clean build on a fresh machine (in the case of server failure), and this process will ensure that only actually updated jars are produced.