I have some legacy code that reads a configuration file from an existing jar, like:
URL url = SomeClass.class.getResource(\"/configuration.properties\");
//
use urlConnection.setUseCaches(false), since it's an ant task, it's likely not to be forked in a separate process. The URLs cache the files (or the JarFile in that case)... if the files is change due to the build, you get quite a similar behavior.
you may want to close the modified jar files meanwhile useCaches(true), JarURLConnection.getJarFile().close()
Sometime I wish handling of Jar/Zip was a little better
cheers