Fix issue #799 - Initialize exCol to prevent NPE

This commit is contained in:
Hans Aikema
2017-07-12 21:40:31 +02:00
parent 4fc2abd183
commit 6d2a6bbd3d

View File

@@ -691,6 +691,9 @@ public abstract class BaseDependencyCheckMojo extends AbstractMojo implements Ma
}
if (!isResolved) {
getLog().error("Unable to resolve system scoped dependency: " + dependencyNode.toNodeString());
if (exCol == null) {
exCol = new ExceptionCollection();
}
exCol.addException(new DependencyNotFoundException("Unable to resolve system scoped dependency: "
+ dependencyNode.toNodeString()));
}