protected void doUnpack()

in src/main/java/org/apache/maven/plugins/war/packaging/AbstractWarPackagingTask.java [264:284]


    protected void doUnpack(WarPackagingContext context, File file, File unpackDirectory)
            throws MojoExecutionException {
        String archiveExt = FileUtils.getExtension(file.getAbsolutePath()).toLowerCase();

        try {
            UnArchiver unArchiver = context.getArchiverManager().getUnArchiver(archiveExt);
            unArchiver.setSourceFile(file);
            unArchiver.setDestDirectory(unpackDirectory);
            unArchiver.setOverwrite(true);
            unArchiver.extract();
        } catch (ArchiverException e) {
            throw new MojoExecutionException(
                    "Error unpacking file [" + file.getAbsolutePath() + "]" + " to ["
                            + unpackDirectory.getAbsolutePath() + "]",
                    e);
        } catch (NoSuchArchiverException e) {
            context.getLog()
                    .warn("Skip unpacking dependency file [" + file.getAbsolutePath() + " with unknown extension ["
                            + archiveExt + "]");
        }
    }