public Metadata(String serverLauncherJar, String applicationWar, String outputFile, boolean useCompression) {
        if (serverLauncherJar == null) {
            throw new IllegalArgumentException("Server launcher JAR must be specified");
        }
        File serverLauncherFile = new File(serverLauncherJar);
        if (!serverLauncherFile.isFile()) {
            throw new IllegalArgumentException(
                    String.format("File %s cannot be used as server launcher JAR", serverLauncherFile.getAbsolutePath()));
        }
        this.serverLauncherJar = serverLauncherFile;
        if (applicationWar == null) {
            throw new IllegalArgumentException("Application WAR must be specified");
        }
        File applicationFile = new File(applicationWar);
        if (!applicationFile.isFile()) {
            throw new IllegalArgumentException(
                    String.format("File %s cannot be used as application WAR", applicationFile.getAbsolutePath()));
        }
        this.applicationWar = applicationFile;
        if (outputFile == null) {
            throw new IllegalArgumentException("Output file must be specified");
        }
        File output = new File(outputFile);
        if ((!output.exists() && (outputFile.endsWith("\\") || outputFile.endsWith("/")))
                || output.isDirectory()) {
            output.mkdirs();
            output = new File(output, generateOutputJarName(applicationFile));
        }
        output.getParentFile().mkdirs();
        this.outputJar = output;
        this.useCompression = useCompression;
    }