All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.buschmais.jqassistant.scm.maven.EffectiveConfigurationMojo Maven / Gradle / Ivy

Go to download

jQAssistant plugin for Apache Maven to integrate jQAssistant into a Maven based project.

There is a newer version: 2.5.0
Show newest version
package com.buschmais.jqassistant.scm.maven;

import com.buschmais.jqassistant.core.runtime.api.configuration.ConfigurationSerializer;
import com.buschmais.jqassistant.scm.maven.configuration.MavenConfiguration;

import org.apache.maven.plugin.MojoExecutionException;
import org.apache.maven.plugin.MojoFailureException;
import org.apache.maven.plugins.annotations.LifecyclePhase;
import org.apache.maven.plugins.annotations.Mojo;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

/**
 * Lists all effective rules.
 */
@Mojo(name = "effective-configuration", defaultPhase = LifecyclePhase.VALIDATE, threadSafe = true)
public class EffectiveConfigurationMojo extends AbstractRuleMojo {

    private static final Logger LOGGER = LoggerFactory.getLogger(EffectiveConfigurationMojo.class);

    private final ConfigurationSerializer configurationSerializer = new ConfigurationSerializer<>();

    @Override
    public void aggregate(MojoExecutionContext mojoExecutionContext) throws MojoExecutionException, MojoFailureException {
        getLog().info("Effective configuration for '" + mojoExecutionContext.getRootModule()
            .getName() + "'\n" + configurationSerializer.toYaml(mojoExecutionContext.getConfiguration()));
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy