use of com.synopsys.integration.detectable.detectable.Requirements in project synopsys-detect by blackducksoftware.
the class LernaDetectable method applicable.
@Override
public DetectableResult applicable() {
Requirements requirements = new Requirements(fileFinder, environment);
requirements.file(LERNA_JSON);
return requirements.result();
}
use of com.synopsys.integration.detectable.detectable.Requirements in project synopsys-detect by blackducksoftware.
the class LernaDetectable method extractable.
@Override
public DetectableResult extractable() throws DetectableException {
Requirements requirements = new Requirements(fileFinder, environment);
// Lerna is used in conjunction with traditional NPM projects or Yarn projects.
File packageLockFile = fileFinder.findFile(environment.getDirectory(), PACKAGE_LOCK_JSON);
File shrinkwrapFile = fileFinder.findFile(environment.getDirectory(), SHRINKWRAP_JSON);
File yarnLockFile = fileFinder.findFile(environment.getDirectory(), YARN_LOCK);
if (packageLockFile == null && shrinkwrapFile == null && yarnLockFile == null) {
return new FilesNotFoundDetectableResult(PACKAGE_LOCK_JSON, YARN_LOCK);
}
requirements.explainNullableFile(packageLockFile);
requirements.explainNullableFile(shrinkwrapFile);
requirements.explainNullableFile(yarnLockFile);
packageJson = requirements.file(PACKAGE_JSON);
lernaExecutable = requirements.executable(lernaResolver::resolveLerna, "lerna");
return requirements.result();
}
use of com.synopsys.integration.detectable.detectable.Requirements in project synopsys-detect by blackducksoftware.
the class MavenPomDetectable method extractable.
@Override
public DetectableResult extractable() throws DetectableException {
Requirements requirements = new Requirements(fileFinder, environment);
mavenExe = requirements.executable(() -> mavenResolver.resolveMaven(environment), "maven");
return requirements.result();
}
use of com.synopsys.integration.detectable.detectable.Requirements in project synopsys-detect by blackducksoftware.
the class MavenParseDetectable method applicable.
@Override
public DetectableResult applicable() {
if (mavenParseOptions.isEnableLegacyMode()) {
Requirements requirements = new Requirements(fileFinder, environment);
pomXmlFile = requirements.file(POM_XML_FILENAME);
return requirements.result();
} else {
return new PropertyInsufficientDetectableResult("Maven legacy buildless parse must be enabled.");
}
}
use of com.synopsys.integration.detectable.detectable.Requirements in project synopsys-detect by blackducksoftware.
the class MavenProjectInspectorDetectable method extractable.
@Override
public DetectableResult extractable() throws DetectableException {
Requirements requirements = new Requirements(fileFinder, environment);
inspector = requirements.executable(projectInspectorResolver::resolveProjectInspector, "Project Inspector");
return requirements.result();
}
Aggregations