gpt4 book ai didi

io.squark.yggdrasil.maven.provider.api.YggdrasilDependencyMavenUtil类的使用及代码示例

转载 作者:知者 更新时间:2024-03-20 16:52:31 28 4
gpt4 key购买 nike

本文整理了Java中io.squark.yggdrasil.maven.provider.api.YggdrasilDependencyMavenUtil类的一些代码示例,展示了YggdrasilDependencyMavenUtil类的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。YggdrasilDependencyMavenUtil类的具体详情如下:
包路径:io.squark.yggdrasil.maven.provider.api.YggdrasilDependencyMavenUtil
类名称:YggdrasilDependencyMavenUtil

YggdrasilDependencyMavenUtil介绍

暂无

代码示例

代码示例来源:origin: io.squark.yggdrasil/yggdrasil-maven-provider

private YggdrasilDependency resolveDependencies(@Nullable final Artifact defaultArtifact,
    @Nullable List<Dependency> mavenDependencies, final RepositorySystem repositorySystem,
    final RepositorySystemSession repositorySystemSession, final List<RemoteRepository> remoteRepositories) throws
    DependencyCollectionException, org.eclipse.aether.resolution.DependencyResolutionException
{
  CollectRequest collectRequest = new CollectRequest();
  if (defaultArtifact != null) {
    Dependency dependency = new Dependency((defaultArtifact), null);
    collectRequest.setRoot(dependency);
  }
  if (mavenDependencies != null && mavenDependencies.size() > 0) {
    collectRequest.setDependencies(mavenDependencies);
  }
  for (RemoteRepository remoteRepository : remoteRepositories) {
    collectRequest.addRepository(remoteRepository);
  }
  DependencyNode node = repositorySystem.collectDependencies(repositorySystemSession, collectRequest).getRoot();
  if (logger.isDebugEnabled()) {
    Map<String, Object> logMap = new HashMap<>();
    logMap.put(node.toString(), nodeToMap(node));
    logger.debug("Collected the following dependencies: " + logMap);
  }
  DependencyRequest dependencyRequest = new DependencyRequest();
  dependencyRequest.setFilter(new ScopeDependencyFilter(null));
  dependencyRequest.setRoot(node);
  repositorySystem.resolveDependencies(repositorySystemSession, dependencyRequest);
  return YggdrasilDependencyMavenUtil.fromDependencyNode(node, null);
}

代码示例来源:origin: io.squark.yggdrasil/yggdrasil-maven-provider-api

if (CollectionUtils.isNotEmpty(dependencyNode.getChildren())) {
  for (DependencyNode child : dependencyNode.getChildren()) {
    children.add(fromDependencyNode(child, exclusions));

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com