diff --git a/core/src/main/java/gov/nist/secauto/metaschema/core/model/constraint/FindingCollectingConstraintValidationHandler.java b/core/src/main/java/gov/nist/secauto/metaschema/core/model/constraint/FindingCollectingConstraintValidationHandler.java index c2d471b14..bb06900e1 100644 --- a/core/src/main/java/gov/nist/secauto/metaschema/core/model/constraint/FindingCollectingConstraintValidationHandler.java +++ b/core/src/main/java/gov/nist/secauto/metaschema/core/model/constraint/FindingCollectingConstraintValidationHandler.java @@ -16,15 +16,20 @@ import gov.nist.secauto.metaschema.core.util.CollectionUtil; import gov.nist.secauto.metaschema.core.util.ObjectUtils; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; + import java.util.LinkedList; import java.util.List; import java.util.regex.Pattern; import edu.umd.cs.findbugs.annotations.NonNull; +@SuppressWarnings("PMD.CouplingBetweenObjects") public class FindingCollectingConstraintValidationHandler extends AbstractConstraintValidationHandler implements IValidationResult { + private static final Logger LOGGER = LogManager.getLogger(FindingCollectingConstraintValidationHandler.class); @NonNull private final List findings = new LinkedList<>(); @NonNull @@ -263,6 +268,7 @@ public void handleError( INodeItem node, String message, Throwable exception) { + LOGGER.atError().withThrowable(exception).log(message); addFinding(ConstraintValidationFinding.builder(constraint, node) .kind(Kind.FAIL) .severity(Level.CRITICAL) diff --git a/metaschema-maven-plugin/pom.xml b/metaschema-maven-plugin/pom.xml index 29c9b65af..ae84d4c53 100644 --- a/metaschema-maven-plugin/pom.xml +++ b/metaschema-maven-plugin/pom.xml @@ -26,7 +26,7 @@ ${scm.url}/tree/develop/metaschema-maven-plugin HEAD - + @@ -75,7 +75,6 @@ org.apache.maven.plugin-tools maven-plugin-annotations - ${dependency.maven-plugin-tools.version} provided true