generate code location report even if waiting based on bom status
@@ -145,6 +145,10 @@ public class IntelligentModeStepRunner {
stepHelper.runAsGroup("Wait for Results", OperationType.INTERNAL, () -> {
if (operationRunner.createBlackDuckPostOptions().shouldWaitForResults()) {
+ // Calculate code locations. We do this even if we don't wait based on code locations
+ // as we want to report code location data in various reports.
+ CodeLocationResults codeLocationResults = calculateCodeLocations(codeLocationAccumulator);
+
// Waiting at the scan level is more reliable, do that if the BD server is new enough.
if (blackDuckRunData.shouldWaitAtScanLevel()) {
pollForBomScanCompletion(blackDuckRunData, projectVersion, scanIdsToWaitFor);
@@ -153,7 +157,6 @@ public class IntelligentModeStepRunner {
// If the BD server is older, or we can't detect its version, or if we have scans that we are
// not yet able to obtain the scanID for, use the original notification based waiting.
if (!blackDuckRunData.shouldWaitAtScanLevel() || mustWaitAtBomSummaryLevel.get()) {
- CodeLocationResults codeLocationResults = calculateCodeLocations(codeLocationAccumulator);
waitForCodeLocations(codeLocationResults.getCodeLocationWaitData(), projectNameVersion, blackDuckRunData);
}
}
