public void execute()

in src/main/java/org/apache/maven/plugins/site/render/SiteMojo.java [86:126]


    public void execute() throws MojoExecutionException, MojoFailureException {
        if (skip) {
            getLog().info("maven.site.skip = true: Skipping site generation");
            return;
        }

        if (getLog().isDebugEnabled()) {
            getLog().debug("executing Site Mojo");
        }

        checkInputEncoding();

        List<MavenReportExecution> reports;
        if (generateReports) {
            reports = getReports();
        } else {
            reports = Collections.emptyList();
        }

        try {
            List<Locale> localesList = getLocales();

            for (Locale locale : localesList) {
                getLog().info("Rendering site for "
                        + buffer().strong(
                                        (!locale.equals(SiteTool.DEFAULT_LOCALE)
                                                ? "locale '" + locale + "'"
                                                : "default locale"))
                                .toString());
                renderLocale(locale, reports, localesList);
            }
        } catch (RendererException e) {
            if (e.getCause() instanceof MavenReportException) {
                // issue caused by report, not really by Doxia Site Renderer
                throw new MojoExecutionException(e.getMessage(), e.getCause());
            }
            throw new MojoExecutionException("Failed to render reports", e);
        } catch (IOException e) {
            throw new MojoExecutionException("Error during site generation", e);
        }
    }