当前位置: 首页>>代码示例>>Java>>正文


Java DependencyNode.getChildren方法代码示例

本文整理汇总了Java中org.eclipse.aether.graph.DependencyNode.getChildren方法的典型用法代码示例。如果您正苦于以下问题:Java DependencyNode.getChildren方法的具体用法?Java DependencyNode.getChildren怎么用?Java DependencyNode.getChildren使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.eclipse.aether.graph.DependencyNode的用法示例。


在下文中一共展示了DependencyNode.getChildren方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: visitEnter

import org.eclipse.aether.graph.DependencyNode; //导入方法依赖的package包/类
@Override
public boolean visitEnter(DependencyNode dependencyNode) {
  if (dependencyNode == null || dependencyNode.getDependency().isOptional()) {
    return false;
  }
  MavenJarRule rule = getRule(dependencyNode);
  boolean isFirstVisit = visited.add(rule);
  if (!isFirstVisit) {
    return false;
  }
  for (DependencyNode child : dependencyNode.getChildren()) {
    MavenJarRule childRule = getRule(child);
    ruleGraph.putEdge(rule, childRule);
  }
  return true;
}
 
开发者ID:bazelbuild,项目名称:migration-tooling,代码行数:17,代码来源:GraphSerializer.java

示例2: processDependencyNode

import org.eclipse.aether.graph.DependencyNode; //导入方法依赖的package包/类
private void processDependencyNode(DependencyNode dependencyNode) {
    Artifact artifact = dependencyNode.getArtifact();
    if (!aetherPlugin.getVersionMap().containsKey(artifact.getGroupId()))
        aetherPlugin.getVersionMap().put(artifact.getGroupId(), new HashMap<>());
    aetherPlugin.getVersionMap().get(artifact.getGroupId()).put(artifact.getArtifactId(), artifact.getVersion());
    for (DependencyNode node : dependencyNode.getChildren()) {
        processDependencyNode(node);
    }
}
 
开发者ID:SetoKaiba,项目名称:aether-gradle-plugin,代码行数:10,代码来源:VersionResolverDependencyResolveDetails.java

示例3: collectDeps

import org.eclipse.aether.graph.DependencyNode; //导入方法依赖的package包/类
protected void collectDeps(DependencyNode n0, MavenProject p, int depth) {
    getLog().debug("Collecting dependencies of "+n0+"/"+p+" at depth "+depth);
    depNodesByIdCache.put(Coords.of(n0).normal(), n0);
    
    if (n0.getDependency()!=null) {
        if (n0.getDependency().isOptional() && (depth>1 || excludeRootOptionalDependencies)) {
            getLog().warn("Optional dependency found in dependency tree: "+n0);
            return;
        }
        if (!includeScope(n0.getDependency().getScope())) {
            getLog().debug("Skipping "+n0.getDependency().getScope()+" dependency: "+n0);
            return;
        }
    }

    DefaultArtifact n0art = newMavenArtifact(n0.getArtifact());
    if (p==null && n0.getArtifact()!=null) p = loadProject(n0art);
    
    includedBaseArtifactsCoordsToProject.put(Coords.of(n0).baseArtifact(), Coords.of(n0).normal());
    includedProjects.add(Coords.of(n0).normal());
    includedArtifactsUnversionedToBaseArtifactCoords.put(Coords.of(n0).unversionedArtifact(), Coords.of(n0).baseArtifact());
    includedProjectsUnversionedToVersioned.put(Coords.of(n0).unversioned(), Coords.of(n0).normal());
    projectArtifacts.put(Coords.of(n0).normal(), n0art);
    
    if (depth>=this.maxDepth) return;
    
    for (DependencyNode n: n0.getChildren()) {
        projectToDependencyGraphParent.put(Coords.of(n).normal(), Coords.of(n0).normal());
        collectDeps(n, null, depth+1);
    }
}
 
开发者ID:ahgittin,项目名称:license-audit-maven-plugin,代码行数:32,代码来源:AbstractLicensingMojo.java

示例4: scan

import org.eclipse.aether.graph.DependencyNode; //导入方法依赖的package包/类
public void scan(DependencyNode rootNode, boolean useTransitiveDependencies) throws MojoExecutionException {
    for (DependencyNode child : rootNode.getChildren()) {
        scan(child, Accept.ACCEPT, useTransitiveDependencies, false, "");
    }
    if (useTransitiveDependencies) {
        localDependencies.keySet().removeAll(dependencies);
    }
}
 
开发者ID:retog,项目名称:karaf-maven-plugin,代码行数:9,代码来源:Dependency31Helper.java

示例5: fromNode

import org.eclipse.aether.graph.DependencyNode; //导入方法依赖的package包/类
private AddonInfo fromNode(AddonId id, DependencyNode dependencyNode, RepositorySystem system, Settings settings,
         DefaultRepositorySystemSession session)
{
   AddonInfoBuilder builder = AddonInfoBuilder.from(id);
   List<DependencyNode> children = dependencyNode.getChildren();
   for (DependencyNode child : children)
   {
      Dependency dependency = child.getDependency();
      Artifact artifact = dependency.getArtifact();
      if (isAddon(artifact))
      {
         AddonId childId = toAddonId(artifact);
         boolean exported = false;
         boolean optional = dependency.isOptional();
         String scope = dependency.getScope();
         if (scope != null && !optional)
         {
            if ("compile".equalsIgnoreCase(scope) || "runtime".equalsIgnoreCase(scope))
               exported = true;
            else if ("provided".equalsIgnoreCase(scope))
               exported = false;
         }
         DependencyNode node = traverseAddonGraph(toMavenCoords(childId), system, settings, session);
         AddonInfo addonInfo = fromNode(childId, node, system, settings, session);
         if (optional)
         {
            builder.addOptionalDependency(addonInfo, exported);
         }
         else
         {
            builder.addRequiredDependency(addonInfo, exported);
         }
      }
   }
   return new LazyAddonInfo(this, builder);
}
 
开发者ID:koentsje,项目名称:forge-furnace,代码行数:37,代码来源:MavenAddonDependencyResolver.java

示例6: NodeClassLoader

import org.eclipse.aether.graph.DependencyNode; //导入方法依赖的package包/类
@SuppressWarnings("unchecked")
protected NodeClassLoader(BootClassLoader bootClassLoader, DependencyNode node) throws Exception {
	this.bootClassLoader = bootClassLoader;
	synchronized (NodeClassLoader.class) {
		this.nodeClassLoaderId = Long.valueOf(classLoaderId++);
	}
	this.node = node;
	this.artifactId = node.getArtifact().toString();
	this.bootClassLoader.addNodeClassLoader(this);
	this.depdendenciesNodeClassLoaders = Collections.synchronizedMap(new LinkedHashMap<String, NodeClassLoader>());
	this.dependenciesNodeClassLoadersArray = new NodeClassLoader [0];
	this.parentNodeClassLoaders = new Vector<NodeClassLoader>();
	this.classes = new Hashtable<String, Class<?>>();
	if (classesField != null) {
		this.jvmClasses = (List<Class<?>>)classesField.get(this);
	}
	if (log.isDebugEnabled()) {
		log.debug("Creating classloader " + this);
	}

	initArtifactFiles();
	
	//building the dependencies/children
	List<DependencyNode> children=node.getChildren();
	if (children!=null){
		for (DependencyNode n : children){
			if (n.getDependency().getArtifact().getFile()!=null){
				NodeClassLoader nodeClassLoader = bootClassLoader.getNodeClassLoader(n.getDependency().getArtifact().toString());
				if (nodeClassLoader==null) {
					nodeClassLoader = new NodeClassLoader(this.bootClassLoader, n);
				}
				addChild(nodeClassLoader);

			} else {
				if (log.isDebugEnabled()) {
					log.debug("Dependency " + n.getDependency().getArtifact() + " is excluded from classloader " + this);
				}
			}
		}
	}
}
 
开发者ID:microsofia,项目名称:microsofia-boot,代码行数:42,代码来源:NodeClassLoader.java

示例7: dump

import org.eclipse.aether.graph.DependencyNode; //导入方法依赖的package包/类
private void dump(String prefix, DependencyNode n) {
    getLog().debug(prefix+n+": "+n.getDependency()+" / "+n.getArtifact());
    for (DependencyNode nn: n.getChildren())
        dump(prefix+"  ", nn);
}
 
开发者ID:ahgittin,项目名称:license-audit-maven-plugin,代码行数:6,代码来源:AbstractLicensingMojo.java


注:本文中的org.eclipse.aether.graph.DependencyNode.getChildren方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。