Package org.apache.ivy.core.resolve

Examples of org.apache.ivy.core.resolve.IvyNode


    public Collection resolveConflicts(IvyNode parent, Collection conflicts) {
        if (conflicts.size() < 2) {
            return conflicts;
        }
        for (Iterator iter = conflicts.iterator(); iter.hasNext();) {
            IvyNode node = (IvyNode)iter.next();
            DependencyDescriptor dd = node.getDependencyDescriptor(parent);
            if (dd != null && dd.isForce()
                && parent.getResolvedId().equals(dd.getParentRevisionId())) {
                return Collections.singleton(node);
            }
        }
View Full Code Here


    }

    private ArtifactInfo[] toArtifactInfo(Collection conflicts) {
        List artifacts = new ArrayList(conflicts.size());
        for (Iterator iter = conflicts.iterator(); iter.hasNext();) {
            IvyNode node = (IvyNode)iter.next();
            artifacts.add(new IvyNodeArtifactInfo(node));
        }
        return (ArtifactInfo[])artifacts.toArray(new ArtifactInfo[artifacts.size()]);
    }
View Full Code Here

    }


    public Collection resolveConflicts(IvyNode parent, Collection conflicts)
    {
        IvyNode lastNode = null;
        for (Iterator iter = conflicts.iterator(); iter.hasNext();) {
            IvyNode node = (IvyNode)iter.next();

            if (lastNode != null && !lastNode.equals(node)) {
                String msg = lastNode + " (needed by " + Arrays.asList(lastNode.getAllCallers()) + ") conflicts with " + node + " (needed by " + Arrays.asList(node.getAllCallers()) + ")";
                Message.error(msg);
                Message.sumupProblems();
                throw new StrictConflictException(msg);
            }
            lastNode = node;
View Full Code Here

  public void setIgnoreNonMatching(boolean ignoreNonMatching) {
    mIgnoreNonMatching = ignoreNonMatching;
  }

  public Collection resolveConflicts(IvyNode parent, Collection conflicts) {
    IvyNode lastNode = null;
    for (Iterator iter = conflicts.iterator(); iter.hasNext();) {
      IvyNode node = (IvyNode) iter.next();

      if (lastNode != null && !matchEquals(node, lastNode)) {
        String msg = lastNode + ":" + getMatch(lastNode)
            + " (needed by " + Arrays.asList(lastNode.getAllCallers())
            + ") conflicts with " + node + ":" + getMatch(node)
            + " (needed by " + Arrays.asList(node.getAllCallers()) + ")";
        Message.error(msg);
        Message.sumupProblems();
        throw new StrictConflictException(msg);
      }
      if (lastNode == null || nodeIsGreater(node, lastNode)) {
View Full Code Here

        setName("fixed"+_revs);
    }
    public Collection resolveConflicts(IvyNode parent, Collection conflicts) {
        Collection resolved = new ArrayList(conflicts.size());
        for (Iterator iter = conflicts.iterator(); iter.hasNext();) {
            IvyNode node = (IvyNode)iter.next();
            String revision = node.getResolvedId().getRevision();
            if (_revs.contains(revision)) {
                resolved.add(node);
            }
        }
        return resolved;
View Full Code Here

            if (ivyRef != null) {
                Message.verbose("\t"+getName()+": found ivy file in cache for "+mrid);
                Message.verbose("\t\t=> "+ivyRef);

                ModuleRevisionId resolvedMrid = ModuleRevisionId.newInstance(mrid, ivyRef.getRevision());
                IvyNode node = data.getNode(resolvedMrid);
                if (node != null && node.getModuleRevision() != null) {
                    // this revision has already be resolved : return it
                    Message.verbose("\t"+getName()+": revision already resolved: "+resolvedMrid);
                    return searchedRmr(node.getModuleRevision());
                }
                ResolvedModuleRevision rmr = data.getCacheManager().findModuleInCache(resolvedMrid, doValidate(data));
                if (rmr != null) {
                    Message.verbose("\t"+getName()+": revision in cache: "+resolvedMrid);
                    return searchedRmr(rmr);
View Full Code Here

     * @return all non evicted and non error dependency mrids
     */
    public Set getModuleRevisionIds() {
    Set mrids = new LinkedHashSet();
    for (Iterator iter = getDependencies().iterator(); iter.hasNext();) {
      IvyNode node = (IvyNode) iter.next();
            if (!node.isEvicted(getConfiguration()) && !node.hasProblem()) {
                mrids.add(node.getResolvedId());
            }
    }
    return mrids;
  }
View Full Code Here

    return _md;
  }
  public IvyNode[] getUnresolvedDependencies() {
        List unresolved = new ArrayList();
        for (Iterator iter = getDependencies().iterator(); iter.hasNext();) {
            IvyNode node = (IvyNode)iter.next();
            if (node.hasProblem()) {
                unresolved.add(node);
            }
        }
    return (IvyNode[])unresolved.toArray(new IvyNode[unresolved.size()]);
  }
View Full Code Here

        return new LinkedHashSet(_dependencies.values());
    }
    public IvyNode[] getEvictedNodes() {
        List evicted = new ArrayList();
        for (Iterator iter = getDependencies().iterator(); iter.hasNext();) {
            IvyNode node = (IvyNode)iter.next();
            if (node.isEvicted(_conf)) {
                evicted.add(node);
            }
        }
        return (IvyNode[])evicted.toArray(new IvyNode[evicted.size()]);
    }
View Full Code Here

        return (IvyNode[])evicted.toArray(new IvyNode[evicted.size()]);
    }
    public IvyNode[] getDownloadedNodes() {
        List downloaded = new ArrayList();
        for (Iterator iter = getDependencies().iterator(); iter.hasNext();) {
            IvyNode node = (IvyNode)iter.next();
            if (node.isDownloaded() && node.getRealNode() == node) {
                downloaded.add(node);
            }
        }
        return (IvyNode[])downloaded.toArray(new IvyNode[downloaded.size()]);
    }
View Full Code Here

TOP

Related Classes of org.apache.ivy.core.resolve.IvyNode

Copyright © 2018 www.massapicom. 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.