public void execute()

in src/main/java/org/apache/commons/release/plugin/mojos/CommonsSiteCompressionMojo.java [118:149]


    public void execute() throws MojoExecutionException, MojoFailureException {
        if (!isDistModule) {
            getLog().info("This module is marked as a non distribution "
                    + "or assembly module, and the plugin will not run.");
            return;
        }
        if (StringUtils.isEmpty(distSvnStagingUrl)) {
            getLog().warn("commons.distSvnStagingUrl is not set, the commons-release-plugin will not run.");
            return;
        }
        if (!siteDirectory.exists()) {
            getLog().error("\"mvn site\" was not run before this goal, or a siteDirectory did not exist.");
            throw new MojoFailureException(
                    "\"mvn site\" was not run before this goal, or a siteDirectory did not exist."
            );
        }
        if (!workingDirectory.exists()) {
            getLog().info("Current project contains no distributions. Not executing.");
            return;
        }
        try {
            filesToCompress = new ArrayList<>();
            getAllSiteFiles(siteDirectory, filesToCompress);
            writeZipFile(workingDirectory, siteDirectory, filesToCompress);
        } catch (final IOException e) {
            getLog().error("Failed to create ./target/commons-release-plugin/site.zip: " + e.getMessage(), e);
            throw new MojoExecutionException(
                    "Failed to create ./target/commons-release-plugin/site.zip: " + e.getMessage(),
                    e
            );
        }
    }