Only log BOM URL if the BOM has been updated in some way
@@ -93,11 +93,16 @@ class HubManager {
String policyStatusMessage = policyChecker.getPolicyStatusMessage(hubServicesFactory, detectProject)
logger.info(policyStatusMessage)
}
+ if (detectProject.getDetectCodeLocations() && !detectConfiguration.getHubSignatureScannerDisabled()) {
+ // only log BOM URL if we have updated it in some way
ProjectDataService projectDataService = hubServicesFactory.createProjectDataService(slf4jIntLogger)
ProjectVersionWrapper projectVersionWrapper = projectDataService.getProjectVersion(detectProject.getProjectName(), detectProject.getProjectVersionName())
MetaService metaService = hubServicesFactory.createMetaService(slf4jIntLogger)
String componentsLink = metaService.getFirstLinkSafely(projectVersionWrapper.getProjectVersionView(), MetaService.COMPONENTS_LINK)
logger.info("To see your results, follow the URL: ${componentsLink}")
+ } else {
+ logger.debug('Found no code locations and did not run a scan.')
+ }
} catch (IllegalStateException e) {
logger.error("Your Hub configuration is not valid: ${e.message}")
logger.debug(e.getMessage(), e)
