
com.lewisd.maven.lint.RuleInvoker Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of lint-maven-plugin Show documentation
Show all versions of lint-maven-plugin Show documentation
Generates a report of suspicious/inconsistent POM elements, and optionally fails the build if violations are found.
The newest version!
package com.lewisd.maven.lint;
import java.util.Map;
import java.util.Set;
import org.apache.maven.project.MavenProject;
public class RuleInvoker {
private final ModelFactory modelFactory;
private final MavenProject mavenProject;
public RuleInvoker(final MavenProject mavenProject, final ModelFactory modelFactory) {
this.mavenProject = mavenProject;
this.modelFactory = modelFactory;
}
public void invokeRule(final Rule rule, final ResultCollector resultCollector) {
final Set requiredModels = rule.getRequiredModels();
final Map models = modelFactory.getModels(mavenProject, requiredModels);
rule.invoke(mavenProject, models, resultCollector);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy