mirror of
https://github.com/ysoftdevs/DependencyCheck.git
synced 2026-03-23 01:29:43 +01:00
resolved issue #686 - reports are generated even if no dependencies were analyzed
This commit is contained in:
@@ -108,24 +108,23 @@ public class CheckMojo extends BaseDependencyCheckMojo {
|
|||||||
}
|
}
|
||||||
exCol = ex;
|
exCol = ex;
|
||||||
}
|
}
|
||||||
if (exCol == null || !exCol.isFatal()) {
|
}
|
||||||
try {
|
if (exCol == null || !exCol.isFatal()) {
|
||||||
writeReports(engine, getProject(), getCorrectOutputDirectory());
|
try {
|
||||||
} catch (ReportException ex) {
|
writeReports(engine, getProject(), getCorrectOutputDirectory());
|
||||||
if (this.isFailOnError()) {
|
} catch (ReportException ex) {
|
||||||
if (exCol != null) {
|
if (this.isFailOnError()) {
|
||||||
exCol.addException(ex);
|
if (exCol != null) {
|
||||||
} else {
|
exCol.addException(ex);
|
||||||
exCol = new ExceptionCollection("Unable to write the dependency-check report", ex);
|
} else {
|
||||||
}
|
exCol = new ExceptionCollection("Unable to write the dependency-check report", ex);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//writeDataFile(getProject(), null, engine.getDependencies());
|
}
|
||||||
showSummary(getProject(), engine.getDependencies());
|
showSummary(getProject(), engine.getDependencies());
|
||||||
checkForFailure(engine.getDependencies());
|
checkForFailure(engine.getDependencies());
|
||||||
if (exCol != null && this.isFailOnError()) {
|
if (exCol != null && this.isFailOnError()) {
|
||||||
throw new MojoExecutionException("One or more exceptions occurred during dependency-check analysis", exCol);
|
throw new MojoExecutionException("One or more exceptions occurred during dependency-check analysis", exCol);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
engine.cleanup();
|
engine.cleanup();
|
||||||
|
|||||||
Reference in New Issue
Block a user