Search in sources :

Example 1 with FoundSbtPlugin

use of com.synopsys.integration.detectable.detectable.explanation.FoundSbtPlugin in project synopsys-detect by blackducksoftware.

the class SbtDetectable method sbtPluginExtractable.

// Check if SBT & a plugin can be found
private DetectableResult sbtPluginExtractable() throws DetectableException {
    List<Explanation> explanations = new ArrayList<>();
    sbt = sbtResolver.resolveSbt();
    if (sbt == null) {
        return new ExecutableNotFoundDetectableResult("sbt");
    } else {
        explanations.add(new FoundExecutable(sbt));
    }
    foundPlugin = sbtPluginFinder.isPluginInstalled(environment.getDirectory(), sbt, sbtResolutionCacheOptions.getSbtCommandAdditionalArguments());
    if (!foundPlugin) {
        return new SbtMissingPluginDetectableResult(environment.getDirectory().toString());
    } else {
        explanations.add(new FoundSbtPlugin("Dependency Graph"));
    }
    return new PassedDetectableResult(explanations);
}
Also used : ExecutableNotFoundDetectableResult(com.synopsys.integration.detectable.detectable.result.ExecutableNotFoundDetectableResult) FoundExecutable(com.synopsys.integration.detectable.detectable.explanation.FoundExecutable) Explanation(com.synopsys.integration.detectable.detectable.explanation.Explanation) SbtMissingPluginDetectableResult(com.synopsys.integration.detectable.detectable.result.SbtMissingPluginDetectableResult) ArrayList(java.util.ArrayList) FoundSbtPlugin(com.synopsys.integration.detectable.detectable.explanation.FoundSbtPlugin) PassedDetectableResult(com.synopsys.integration.detectable.detectable.result.PassedDetectableResult)

Aggregations

Explanation (com.synopsys.integration.detectable.detectable.explanation.Explanation)1 FoundExecutable (com.synopsys.integration.detectable.detectable.explanation.FoundExecutable)1 FoundSbtPlugin (com.synopsys.integration.detectable.detectable.explanation.FoundSbtPlugin)1 ExecutableNotFoundDetectableResult (com.synopsys.integration.detectable.detectable.result.ExecutableNotFoundDetectableResult)1 PassedDetectableResult (com.synopsys.integration.detectable.detectable.result.PassedDetectableResult)1 SbtMissingPluginDetectableResult (com.synopsys.integration.detectable.detectable.result.SbtMissingPluginDetectableResult)1 ArrayList (java.util.ArrayList)1