Search in sources :

Example 1 with GradleReportParser

use of com.blackducksoftware.integration.hub.detect.detector.gradle.GradleReportParser in project hub-detect by blackducksoftware.

the class GradleExtractionDebugger method debug.

public void debug(LoggedDetectExtraction extraction, DetectRunInfo detectRunInfo, DetectConfiguration detectConfiguration) throws ExecutableRunnerException {
    String id = extraction.extractionIdentifier;
    ExecutableRunner executableRunner = Mockito.mock(ExecutableRunner.class);
    Mockito.when(executableRunner.execute(Mockito.any())).thenReturn(new ExecutableOutput("", ""));
    DetectFileFinder detectFileFinder = new DetectFileFinder();
    File mockSourceFile = Mockito.mock(File.class);
    File outputDirectory = new File(detectRunInfo.getExtractionsFolder(), extraction.extractionIdentifier);
    GradleInspectorExtractor gradleInspectorExtractor = new GradleInspectorExtractor(executableRunner, detectFileFinder, new GradleReportParser(new ExternalIdFactory()), detectConfiguration);
    Extraction extractionResult = gradleInspectorExtractor.extract(mockSourceFile, "", "", outputDirectory);
}
Also used : GradleInspectorExtractor(com.blackducksoftware.integration.hub.detect.detector.gradle.GradleInspectorExtractor) ExecutableOutput(com.blackducksoftware.integration.hub.detect.util.executable.ExecutableOutput) GradleReportParser(com.blackducksoftware.integration.hub.detect.detector.gradle.GradleReportParser) ExternalIdFactory(com.synopsys.integration.hub.bdio.model.externalid.ExternalIdFactory) DetectFileFinder(com.blackducksoftware.integration.hub.detect.workflow.file.DetectFileFinder) Extraction(com.blackducksoftware.integration.hub.detect.workflow.extraction.Extraction) LoggedDetectExtraction(com.synopsys.detect.doctor.logparser.LoggedDetectExtraction) File(java.io.File) ExecutableRunner(com.blackducksoftware.integration.hub.detect.util.executable.ExecutableRunner)

Aggregations

GradleInspectorExtractor (com.blackducksoftware.integration.hub.detect.detector.gradle.GradleInspectorExtractor)1 GradleReportParser (com.blackducksoftware.integration.hub.detect.detector.gradle.GradleReportParser)1 ExecutableOutput (com.blackducksoftware.integration.hub.detect.util.executable.ExecutableOutput)1 ExecutableRunner (com.blackducksoftware.integration.hub.detect.util.executable.ExecutableRunner)1 Extraction (com.blackducksoftware.integration.hub.detect.workflow.extraction.Extraction)1 DetectFileFinder (com.blackducksoftware.integration.hub.detect.workflow.file.DetectFileFinder)1 LoggedDetectExtraction (com.synopsys.detect.doctor.logparser.LoggedDetectExtraction)1 ExternalIdFactory (com.synopsys.integration.hub.bdio.model.externalid.ExternalIdFactory)1 File (java.io.File)1