use of com.blackducksoftware.integration.hub.detect.detector.nuget.inspector.DotNetCoreNugetInspector in project hub-detect by blackducksoftware.
the class NugetInspectorManager method findDotnetCoreInspector.
private DotNetCoreNugetInspector findDotnetCoreInspector(File nupkgFolder, String dotnetExecutable) throws DetectorException {
// new inspector
final String dotnetInspectorName = "BlackduckNugetInspector.dll";
logger.info("Searching for: " + dotnetInspectorName);
File toolsFolder = new File(nupkgFolder, "tools");
Optional<File> foundExe = detectFileFinder.findFilesToDepth(toolsFolder, dotnetInspectorName, 3).stream().findFirst();
if (foundExe.isPresent() && foundExe.get().exists()) {
String inspectorExe = foundExe.get().toString();
logger.info("Found nuget inspector: " + inspectorExe);
return new DotNetCoreNugetInspector(dotnetExecutable, inspectorExe, executableRunner);
} else {
throw new DetectorException("Unable to find nuget inspector, looking for " + dotnetInspectorName + " in " + toolsFolder.toString());
}
}
Aggregations