JarFile input = new JarFile(dir);
Manifest manifest = input.getManifest();
JarOutputStream out = manifest == null ? new JarOutputStream(
new BufferedOutputStream(new FileOutputStream(temp)))
: new JarOutputStream(new BufferedOutputStream(new FileOutputStream(temp)), manifest);
Enumeration en = input.entries();
byte[] buf = new byte[4096];
int count;
while (en.hasMoreElements()) {
JarEntry entry = (JarEntry) en.nextElement();
if (entry.getName().equals("META-INF/geronimo-plugin.xml")) {