use of org.semver.Comparer in project semantic-versioning by jeluard.
the class AbstractEnforcerRule method compareJars.
private void compareJars(final EnforcerRuleHelper helper, final Version previous, final File previousJar, final Version current, final File currentJar) throws EnforcerRuleException {
helper.getLog().info("Using <" + previousJar + "> as previous JAR");
helper.getLog().info("Using <" + currentJar + "> as current JAR");
try {
final DiffCriteria diffCriteria = publicOnly ? new PublicDiffCriteria() : new SimpleDiffCriteria();
final Comparer comparer = new Comparer(diffCriteria, previousJar, currentJar, extractFilters(this.includes), extractFilters(this.excludes));
final Delta delta = comparer.diff();
enforce(helper, delta, previous, current);
} catch (IOException e) {
throw new EnforcerRuleException("Exception while checking compatibility: " + e.toString(), e);
}
}
Aggregations