Examples of EvictionData


Examples of org.apache.ivy.core.resolve.IvyNodeEviction.EvictionData

                    blacklisted.append(" ");
                }
            }

            String rootModuleConf = parent.getData().getReport().getConfiguration();
            evicted.markEvicted(new EvictionData(rootModuleConf, parent, this, Collections
                    .singleton(selected), "with blacklisting of " + blacklisted));

            if (settings.debugConflictResolution()) {
                Message.debug("evicting " + evicted + " by "
                        + evicted.getEvictedData(rootModuleConf));
View Full Code Here

Examples of org.apache.ivy.core.resolve.IvyNodeEviction.EvictionData

            } else {
                sb.append("\\- ");
            }
            sb.append(dependency.getId().toString());
            if (evicted && showEvicted) {
                EvictionData evictedData = dependency.getEvictedData(getConf());
                if (evictedData.isTransitivelyEvicted()) {
                    sb.append(" transitively");
                } else {
                    sb.append(" evicted by ");
                    sb.append(evictedData.getSelected());
                    sb.append(" in ").append(evictedData.getParent());
                    if (evictedData.getDetail() != null) {
                        sb.append(" ").append(evictedData.getDetail());
                    }
                }
            }
            log(sb.toString());
View Full Code Here

Examples of org.apache.ivy.core.resolve.IvyNodeEviction.EvictionData

                }
            }
        }
        if (node.isEvicted()) {
            // update selected nodes with confs asked in evicted one
            EvictionData ed = node.getEvictedData();
            if (ed.getSelected() != null) {
                for (Iterator iter = ed.getSelected().iterator(); iter.hasNext();) {
                    IvyNode selected = (IvyNode) iter.next();
                    if (!selected.isLoaded()) {
                        // the node is not yet loaded, we can simply update its set of
                        // configurations to fetch
                        selected.updateConfsToFetch(Collections.singleton(conf));
View Full Code Here

Examples of org.apache.ivy.core.resolve.IvyNodeEviction.EvictionData

            // to check higher levels, for which conflict resolution might have been impossible
            // before
            if (resolveConflict(node, ancestor.getParent(), conf, toevict)) {
                // now that conflict resolution is ok in ancestors
                // we just have to check if the node wasn't previously evicted in root ancestor
                EvictionData evictionData = node.getEvictionDataInRoot(node.getRootModuleConf(),
                    ancestor);
                if (evictionData != null) {
                    // node has been previously evicted in an ancestor: we mark it as evicted
                    if (debugConflictResolution) {
                        Message.debug(node + " was previously evicted in root module conf "
View Full Code Here

Examples of org.apache.ivy.core.resolve.IvyNodeEviction.EvictionData

        return eviction.isEvicted(rootModuleConf);
    }

    public void markEvicted(String rootModuleConf, IvyNode node, ConflictManager conflictManager,
            Collection resolved) {
        EvictionData evictionData = new EvictionData(rootModuleConf, node, conflictManager,
                resolved);
        markEvicted(evictionData);
    }
View Full Code Here

Examples of org.apache.ivy.core.resolve.IvyNodeEviction.EvictionData

            details.append(XMLHelper
                    .escape(dep.getModuleRevision().getArtifactResolver().getName()));
            details.append("\"");
        }
        if (dep.isEvicted(report.getConfiguration())) {
            EvictionData ed = dep.getEvictedData(report.getConfiguration());
            if (ed.getConflictManager() != null) {
                details.append(" evicted=\"")
                        .append(XMLHelper.escape(ed.getConflictManager().toString())).append("\"");
            } else {
                details.append(" evicted=\"transitive\"");
            }
            details.append(" evicted-reason=\"")
                    .append(XMLHelper.escape(ed.getDetail() == null ? "" : ed.getDetail()))
                    .append("\"");
        }
        if (dep.hasProblem()) {
            details.append(" error=\"").append(XMLHelper.escape(dep.getProblem().getMessage()))
                    .append("\"");
View Full Code Here

Examples of org.apache.ivy.core.resolve.IvyNodeEviction.EvictionData

    }

    private void outputEvictionInformation(ConfigurationResolveReport report, PrintWriter out,
            IvyNode dep) {
        if (dep.isEvicted(report.getConfiguration())) {
            EvictionData ed = dep.getEvictedData(report.getConfiguration());
            Collection selected = ed.getSelected();
            if (selected != null) {
                for (Iterator it3 = selected.iterator(); it3.hasNext();) {
                    IvyNode sel = (IvyNode) it3.next();
                    out.println("\t\t\t\t<evicted-by rev=\""
                            + XMLHelper.escape(sel.getResolvedId().getRevision()) + "\"/>");
View Full Code Here

Examples of org.apache.ivy.core.resolve.IvyNodeEviction.EvictionData

                    Message.info("\t" + evicted[i] + " by " + allEvictingNodes + " in "
                            + Arrays.asList(evicted[i].getEvictedConfs()));
                }
                String[] confs = evicted[i].getEvictedConfs();
                for (int j = 0; j < confs.length; j++) {
                    EvictionData evictedData = evicted[i].getEvictedData(confs[j]);
                    if (evictedData.getParent() != null) {
                        Message.verbose("\t  in " + evictedData.getParent() + " with "
                                + evictedData.getConflictManager());
                    }
                }
            }
        }
View Full Code Here

Examples of org.apache.ivy.core.resolve.IvyNodeEviction.EvictionData

        return eviction.isEvicted(rootModuleConf);
    }

    public void markEvicted(String rootModuleConf, IvyNode node, ConflictManager conflictManager,
            Collection resolved) {
        EvictionData evictionData = new EvictionData(rootModuleConf, node, conflictManager,
                resolved);
        markEvicted(evictionData);
    }
View Full Code Here

Examples of org.apache.ivy.core.resolve.IvyNodeEviction.EvictionData

            details.append(XMLHelper.escape(
                dep.getModuleRevision().getArtifactResolver().getName()));
            details.append("\"");
        }
        if (dep.isEvicted(report.getConfiguration())) {
            EvictionData ed = dep.getEvictedData(report.getConfiguration());
            if (ed.getConflictManager() != null) {
                details.append(" evicted=\"").append(
                    XMLHelper.escape(ed.getConflictManager().toString())).append("\"");
            } else {
                details.append(" evicted=\"transitive\"");
            }
            details.append(" evicted-reason=\"")
                .append(XMLHelper.escape(ed.getDetail() == null ? "" : ed.getDetail()))
                .append("\"");
        }
        if (dep.hasProblem()) {
            details.append(" error=\"").append(
                XMLHelper.escape(dep.getProblem().getMessage())).append("\"");
        }
        if (md != null && md.getHomePage() != null) {
            details.append(" homepage=\"").append(
                XMLHelper.escape(md.getHomePage())).append("\"");
        }
        extraAttributes = md != null ? md.getExtraAttributes() : dep.getResolvedId()
                .getExtraAttributes();
        for (Iterator iterator = extraAttributes.keySet().iterator(); iterator.hasNext();) {
            String attName = (String) iterator.next();
            details.append(" extra-").append(attName).append("=\"").append(
                XMLHelper.escape(extraAttributes.get(attName).toString())).append("\"");
        }
        String defaultValue = dep.getDescriptor() != null ? " default=\""
                + dep.getDescriptor().isDefault() + "\"" : "";
        int position = dependencies.indexOf(dep.getResolvedId());
        out.println("\t\t\t<revision name=\""
                + XMLHelper.escape(dep.getResolvedId().getRevision())
                + "\""
                + (dep.getResolvedId().getBranch() == null ? "" : " branch=\""
                        + XMLHelper.escape(
                            dep.getResolvedId().getBranch()) + "\"") + details
                + " downloaded=\"" + dep.isDownloaded() + "\"" + " searched=\""
                + dep.isSearched() + "\"" + defaultValue + " conf=\""
                + toString(dep.getConfigurations(report.getConfiguration())) + "\""
                + " position=\"" + position + "\">");
        if (md != null) {
            License[] licenses = md.getLicenses();
            for (int i = 0; i < licenses.length; i++) {
                String lurl;
                if (licenses[i].getUrl() != null) {
                    lurl = " url=\"" + XMLHelper.escape(licenses[i].getUrl()) + "\"";
                } else {
                    lurl = "";
                }
                out.println("\t\t\t\t<license name=\""
                    + XMLHelper.escape(licenses[i].getName()) + "\""
                        + lurl + "/>");
            }
        }
        if (dep.getModuleRevision() != null) {
            MetadataArtifactDownloadReport madr = dep.getModuleRevision().getReport();
            out.print("\t\t\t\t<metadata-artifact");
            out.print(" status=\""
                + XMLHelper.escape(madr.getDownloadStatus().toString()) + "\"");
            out.print(" details=\"" + XMLHelper.escape(madr.getDownloadDetails()) + "\"");
            out.print(" size=\"" + madr.getSize() + "\"");
            out.print(" time=\"" + madr.getDownloadTimeMillis() + "\"");
            if (madr.getLocalFile() != null) {
                out.print(" location=\""
                    + XMLHelper.escape(madr.getLocalFile().getAbsolutePath()) + "\"");
            }

            out.print(" searched=\"" + madr.isSearched() + "\"");
            if (madr.getOriginalLocalFile() != null) {
                out.print(" original-local-location=\""
                    + XMLHelper.escape(madr.getOriginalLocalFile().getAbsolutePath()) + "\"");
            }

            ArtifactOrigin origin = madr.getArtifactOrigin();
            if (origin != null) {
                out.print(" origin-is-local=\"" + String.valueOf(origin.isLocal()) + "\"");
                out.print(" origin-location=\"" + XMLHelper.escape(origin.getLocation()) + "\"");
            }
            out.println("/>");
           
        }
        if (dep.isEvicted(report.getConfiguration())) {
            EvictionData ed = dep.getEvictedData(report.getConfiguration());
            Collection selected = ed.getSelected();
            if (selected != null) {
                for (Iterator it3 = selected.iterator(); it3.hasNext();) {
                    IvyNode sel = (IvyNode) it3.next();
                    out.println("\t\t\t\t<evicted-by rev=\""
                            + XMLHelper.escape(sel.getResolvedId().getRevision()) + "\"/>");
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.