Package org.apache.ivy.plugins.conflict

Examples of org.apache.ivy.plugins.conflict.ConflictManager


    public void endDocument() throws SAXException {
        if (defaultResolver != null) {
            ivy.setDefaultResolver(ivy.substitute(defaultResolver));
        }
        if (defaultCM != null) {
            ConflictManager conflictManager = ivy.getConflictManager(defaultCM);
            if (conflictManager == null) {
                throw new IllegalArgumentException("unknown conflict manager "
                        + ivy.substitute(defaultCM));
            }
            ivy.setDefaultConflictManager(conflictManager);
View Full Code Here


        if (found == null && !foundBlacklisted.isEmpty()) {
            // all acceptable versions have been blacklisted, this means that an unsolvable conflict
            // has been found
            DependencyDescriptor dd = context.getDependencyDescriptor();
            IvyNode parentNode = context.getResolveData().getNode(dd.getParentRevisionId());
            ConflictManager cm = parentNode.getConflictManager(mrid.getModuleId());
            cm.handleAllBlacklistedRevisions(dd, foundBlacklisted);
        }

        return found;
    }
View Full Code Here

        if (md == null) {
            throw new IllegalStateException(
                    "impossible to get conflict manager when data has not been loaded. IvyNode = "
                    + this.toString());
        }
        ConflictManager cm = md.getConflictManager(mid);
        return cm == null ? settings.getConflictManager(mid) : cm;
    }
View Full Code Here

            }
        });
        if (ms == null) {
            return getDefaultConflictManager();
        } else {
            ConflictManager cm = getConflictManager(ms.getConflictManager());
            if (cm == null) {
                throw new IllegalStateException(
                        "ivy badly configured: unknown conflict manager "
                                + ms.getConflictManager());
            }
View Full Code Here

        if (settings.debugConflictResolution()) {
            Message.debug("found conflicting revisions for " + node + " in " + ancestor + ": "
                    + conflicts);
        }

        ConflictManager conflictManager = ancestor.getNode().getConflictManager(node.getModuleId());
        Collection resolved = conflictManager.resolveConflicts(ancestor.getNode(), conflicts);

        if (resolved == null) {
            if (settings.debugConflictResolution()) {
                Message.debug("impossible to resolve conflicts for " + node + " in " + ancestor
                        + " yet");
View Full Code Here

                } else if ("manager".equals(qName) && _state == CONFLICT) {
                    String org = _ivy.substitute(attributes.getValue("org"));
                    org = org == null ? PatternMatcher.ANY_EXPRESSION : org;
                    String mod = _ivy.substitute(attributes.getValue("module"));
                    mod = mod == null ? PatternMatcher.ANY_EXPRESSION : mod;
                    ConflictManager cm;
                    String name = _ivy.substitute(attributes.getValue("name"));
                    String rev = _ivy.substitute(attributes.getValue("rev"));
                    if (rev != null) {
                        String[] revs = rev.split(",");
                        for (int i = 0; i < revs.length; i++) {
View Full Code Here

        assertDependencyArtifactExcludeRules(dd, new String[] {"myconf3"},
            new String[] {"toexclude"});
        assertDependencyArtifactExcludeRules(dd, new String[] {"myconf4"},
            new String[] {"toexclude"});

        ConflictManager cm = md.getConflictManager(new ModuleId("yourorg", "yourmodule1"));
        assertNotNull(cm);
        assertTrue(cm instanceof NoConflictManager);

        cm = md.getConflictManager(new ModuleId("yourorg", "yourmodule2"));
        assertNotNull(cm);
View Full Code Here

    public void endDocument() throws SAXException {
        if (defaultResolver != null) {
            ivy.setDefaultResolver(ivy.substitute(defaultResolver));
        }
        if (defaultCM != null) {
            ConflictManager conflictManager = ivy.getConflictManager(ivy.substitute(defaultCM));
            if (conflictManager == null) {
                throw new IllegalArgumentException("unknown conflict manager "
                        + ivy.substitute(defaultCM));
            }
            ivy.setDefaultConflictManager(conflictManager);
View Full Code Here

        for (Iterator iter = moduleSettings.keySet().iterator(); iter.hasNext();) {
            ModuleIdMatcher midm = (ModuleIdMatcher) iter.next();
            if (midm.matches(moduleId)) {
                ModuleSettings ms = (ModuleSettings) moduleSettings.get(midm);
                if (ms.getConflictManager() != null) {
                    ConflictManager cm = getConflictManager(ms.getConflictManager());
                    if (cm == null) {
                        throw new IllegalStateException(
                                "ivy badly configured: unknown conflict manager "
                                        + ms.getConflictManager());
                    }
View Full Code Here

    public ConflictManager getConflictManager(ModuleId mid) {
        if (md == null) {
            throw new IllegalStateException(
                    "impossible to get conflict manager when data has not been loaded");
        }
        ConflictManager cm = md.getConflictManager(mid);
        return cm == null ? settings.getConflictManager(mid) : cm;
    }
View Full Code Here

TOP

Related Classes of org.apache.ivy.plugins.conflict.ConflictManager

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.