use of com.synopsys.integration.detect.tool.signaturescanner.SignatureScannerLogger in project synopsys-detect by blackducksoftware.
the class OperationFactory method createScanBatchRunnerWithCustomUrl.
// TODO: Why is this unused? JM-02/2022
// Does WithCustomUrl mean a non-blackduck location?
public ScanBatchRunner createScanBatchRunnerWithCustomUrl(String url, File installDirectory) throws OperationException {
return auditLog.namedInternal("Create Scan Batch Runner with Custom URL", () -> {
IntEnvironmentVariables intEnvironmentVariables = IntEnvironmentVariables.includeSystemEnv();
ScanPathsUtility scanPathsUtility = new ScanPathsUtility(new Slf4jIntLogger(LoggerFactory.getLogger(ScanPathsUtility.class)), intEnvironmentVariables, OperatingSystemType.determineFromSystem());
ScanCommandRunner scanCommandRunner = new ScanCommandRunner(new Slf4jIntLogger(LoggerFactory.getLogger(ScanCommandRunner.class)), intEnvironmentVariables, scanPathsUtility, createExecutorServiceForScanner());
BlackDuckServerConfig blackDuckServerConfig = BlackDuckServerConfig.newApiTokenBuilder().setIntEnvironmentVariables(intEnvironmentVariables).build();
BlackDuckServicesFactory blackDuckServicesFactory = blackDuckServerConfig.createBlackDuckServicesFactory(new Slf4jIntLogger(LoggerFactory.getLogger(BlackDuckServicesFactory.class)));
BlackDuckRegistrationService blackDuckRegistrationService = blackDuckServicesFactory.createBlackDuckRegistrationService();
return new CreateScanBatchRunnerWithCustomUrl(intEnvironmentVariables, new SignatureScannerLogger(LoggerFactory.getLogger(ScanCommandRunner.class)), OperatingSystemType.determineFromSystem(), scanPathsUtility, scanCommandRunner).createScanBatchRunner(url, connectionDetails, blackDuckRegistrationService, installDirectory);
});
}
use of com.synopsys.integration.detect.tool.signaturescanner.SignatureScannerLogger in project synopsys-detect by blackducksoftware.
the class CreateScanBatchRunnerWithBlackDuck method createScanBatchRunner.
public ScanBatchRunner createScanBatchRunner(BlackDuckServerConfig blackDuckServerConfig, File installDirectory) {
logger.debug("Signature scanner will use the Black Duck server to download/update the scanner - this is the most likely situation.");
SignatureScannerLogger slf4jIntLogger = new SignatureScannerLogger(logger);
ScanPathsUtility scanPathsUtility = new ScanPathsUtility(slf4jIntLogger, intEnvironmentVariables, operatingSystemType);
ScanCommandRunner scanCommandRunner = new ScanCommandRunner(slf4jIntLogger, intEnvironmentVariables, scanPathsUtility, executorService);
BlackDuckHttpClient blackDuckHttpClient = blackDuckServerConfig.createBlackDuckHttpClient(slf4jIntLogger);
CleanupZipExpander cleanupZipExpander = new CleanupZipExpander(slf4jIntLogger);
SignatureScannerClient signatureScannerClient = new SignatureScannerClient(blackDuckHttpClient);
BlackDuckRegistrationService blackDuckRegistrationService = blackDuckServerConfig.createBlackDuckServicesFactory(slf4jIntLogger).createBlackDuckRegistrationService();
KeyStoreHelper keyStoreHelper = new KeyStoreHelper(slf4jIntLogger);
ScannerZipInstaller scannerZipInstaller = new ScannerZipInstaller(slf4jIntLogger, signatureScannerClient, blackDuckRegistrationService, cleanupZipExpander, scanPathsUtility, keyStoreHelper, blackDuckServerConfig.getBlackDuckUrl(), operatingSystemType, installDirectory);
return ScanBatchRunner.createComplete(intEnvironmentVariables, scanPathsUtility, scanCommandRunner, scannerZipInstaller);
}
Aggregations