analyze component dependencies
765086
function analyzeDependencies(component) {
  const checkList = ['base'];

  search(
    dependencyTree({
      directory: dir,
      filename: path.join(dir, component, 'index.js'),
      filter: path => !~path.indexOf('node_modules')
    }),
    component,
    checkList
  );

  if (!whiteList.includes(component)) {
    checkList.push(component);
  }

  return checkList.filter(item => checkComponentHasStyle(item));
}
1219950
def show_dependencies(self, stream=sys.stdout):
        """"""
        def child_iter(node):
            return [d.node for d in node.deps]

        def text_str(node):
            return colored(str(node), color=node.status.color_opts["color"])

        for task in self.iflat_tasks():
            print(draw_tree(task, child_iter, text_str), file=stream)
322176
def has_resolved_dependencies(self):
        """"""
        for dependency in self.dependencies:
            if dependency.state != Task.State.DONE:
                return False

        return True
373344
def get_dependencies():
    """"""

    dependencies = []

    # Numpy
    dep_attrs = {
        "name": "numpy",
        "min_version": "1.1.0",
        "description": "required",
    }
    try:
        import numpy
        dep_attrs["version"] = numpy.version.version
    except ImportError:
        dep_attrs["version"] = None
    dependencies.append(dep_attrs)

    # wxPython
    dep_attrs = {
        "name": "wxPython",
        "min_version": "2.8.10.1",
        "description": "required",
    }
    try:
        import wx
        dep_attrs["version"] = wx.version()
    except ImportError:
        dep_attrs["version"] = None
    dependencies.append(dep_attrs)

    # Matplotlib
    dep_attrs = {
        "name": "matplotlib",
        "min_version": "1.1.1",
        "description": "required",
    }
    try:
        import matplotlib
        dep_attrs["version"] = matplotlib._version.get_versions()["version"]
    except ImportError:
        dep_attrs["version"] = None
    except AttributeError:
        # May happen in old matplotlib versions
        dep_attrs["version"] = matplotlib.__version__

    dependencies.append(dep_attrs)

    # Pycairo
    dep_attrs = {
        "name": "pycairo",
        "min_version": "1.8.8",
        "description": "required",
    }
    try:
        import cairo
        dep_attrs["version"] = cairo.version
    except ImportError:
        dep_attrs["version"] = None
    dependencies.append(dep_attrs)

    # Python GnuPG
    dep_attrs = {
        "name": "python-gnupg",
        "min_version": "0.3.0",
        "description": "for opening own files without approval",
    }
    try:
        import gnupg
        dep_attrs["version"] = gnupg.__version__
    except ImportError:
        dep_attrs["version"] = None
    dependencies.append(dep_attrs)

    # xlrd
    dep_attrs = {
        "name": "xlrd",
        "min_version": "0.9.2",
        "description": "for loading Excel files",
    }
    try:
        import xlrd
        dep_attrs["version"] = xlrd.__VERSION__
    except ImportError:
        dep_attrs["version"] = None
    dependencies.append(dep_attrs)

    # xlwt
    dep_attrs = {
        "name": "xlwt",
        "min_version": "0.7.2",
        "description": "for saving Excel files",
    }
    try:
        import xlwt
        dep_attrs["version"] = xlwt.__VERSION__
    except ImportError:
        dep_attrs["version"] = None
    dependencies.append(dep_attrs)

    # Jedi
    dep_attrs = {
        "name": "jedi",
        "min_version": "0.8.0",
        "description": "for tab completion and context help in the entry line",
    }
    try:
        import jedi
        dep_attrs["version"] = jedi.__version__
    except ImportError:
        dep_attrs["version"] = None
    dependencies.append(dep_attrs)

    # pyrsvg
    dep_attrs = {
        "name": "pyrsvg",
        "min_version": "2.32",
        "description": "for displaying SVG files in cells",
    }
    try:
        import rsvg
        dep_attrs["version"] = True
    except ImportError:
        dep_attrs["version"] = None
    dependencies.append(dep_attrs)

    # pyenchant
    dep_attrs = {
        "name": "pyenchant",
        "min_version": "1.6.6",
        "description": "for spell checking",
    }
    try:
        import enchant
        dep_attrs["version"] = enchant.__version__
    except ImportError:
        dep_attrs["version"] = None
    dependencies.append(dep_attrs)

    return dependencies
1132285
function getDependencies (injector, dependencies) {
  return dependencies.map((name) => {
    let dependency = injector.getComponent(name);

    if (!dependency) {
      /* Anything starting 'npm:' is automatically included */
      if (/^npm:/.test(name)) {
        const npmModule = name.substr(4);

        injector.registerComponent({
          // eslint-disable-next-line import/no-dynamic-require, global-require
          factory: () => require(npmModule),
          name,
        });

        dependency = injector.getComponent(name);
      } else {
        throw new Error(`Missing dependency: ${name}`);
      }
    }

    /* If instance hasn't already been processed, process it */
    if (!dependency.instance) {
      dependency.instance = injector.process(dependency.factory, dependency.deps);
    }

    return dependency.instance;
  });
}
484255
function searchDependencies (dependencies, root) {
  if (!dependencies) {
    return Promise.resolve([])
  } else {
    var pluginPkgPath
    var pluginPkgPaths = []
    for (var key in dependencies) {
      pluginPkgPath = path.join(root, 'node_modules', key)
      pluginPkgPaths.push(pluginPkgPath)
    }
    return Promise.all(pluginPkgPaths.map(function (pkgRoot) {
      var pkgPath = path.join(pkgRoot, 'package.json')
      return readJSON(pkgPath)
        .then(function (pkg) {
          if (pkg.vigour && pkg.vigour.plugin) {
            return searchDependencies(pkg.dependencies, pkgRoot)
              .then(function (deps) {
                return searchDependencies(pkg.dependencies, root)
                  .then(function (otherDeps) {
                    return deps.concat(otherDeps)
                  })
              })
          } else {
            return false
          }
        })
        .catch(function (reason) {
          return false
        })
    }))
    .then(function (arr) {
      arr = _flatten(arr)
      return pluginPkgPaths.concat(arr.reduce(function (prev, curr) {
        if (curr) {
          prev.push(curr)
        }
        return prev
      }, []))
    })
  }
}
421249
def dependencies(project_name):
    """"""
    log = logging.getLogger('ciu')
    log.info('Locating dependencies for {}'.format(project_name))
    located = distlib.locators.locate(project_name, prereleases=True)
    if not located:
        log.warning('{0} not found'.format(project_name))
        return None
    return {packaging.utils.canonicalize_name(pypi.just_name(dep))
            for dep in located.run_requires}
707850
function showLinkedDeps() {
  const linkedDeps = getLinkedDeps(packageKeys, packageHash);
  if (linkedDeps.length) {
    logPkgsMsg('Linked', linkedDeps);
  } else {
    log('No linked dependencies found');
  }
}
1309431
def parse_dependencies(dependencies: List[List[str]],
                       patton_config: PattonRunningConfig) -> Dict:
    """"""

    result = {}

    for source_type, source_content in dependencies:

        # Select parser
        parser = DEPENDENCIES_PARSERS[patton_config.source_type]

        if not source_content:
            continue

        if source_type == "cli_input":
            fixed_source = "\n".join(source_content)
        else:
            fixed_source = source_content

        result.update(parser(fixed_source, patton_config))

    return result
1352587
protected void getDependencies(JSONObject jsonObject, String rootDirectory, Collection<DependencyInfo> dependencies) {
        try {
            CommandLineProcess npmLs = new CommandLineProcess(rootDirectory, getLsCommandParams());
            npmLs.setTimeoutReadLineSeconds(this.npmTimeoutDependenciesCollector);
            List<String> linesOfNpmLs = npmLs.executeProcess();
            getDependencies(jsonObject, linesOfNpmLs, 1, dependencies);
        } catch (IOException e) {
            logger.warn("Error getting dependencies after running 'npm ls --json' on {}, error : {}", rootDirectory, e.getMessage());
            logger.debug("Error: {}", e.getStackTrace());
        }
    }
681766
function Dependencies(module, dependencies) {
        "use strict";
    
        var modules = {};
        Object.defineProperty(this, 'modules', {
            'get': function () {
                return modules;
            }
        });
    
        this.set = function (value) {
    
            if (dependencies) {
                console.error('Module dependencies can only be set once')
                return;
            }
            dependencies = value;
            load();
    
        };
    
        var ready;
        Object.defineProperty(this, 'loaded', {
            'get': function () {
                return !!ready;
            }
        });
    
        var callbacks = [];
    
        function done() {
    
            ready = true;
            for (var i in callbacks) {
                callbacks[i](modules);
            }
            callbacks = [];
    
        }
    
        this.done = function (callback) {
    
            if (ready) {
                callback(modules);
                return;
            }
            callbacks.push(callback);
    
        };
    
        var coordinate = new Coordinate(
            'controls',
            'require',
            'react',
            done);
    
        function getResourcePath(resource) {
    
            if (resource.substr(0, 12) === 'application/') {
                return 'application/' + resource.substr(12);
            }
    
            if (resource.substr(0, 10) !== 'libraries/') {
                return resource;
            }
    
            var type;
    
            // Extract the type of the resource to get the moduleID
            var moduleID = (function (resource) {
    
                resource = resource.split('/');
                type = resource.pop();
                return resource.join('/');
    
            })(resource);
    
            var multilanguage = beyond.modules.multilanguage.get(moduleID);
            if (multilanguage && multilanguage.indexOf(type) !== -1) {
                return resource + '/' + beyond.params.language;
            }
            else {
                return resource;
            }
    
        }
    
        function load() {
    
            var mods = [];
    
            var dependency;
            for (var resource in dependencies.require) {
                mods.push(getResourcePath(resource));
            }
    
            // Wait for react to be ready if react is on the dependencies list
            if (mods.indexOf('react') !== -1) {
                module.react.done(coordinate.react);
            }
            else {
                coordinate.done('react');
            }
    
            if (mods.length) {
    
                require(mods, function () {
    
                    var args = [].slice.call(arguments);
    
                    var i = 0;
                    for (dependency in dependencies.require) {
    
                        var name = dependencies.require[dependency];
                        modules[name] = args[i];
                        i++;
    
                    }
    
                    coordinate.done('require');
    
                });
    
            }
            else {
                coordinate.done('require');
            }
    
            if (dependencies.controls instanceof Array && dependencies.controls.length) {
                beyond.controls.import(dependencies.controls, coordinate.controls);
            }
            else {
                coordinate.done('controls');
            }
    
        }
    
        if (dependencies) load();
    
    }
1317374
def dependencies(self):
        
        extra_input_rows = max(0, self.window_length - 1)
        out = {}
        for term in self.inputs:
            out[term] = extra_input_rows
        out[self.mask] = 0
        return out
694754
def check_dependencies(self):
        ""
        if self.test_program == 'nose':
            try:
                import nose
            except ImportError:
                sys.exit('Nosetests is not available on your system. Please install it and try to run it again')
        if self.test_program == 'py':
            try:
                import py
            except:
                sys.exit('py.test is not available on your system. Please install it and try to run it again')
        if self.test_program == 'django':
            try:
                import django
            except:
                sys.exit('django is not available on your system. Please install it and try to run it again')
        if self.test_program == 'phpunit':
            try:
                process = subprocess.check_call(['phpunit','--version']) 
            except:
                sys.exit('phpunit is not available on your system. Please install it and try to run it again')
        if self.test_program == 'tox':
            try:
                import tox
            except ImportError:
                sys.exit('tox is not available on your system. Please install it and try to run it again')
1091975
private function analyze()
	{
		// Check if we have component, module, plugin etc.
		if (!file_exists($this->getSourceFolder() . "/administrator/components/com_" . $this->getExtensionName())
			&& !file_exists($this->getSourceFolder() . "/components/com_" . $this->getExtensionName()))
		{
			$this->say("Extension has no component");
			$this->hasComponent = false;
		}

		if (!file_exists($this->getSourceFolder() . "/modules"))
		{
			$this->hasModules = false;
		}

		if (!file_exists($this->getSourceFolder() . "/plugins"))
		{
			$this->hasPlugins = false;
		}

		if (!file_exists($this->getSourceFolder() . "/templates"))
		{
			$this->hasTemplates = false;
		}

		if (!file_exists($this->getSourceFolder() . "/libraries"))
		{
			$this->hasLibraries = false;
		}

		if (!file_exists($this->getSourceFolder() . "/administrator/manifests/packages"))
		{
			$this->hasPackage = false;
		}

		if (!file_exists($this->getSourceFolder() . "/components/com_comprofiler"))
		{
			$this->hasCBPlugins = false;
		}
	}
1356996
@Override
    public void analyzeDependency(Dependency dependency, Engine engine) throws AnalysisException {
        final File test = new File(dependency.getActualFilePath());
        if (!test.isFile()) {
            throw new AnalysisException(String.format("%s does not exist and cannot be analyzed by dependency-check",
                    dependency.getActualFilePath()));
        }
        if (grokAssembly == null) {
            LOGGER.warn("GrokAssembly didn't get deployed");
            return;
        }
        if (baseArgumentList == null) {
            LOGGER.warn("Assembly Analyzer was unable to execute");
            return;
        }
        final List<String> args = new ArrayList<>(baseArgumentList);
        args.add(dependency.getActualFilePath());
        final ProcessBuilder pb = new ProcessBuilder(args);
        try {
            final Process proc = pb.start();
            final GrokParser parser = new GrokParser();
            final AssemblyData data = parser.parse(proc.getInputStream());

            // Try evacuating the error stream
            final String errorStream = IOUtils.toString(proc.getErrorStream(), StandardCharsets.UTF_8);
            if (null != errorStream && !errorStream.isEmpty()) {
                LOGGER.warn("Error from GrokAssembly: {}", errorStream);
            }

            final int rc;
            try {
                rc = proc.waitFor();
            } catch (InterruptedException ie) {
                Thread.currentThread().interrupt();
                return;
            }
            if (rc == 3) {
                LOGGER.debug("{} is not a .NET assembly or executable and as such cannot be analyzed by dependency-check",
                        dependency.getActualFilePath());
                return;
            } else if (rc != 0) {
                LOGGER.debug("Return code {} from GrokAssembly; dependency-check is unable to analyze the library: {}",
                        rc, dependency.getActualFilePath());
                return;
            }

            // First, see if there was an error
            final String error = data.getError();
            if (error != null && !error.isEmpty()) {
                throw new AnalysisException(error);
            }
            if (data.getWarning() != null) {
                LOGGER.debug("Grok Assembly - could not get namespace on dependency `{}` - ()", dependency.getActualFilePath(), data.getWarning());
            }

            final StringBuilder sb = new StringBuilder();
            if (!StringUtils.isEmpty(data.getFileDescription())) {
                sb.append(data.getFileDescription());
            }
            if (!StringUtils.isEmpty(data.getComments())) {
                if (sb.length() > 0) {
                    sb.append("\n\n");
                }
                sb.append(data.getComments());
            }
            if (!StringUtils.isEmpty(data.getLegalCopyright())) {
                if (sb.length() > 0) {
                    sb.append("\n\n");
                }
                sb.append(data.getLegalCopyright());
            }
            if (!StringUtils.isEmpty(data.getLegalTrademarks())) {
                if (sb.length() > 0) {
                    sb.append("\n");
                }
                sb.append(data.getLegalTrademarks());
            }
            final String description = sb.toString();
            if (description.length() > 0) {
                dependency.setDescription(description);
                addMatchingValues(data.getNamespaces(), description, dependency, EvidenceType.VENDOR);
                addMatchingValues(data.getNamespaces(), description, dependency, EvidenceType.PRODUCT);
            }

            if (!StringUtils.isEmpty(data.getProductVersion())) {
                dependency.addEvidence(EvidenceType.VERSION, "grokassembly", "ProductVersion", data.getProductVersion(), Confidence.HIGHEST);
            }
            if (!StringUtils.isEmpty(data.getFileVersion())) {
                dependency.addEvidence(EvidenceType.VERSION, "grokassembly", "FileVersion", data.getFileVersion(), Confidence.HIGHEST);
            }

            if (data.getFileVersion() != null && data.getProductVersion() != null) {
                final int max = data.getFileVersion().length() > data.getProductVersion().length()
                        ? data.getProductVersion().length() : data.getFileVersion().length();
                int pos;
                for (pos = 0; pos < max; pos++) {
                    if (data.getFileVersion().charAt(pos) != data.getProductVersion().charAt(pos)) {
                        break;
                    }
                }
                final DependencyVersion fileVersion = DependencyVersionUtil.parseVersion(data.getFileVersion(), true);
                final DependencyVersion productVersion = DependencyVersionUtil.parseVersion(data.getProductVersion(), true);
                if (pos > 0) {
                    final DependencyVersion matchingVersion = DependencyVersionUtil.parseVersion(data.getFileVersion().substring(0, pos), true);
                    if (fileVersion.toString().length() == data.getFileVersion().length()) {
                        if (matchingVersion != null && matchingVersion.getVersionParts().size() > 2) {
                            dependency.addEvidence(EvidenceType.VERSION, "AssemblyAnalyzer", "FilteredVersion",
                                    matchingVersion.toString(), Confidence.HIGHEST);
                            dependency.setVersion(matchingVersion.toString());
                        }
                    }
                }
                if (dependency.getVersion() == null) {
                    if (data.getFileVersion().length() >= data.getProductVersion().length()) {
                        if (fileVersion.toString().length() == data.getFileVersion().length()) {
                            dependency.setVersion(fileVersion.toString());
                        } else if (productVersion.toString().length() == data.getProductVersion().length()) {
                            dependency.setVersion(productVersion.toString());
                        }
                    } else {
                        if (productVersion.toString().length() == data.getProductVersion().length()) {
                            dependency.setVersion(productVersion.toString());
                        } else if (fileVersion.toString().length() == data.getFileVersion().length()) {
                            dependency.setVersion(fileVersion.toString());
                        }
                    }
                }
            } else if (data.getFileVersion() != null) {
                final DependencyVersion version = DependencyVersionUtil.parseVersion(data.getFileVersion(), true);
                dependency.setVersion(version.toString());
            } else if (data.getProductVersion() != null) {
                final DependencyVersion version = DependencyVersionUtil.parseVersion(data.getProductVersion(), true);
                dependency.setVersion(version.toString());
            }

            if (!StringUtils.isEmpty(data.getCompanyName())) {
                dependency.addEvidence(EvidenceType.VENDOR, "grokassembly", "CompanyName", data.getCompanyName(), Confidence.HIGHEST);
                addMatchingValues(data.getNamespaces(), data.getCompanyName(), dependency, EvidenceType.VENDOR);
            }
            if (!StringUtils.isEmpty(data.getProductName())) {
                dependency.addEvidence(EvidenceType.PRODUCT, "grokassembly", "ProductName", data.getProductName(), Confidence.HIGHEST);
                addMatchingValues(data.getNamespaces(), data.getProductName(), dependency, EvidenceType.PRODUCT);
            }
            if (!StringUtils.isEmpty(data.getFileDescription())) {
                dependency.addEvidence(EvidenceType.PRODUCT, "grokassembly", "FileDescription", data.getFileDescription(), Confidence.HIGH);
                addMatchingValues(data.getNamespaces(), data.getFileDescription(), dependency, EvidenceType.PRODUCT);
            }

            final String internalName = data.getInternalName();
            if (!StringUtils.isEmpty(internalName)) {
                dependency.addEvidence(EvidenceType.PRODUCT, "grokassembly", "InternalName", internalName, Confidence.MEDIUM);
                addMatchingValues(data.getNamespaces(), internalName, dependency, EvidenceType.PRODUCT);
                addMatchingValues(data.getNamespaces(), internalName, dependency, EvidenceType.VENDOR);
                if (dependency.getName() == null && StringUtils.containsIgnoreCase(dependency.getActualFile().getName(), internalName)) {
                    final String ext = FileUtils.getFileExtension(internalName);
                    if (ext != null) {
                        dependency.setName(internalName.substring(0, internalName.length() - ext.length() - 1));
                    } else {
                        dependency.setName(internalName);
                    }
                }
            }

            final String originalFilename = data.getOriginalFilename();
            if (!StringUtils.isEmpty(originalFilename)) {
                dependency.addEvidence(EvidenceType.PRODUCT, "grokassembly", "OriginalFilename", originalFilename, Confidence.MEDIUM);
                addMatchingValues(data.getNamespaces(), originalFilename, dependency, EvidenceType.PRODUCT);
                if (dependency.getName() == null && StringUtils.containsIgnoreCase(dependency.getActualFile().getName(), originalFilename)) {
                    final String ext = FileUtils.getFileExtension(originalFilename);
                    if (ext != null) {
                        dependency.setName(originalFilename.substring(0, originalFilename.length() - ext.length() - 1));
                    } else {
                        dependency.setName(originalFilename);
                    }
                }
            }
            if (dependency.getName() != null && dependency.getVersion() != null) {
                try {
                    dependency.addSoftwareIdentifier(new PurlIdentifier("generic", dependency.getName(), dependency.getVersion(), Confidence.MEDIUM));
                } catch (MalformedPackageURLException ex) {
                    LOGGER.debug("Unable to create Package URL Identifier for " + dependency.getName(), ex);
                    dependency.addSoftwareIdentifier(new GenericIdentifier(
                            String.format("%s@%s", dependency.getName(), dependency.getVersion()),
                            Confidence.MEDIUM));
                }
            }
            dependency.setEcosystem(DEPENDENCY_ECOSYSTEM);
        } catch (GrokParseException saxe) {
            LOGGER.error("----------------------------------------------------");
            LOGGER.error("Failed to read the Assembly Analyzer results.");
            LOGGER.error("----------------------------------------------------");
            throw new AnalysisException("Couldn't parse Assembly Analyzer results (GrokAssembly)", saxe);
        } catch (IOException ioe) {
            throw new AnalysisException(ioe);
        }
    }
649988
@Override
    public void analyzeDependency(Dependency dependency, Engine engine) throws AnalysisException {
        for (Evidence e : dependency.getEvidence(EvidenceType.VENDOR)) {
            if ("pom".equals(e.getSource())) {
                return;
            }
        }
        try {
            final List<MavenArtifact> mas = fetchMavenArtifacts(dependency);
            final Confidence confidence = mas.size() > 1 ? Confidence.HIGH : Confidence.HIGHEST;
            for (MavenArtifact ma : mas) {
                LOGGER.debug("Central analyzer found artifact ({}) for dependency ({})", ma, dependency.getFileName());
                dependency.addAsEvidence("central", ma, confidence);

                if (ma.getPomUrl() != null) {
                    File pomFile = null;
                    try {
                        final File baseDir = getSettings().getTempDirectory();
                        pomFile = File.createTempFile("pom", ".xml", baseDir);
                        if (!pomFile.delete()) {
                            LOGGER.warn("Unable to fetch pom.xml for {} from Central; "
                                    + "this could result in undetected CPE/CVEs.", dependency.getFileName());
                            LOGGER.debug("Unable to delete temp file");
                        }
                        LOGGER.debug("Downloading {}", ma.getPomUrl());
                        final Downloader downloader = new Downloader(getSettings());
                        final int maxAttempts = this.getSettings().getInt(Settings.KEYS.ANALYZER_CENTRAL_RETRY_COUNT, 3);
                        int retryCount = 0;
                        long sleepingTimeBetweenRetriesInMillis = BASE_RETRY_WAIT;
                        boolean success = false;
                        do {
                            //CSOFF: NestedTryDepth
                            try {
                                downloader.fetchFile(new URL(ma.getPomUrl()), pomFile);
                                success = true;
                            } catch (DownloadFailedException ex) {
                                try {
                                    Thread.sleep(sleepingTimeBetweenRetriesInMillis);
                                    sleepingTimeBetweenRetriesInMillis *= 2;
                                } catch (InterruptedException ex1) {
                                    throw new UnexpectedAnalysisException(ex1);
                                }
                            }
                            //CSON: NestedTryDepth
                        } while (!success && retryCount++ < maxAttempts);
                        if (success) {
                            PomUtils.analyzePOM(dependency, pomFile);
                        } else {
                            LOGGER.warn("Unable to download pom.xml for {} from Central; "
                                    + "this could result in undetected CPE/CVEs.", dependency.getFileName());
                        }

                    } catch (AnalysisException ex) {
                        LOGGER.warn(MessageFormat.format("Unable to analyze pom.xml for {0} from Central; "
                                + "this could result in undetected CPE/CVEs.", dependency.getFileName()), ex);

                    } finally {
                        if (pomFile != null && pomFile.exists() && !FileUtils.deleteQuietly(pomFile)) {
                            LOGGER.debug("Failed to delete temporary pom file {}", pomFile.toString());
                            pomFile.deleteOnExit();
                        }
                    }
                }
            }
        } catch (IllegalArgumentException iae) {
            LOGGER.info("invalid sha1-hash on {}", dependency.getFileName());
        } catch (FileNotFoundException fnfe) {
            LOGGER.debug("Artifact not found in repository: '{}", dependency.getFileName());
        } catch (IOException ioe) {
            final String message = "Could not connect to Central search. Analysis failed.";
            LOGGER.error(message, ioe);
            throw new AnalysisException(message, ioe);
        }
    }
631424
def get_dependencies(ctx, archive_name, version):
    '''
    
    '''

    _generate_api(ctx)

    var = ctx.obj.api.get_archive(archive_name)

    deps = []

    dependencies = var.get_dependencies(version=version)
    for arch, dep in dependencies.items():
        if dep is None:
            deps.append(arch)
        else:
            deps.append('{}=={}'.format(arch, dep))

    click.echo('\n'.join(deps))