use of com.buschmais.jqassistant.core.rule.api.RuleHelper in project jqa-maven-plugin by jQAssistant.
the class AvailableRulesMojo method aggregate.
@Override
public void aggregate(MavenProject rootModule, List<MavenProject> projects, Store store) throws MojoExecutionException, MojoFailureException {
getLog().info("Available rules for '" + rootModule.getName() + "'.");
RuleSet ruleSet = readRules(rootModule);
RuleHelper ruleHelper = new RuleHelper(LOGGER);
try {
ruleHelper.printRuleSet(ruleSet);
} catch (RuleException e) {
throw new MojoExecutionException("Cannot print available rules.", e);
}
}
use of com.buschmais.jqassistant.core.rule.api.RuleHelper in project jqa-maven-plugin by jQAssistant.
the class EffectiveRulesMojo method aggregate.
@Override
public void aggregate(MavenProject rootModule, List<MavenProject> projects, Store store) throws MojoExecutionException, MojoFailureException {
getLog().info("Effective rules for '" + rootModule.getName() + "'.");
RuleSet ruleSet = readRules(rootModule);
RuleSelection ruleSelection = RuleSelection.select(ruleSet, groups, constraints, concepts);
RuleHelper ruleHelper = new RuleHelper(LOGGER);
try {
ruleHelper.printRuleSet(ruleSet, ruleSelection);
} catch (RuleException e) {
throw new MojoExecutionException("Cannot print effective rules.", e);
}
}
use of com.buschmais.jqassistant.core.rule.api.RuleHelper in project jqa-maven-plugin by jQAssistant.
the class AvailableRulesMojo method aggregate.
@Override
public void aggregate(MojoExecutionContext mojoExecutionContext) throws MojoExecutionException, MojoFailureException {
getLog().info("Available rules for '" + mojoExecutionContext.getRootModule().getName() + "'.");
RuleSet ruleSet = readRules(mojoExecutionContext);
RuleHelper ruleHelper = new RuleHelper(LOGGER);
try {
ruleHelper.printRuleSet(ruleSet, mojoExecutionContext.getConfiguration().analyze().rule());
} catch (RuleException e) {
throw new MojoExecutionException("Cannot print available rules.", e);
}
}
use of com.buschmais.jqassistant.core.rule.api.RuleHelper in project jqa-maven-plugin by jQAssistant.
the class EffectiveRulesMojo method aggregate.
@Override
public void aggregate(MojoExecutionContext mojoExecutionContext) throws MojoExecutionException, MojoFailureException {
getLog().info("Effective rules for '" + mojoExecutionContext.getRootModule().getName() + "'.");
Analyze analyze = mojoExecutionContext.getConfiguration().analyze();
RuleSet ruleSet = readRules(mojoExecutionContext);
RuleSelection ruleSelection = RuleSelection.select(ruleSet, analyze.groups(), analyze.constraints(), analyze.concepts());
RuleHelper ruleHelper = new RuleHelper(LOGGER);
try {
ruleHelper.printRuleSet(ruleSet, ruleSelection, analyze.rule());
} catch (RuleException e) {
throw new MojoExecutionException("Cannot print effective rules.", e);
}
}
use of com.buschmais.jqassistant.core.rule.api.RuleHelper in project jqa-commandline-tool by jQAssistant.
the class AbstractTask method initialize.
@Override
public void initialize(PluginRepository pluginRepository, Map<String, Object> pluginProperties) {
this.outputDirectory = new File(DEFAULT_OUTPUT_DIRECTORY);
this.pluginRepository = pluginRepository;
this.pluginProperties = pluginProperties;
this.ruleHelper = new RuleHelper(LOGGER);
}
Aggregations