mirror of
https://github.com/ysoftdevs/DependencyCheck.git
synced 2026-04-23 00:38:51 +02:00
resolved issue #686 - reports are generated even if no dependencies were analyzed
This commit is contained in:
@@ -108,6 +108,7 @@ public class CheckMojo extends BaseDependencyCheckMojo {
|
||||
}
|
||||
exCol = ex;
|
||||
}
|
||||
}
|
||||
if (exCol == null || !exCol.isFatal()) {
|
||||
try {
|
||||
writeReports(engine, getProject(), getCorrectOutputDirectory());
|
||||
@@ -120,14 +121,12 @@ public class CheckMojo extends BaseDependencyCheckMojo {
|
||||
}
|
||||
}
|
||||
}
|
||||
//writeDataFile(getProject(), null, engine.getDependencies());
|
||||
showSummary(getProject(), engine.getDependencies());
|
||||
checkForFailure(engine.getDependencies());
|
||||
if (exCol != null && this.isFailOnError()) {
|
||||
throw new MojoExecutionException("One or more exceptions occurred during dependency-check analysis", exCol);
|
||||
}
|
||||
}
|
||||
}
|
||||
engine.cleanup();
|
||||
}
|
||||
Settings.cleanup();
|
||||
|
||||
Reference in New Issue
Block a user