Examples of DependencyNode


Examples of com.opengamma.engine.depgraph.DependencyNode

    for (final Entry<String, DependencyGraph> graphEntry : graphs.entrySet()) {
      final DependencyGraph graph = graphEntry.getValue();
      Set<ValueSpecification> resolvedValues = Sets.newHashSet();
      for (ComputedValue computedValue : results.getAllMarketData()) {
        resolvedValues.add(computedValue.getSpecification());
        final DependencyNode nodeProducing = graph.getNodeProducing(computedValue.getSpecification());
        if ((nodeProducing != null) && isTerminalUnstructuredOutput(nodeProducing, graph)) {
          ExternalIdBundle identifiers = resolveExternalIdBundle(resolver, computedValue.getSpecification());
          if (identifiers != null) {
            snapshot.putValue(identifiers, computedValue.getSpecification().getValueName(), new ValueSnapshot(computedValue.getValue()));
          }
View Full Code Here

Examples of org.apache.geronimo.kernel.config.DependencyNode

    }

    public LifecycleResults loadConfiguration(ConfigurationData configurationData, LifecycleMonitor monitor) throws NoSuchConfigException, LifecycleException {
        try {
            Artifact configId = configurationData.getEnvironment().getConfigId();
            Configuration configuration = new Configuration(configurationData, new DependencyNode(configId, null, null), null, null, null, this);
            configurations.put(configId, configuration);
        } catch (InvalidConfigException e) {

        }
        return null;
View Full Code Here

Examples of org.apache.maven.shared.dependency.graph.DependencyNode

        project.setArtifacts( artifacts );
        project.setDependencyArtifacts( directArtifacts );

        mojo.execute();

        DependencyNode rootNode = mojo.getDependencyGraph();
        assertNodeEquals( "testGroupId:project:jar:1.0:compile", rootNode );
        assertEquals( 2, rootNode.getChildren().size() );
        assertChildNodeEquals( "testGroupId:snapshot:jar:2.0-SNAPSHOT:compile", rootNode, 0 );
        assertChildNodeEquals( "testGroupId:release:jar:1.0:compile", rootNode, 1 );
    }
View Full Code Here

Examples of org.apache.maven.shared.dependency.tree.DependencyNode

        ZipException, IOException, DependencyTreeBuilderException {
        final Collection<Artifact> kernelArtifacts;
        if (kernelVersion == null) {
           getLog().info("Step 1: Building list of provided bundle exports");
           kernelArtifacts = new HashSet<Artifact>();
           DependencyNode tree = dependencyTreeBuilder.buildDependencyTree(project, localRepo, factory, artifactMetadataSource, new ArtifactFilter() {

            public boolean include(Artifact artifact) {
                return true;
            }
              
           }, collector);
           tree.accept(new DependencyNodeVisitor() {
                public boolean endVisit(DependencyNode node) {
                    // we want the next sibling too
                    return true;
                }
                public boolean visit(DependencyNode node) {
View Full Code Here

Examples of org.apache.maven.shared.dependency.tree.DependencyNode

    /*
     * Determine list of exports by bundles that have been marked provided in the pom
     * //TODO: we probably want to figure this out somewhere from the Karaf build itself instead of putting the burden on the user
     */
    private void readProvidedBundles() throws Exception {
        DependencyNode tree = dependencyTreeBuilder.buildDependencyTree(project, localRepo, factory, artifactMetadataSource, new ArtifactFilter() {

            public boolean include(Artifact artifact) {
                return true;
            }

        }, collector);
        tree.accept(new DependencyNodeVisitor() {
            public boolean endVisit(DependencyNode node) {
                // we want the next sibling too
                return true;
            }

View Full Code Here

Examples of org.apache.maven.shared.dependency.tree.DependencyNode

            getLog().warn( "Ignoring artifact due to dependency cycle " + project.getArtifact() );
            return null;
        }
        m_artifactsBeingProcessed.add( project.getArtifact() );

        DependencyNode dependencyTree;

        try
        {
            dependencyTree = m_dependencyTreeBuilder.buildDependencyTree( project, localRepository, m_factory,
                m_artifactMetadataSource, null, m_collector );
        }
        catch ( DependencyTreeBuilderException e )
        {
            throw new MojoExecutionException( "Unable to build dependency tree", e );
        }

        BundleInfo bundleInfo = new BundleInfo();

        if ( !dependencyTree.hasChildren() )
        {
            /* no need to traverse the tree */
            return bundleRoot( project, bundleInfo );
        }

        getLog().debug( "Will bundle the following dependency tree" + LS + dependencyTree );

        for ( Iterator it = dependencyTree.inverseIterator(); it.hasNext(); )
        {
            DependencyNode node = ( DependencyNode ) it.next();
            if ( !it.hasNext() )
            {
                /* this is the root, current project */
                break;
            }

            if ( node.getState() != DependencyNode.INCLUDED )
            {
                continue;
            }

            if ( Artifact.SCOPE_SYSTEM.equals( node.getArtifact().getScope() ) )
            {
                getLog().debug( "Ignoring system scoped artifact " + node.getArtifact() );
                continue;
            }

            Artifact artifact;
            try
            {
                artifact = resolveArtifact( node.getArtifact() );
            }
            catch ( ArtifactNotFoundException e )
            {
                if ( ignoreMissingArtifacts )
                {
                    continue;
                }

                throw new MojoExecutionException( "Artifact was not found in the repo" + node.getArtifact(), e );
            }

            node.getArtifact().setFile( artifact.getFile() );

            int nodeDepth = node.getDepth();
            if ( nodeDepth > maxDepth )
            {
                /* node is deeper than we want */
                getLog().debug(
                    "Ignoring " + node.getArtifact() + ", depth is " + nodeDepth + ", bigger than " + maxDepth );
                continue;
            }

            MavenProject childProject;
            try
View Full Code Here

Examples of org.apache.maven.shared.dependency.tree.DependencyNode

            finally
            {
                repositorySession.close();
            }

            DependencyNode rootNode = listener.getRootNode();

            // TODO: remove the need for this when the serializer can calculate last nodes from visitor calls only
            DependencyNodeVisitor visitor = new BuildingDependencyNodeVisitor( nodeVisitor );

            CollectingDependencyNodeVisitor collectingVisitor = new CollectingDependencyNodeVisitor();
            DependencyNodeVisitor firstPassVisitor =
                new FilteringDependencyNodeVisitor( collectingVisitor, StateDependencyNodeFilter.INCLUDED );
            rootNode.accept( firstPassVisitor );

            DependencyNodeFilter secondPassFilter =
                new AncestorOrSelfDependencyNodeFilter( collectingVisitor.getNodes() );
            visitor = new FilteringDependencyNodeVisitor( visitor, secondPassFilter );

            rootNode.accept( visitor );
        }
        catch ( ArtifactResolutionException e )
        {
            throw new DependencyTreeBuilderException( "Cannot build project dependency tree " + e.getMessage(), e );
        }
View Full Code Here

Examples of org.eclipse.aether.graph.DependencyNode

      }
      catch (DependencyResolutionException e)
      {
         throw new RuntimeException(e);
      }
      DependencyNode root = artifacts.getRoot();
      for (DependencyNode node : root.getChildren())
      {
         Dependency d = MavenConvertUtils.convertToDependency(factory, node);
         if (filter == null || filter.accept(d))
         {
            result.add(d);
View Full Code Here

Examples of org.jboss.forge.addon.dependencies.DependencyNode

   }

   @Test
   public void testResolveDependencyHierarchy() throws Exception
   {
      DependencyNode root = resolver
               .resolveDependencyHierarchy(DependencyQueryBuilder
                        .create("org.jboss.forge:resources:jar:forge-addon:2.0.0.Alpha3"));
      Assert.assertNotNull(root);
      Assert.assertEquals(5, root.getChildren().size());
      Assert.assertEquals("convert", root.getChildren().get(1).getDependency().getCoordinate().getArtifactId());
      // TODO: ui-hints was changed to ui-spi since 2.0.0.Alpha5
      Assert.assertEquals("ui-hints", root.getChildren().get(2).getDependency().getCoordinate().getArtifactId());
   }
View Full Code Here

Examples of org.jboss.forge.dependencies.DependencyNode

       * order, and then add them to a stack. This will guarantee their order.
       */
      Iterator<DependencyNode> iterator = DependencyNodeUtil.breadthFirstIterator(requestedAddonNode);
      while (iterator.hasNext())
      {
         DependencyNode node = iterator.next();
         if (DependencyNodeUtil.isForgeAddon(node.getDependency().getCoordinate()) && !node.equals(requestedAddonNode))
         {
            if (node.getDependency().isOptional())
            {
               optionalAddons.push(node);
            }
            else
            {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.