public static void main(String[] args) throws IOException {
        BuildManager manager = new BuildManager();

        if (args.length != 4) {
            LOG.info("Usage: java SSPPBuildManager CIUrl tempFolder formalBuildFolder zipUselessFolderPath");
            System.exit(0);
        } else {
            CI_URL = args[0];
            CI_ZIP_URL = CI_URL + "*zip*/archive.zip";
            String buildNumber = manager.getBuildNumberFromWeb();
            LOG.info("Last Successful build: " + buildNumber);
            manager.setBuildNumber(buildNumber);
            manager.quit();

            String downloadFolder = args[1];
            File tempFolder = new File(downloadFolder);
            if (tempFolder.exists()) {
                FileUtils.deleteDirectory(tempFolder);
                tempFolder.mkdirs();
            }
            manager.setDownloadRootFolderPath(downloadFolder);

            String formalBuildFolderDir = args[2];
            File formalBuildFolder = new File(formalBuildFolderDir);
            if (!formalBuildFolder.exists() || !formalBuildFolder.isDirectory() || !formalBuildFolder.canWrite()) {
                LOG.info("The path doesn't exist or is not a writable directory: " + formalBuildFolderDir);
                System.exit(0);
            }
            manager.setFormalBuildFolder(formalBuildFolderDir);

            ZIP_USELESS_FOLDER = args[3];

            File targetFolder = new File(manager.getFormalBuildFolder() + File.separator + manager.getBuildNumber());
            if (targetFolder.exists()) {
                LOG.info("The build has been created before: " + targetFolder.getAbsolutePath() + ". Do nothing ...");
                System.exit(0);
            }
        }

        LOG.info("Downloading build from " + CI_URL);
        if (manager.downloadBuild()) {
            manager.decompressZip();
            manager.removeUselessFolder();
            LOG.info("Build is ready in " + manager.getFormalBuildFolder() + File.separator + manager.getBuildNumber());
        }
    }