public static void explode(File archive, File directory, String moduleName, boolean preserveManifest)
throws IOException, IASDeploymentException {
assert archive != null;
AbstractArchiveFactory factory = null;
if (archive.isDirectory()) {
factory = new FileArchiveFactory();
} else {
factory = new JarArchiveFactory();
}
AbstractArchive source = factory.openArchive(archive.getAbsolutePath());
// now copy the archive, let the archivist do the job...
Archivist archivist = null;
try {
archivist = ArchivistFactory.getArchivistForArchive(source);