protected boolean renameTmp(String from, String to) throws IOException {
AbstractArchive finalArchive = abstractArchiveFactory.openArchive(to);
finalArchive.delete();
AbstractArchive tmpArchive = abstractArchiveFactory.openArchive(from);
boolean success = tmpArchive.renameTo(to);
if (!success) {
throw new IOException("Error renaming JAR");
}
return success;
}