
com.lewisd.maven.lint.Violation 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 org.apache.maven.model.InputLocation;
import org.apache.maven.project.MavenProject;
public class Violation {
private final MavenProject mavenProject;
private final String message;
private final InputLocation inputLocation;
private final Rule rule;
public Violation(MavenProject mavenProject, Rule rule, String message, InputLocation inputLocation) {
this.mavenProject = mavenProject;
this.rule = rule;
this.message = message;
this.inputLocation = inputLocation;
}
@Override
public String toString() {
return rule.getIdentifier() + ": " + message + " : " + inputLocation.getLineNumber() + ":" + inputLocation.getColumnNumber() + " " + inputLocation.getSource().getLocation();
}
public MavenProject getMavenProject() {
return mavenProject;
}
public String getMessage() {
return message;
}
public InputLocation getInputLocation() {
return inputLocation;
}
public Rule getRule() {
return rule;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy