in src/main/java/org/apache/maven/buildcache/CacheDiff.java [239:270]
private void comparePlugins(CompletedExecution current, CompletedExecution baseline) {
// TODO add support for skip values
final List<PropertyValue> trackedProperties = new ArrayList<>();
for (PropertyValue propertyValueType : current.getProperties()) {
if (propertyValueType.isTracked()) {
trackedProperties.add(propertyValueType);
}
}
if (trackedProperties.isEmpty()) {
return;
}
final Map<String, PropertyValue> baselinePropertiesByName = new HashMap<>();
for (PropertyValue propertyValueType : baseline.getProperties()) {
baselinePropertiesByName.put(propertyValueType.getName(), propertyValueType);
}
for (PropertyValue p : trackedProperties) {
final PropertyValue baselineValue = baselinePropertiesByName.get(p.getName());
if (baselineValue == null || !StringUtils.equals(baselineValue.getValue(), p.getValue())) {
addNewMismatch(
p.getName(),
p.getValue(),
baselineValue == null ? null : baselineValue.getValue(),
"Plugin: " + current.getExecutionKey()
+ " has mismatch in tracked property and cannot be reused",
"Align properties between remote and local build or remove property from tracked "
+ "list if mismatch could be tolerated. In some cases it is possible to add skip value "
+ "to ignore lax mismatch");
}
}
}