public void execute()

in src/main/java/org/apache/maven/plugins/help/ActiveProfilesMojo.java [52:79]


    public void execute() throws MojoExecutionException {
        StringBuilder message = new StringBuilder();

        for (MavenProject project : projects) {
            getActiveProfileStatement(project, message);

            message.append(LS).append(LS);
        }

        if (output != null) {
            StringBuilder sb = new StringBuilder();
            sb.append("Generated by Maven Help Plugin").append(LS);
            sb.append("See: https://maven.apache.org/plugins/maven-help-plugin/")
                    .append(LS)
                    .append(LS);
            sb.append(message.toString());

            try {
                writeFile(output, sb);
            } catch (IOException e) {
                throw new MojoExecutionException("Cannot write active profiles to output: " + output, e);
            }

            getLog().info("Active profile report written to: " + output);
        } else {
            getLog().info(message);
        }
    }