outputFile = getTempFile(path);
}
// copy all entries from source to target except the
// runtime descriptor file
AbstractArchive out = abstractArchiveFactory.createArchive(outputFile.getAbsolutePath());
AbstractArchive in = abstractArchiveFactory.openArchive(path);
Vector skipFiles = new Vector();
skipFiles.add(getRuntimeDeploymentDescriptorPath());
copyInto(in, out, skipFiles);
in.close();
// now save the runtime deployment descriptor...
OutputStream os = out.putNextEntry(getRuntimeDeploymentDescriptorPath());
writeRuntimeDeploymentDescriptors(os);
out.closeEntry();
out.close();
// if we overwrote the old archive, need to rename the tmp now
if (output==null) {
AbstractArchive finalArchive = abstractArchiveFactory.openArchive(path);
finalArchive.delete();
AbstractArchive tmpArchive = abstractArchiveFactory.openArchive(outputFile.getAbsolutePath());
tmpArchive.renameTo(path);
}
}