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


Java ConflictManager类代码示例

本文整理汇总了Java中org.apache.ivy.plugins.conflict.ConflictManager的典型用法代码示例。如果您正苦于以下问题:Java ConflictManager类的具体用法?Java ConflictManager怎么用?Java ConflictManager使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


ConflictManager类属于org.apache.ivy.plugins.conflict包,在下文中一共展示了ConflictManager类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: getConflictManager

import org.apache.ivy.plugins.conflict.ConflictManager; //导入依赖的package包/类
public synchronized ConflictManager getConflictManager(ModuleId moduleId) {
    ModuleSettings ms = moduleSettings.getRule(moduleId, new Filter<ModuleSettings>() {
        public boolean accept(ModuleSettings o) {
            return o.getConflictManager() != null;
        }
    });
    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());
        }
        return cm;
    }
}
 
开发者ID:apache,项目名称:ant-ivy,代码行数:18,代码来源:IvySettings.java

示例2: addConflict

import org.apache.ivy.plugins.conflict.ConflictManager; //导入依赖的package包/类
void addConflict(DefaultModuleDescriptor md, IvySettings settings) {
    String matcherName = (matcher == null) ? PatternMatcher.EXACT : matcher;
    String orgPattern = (org == null) ? PatternMatcher.ANY_EXPRESSION : org;
    String modulePattern = (module == null) ? PatternMatcher.ANY_EXPRESSION : module;
    ConflictManager cm = null;
    if (rev != null) {
        cm = new FixedConflictManager(splitToArray(rev));
    } else if (manager != null) {
        cm = settings.getConflictManager(manager);
    }
    md.addConflictManager(new ModuleId(orgPattern, modulePattern),
        settings.getMatcher(matcherName), cm);
}
 
开发者ID:apache,项目名称:ant-ivy,代码行数:14,代码来源:IvyConflict.java

示例3: resolveConflicts

import org.apache.ivy.plugins.conflict.ConflictManager; //导入依赖的package包/类
private Collection<IvyNode> resolveConflicts(VisitNode node, VisitNode ancestor,
        Collection<IvyNode> conflicts, ConflictManager conflictManager) {
    if (node.getParent() != ancestor
    // we are not handling the direct parent

            && conflictManager == settings.getConflictManager(node.getModuleId())
            // the conflict manager is the default one

            && node.getParent().getNode()
                    .getResolvedNodes(node.getModuleId(), node.getRootModuleConf())
                    .equals(conflicts)
    // there is no new conflict in this ancestor

    ) {
        // IVY-465 case
        if (settings.debugConflictResolution()) {
            Message.debug("no new conflicting revisions for " + node + " in " + ancestor + ": "
                    + conflicts);
        }

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

        return conflictManager.resolveConflicts(ancestor.getNode(), conflicts);
    }
}
 
开发者ID:apache,项目名称:ant-ivy,代码行数:31,代码来源:ResolveEngine.java

示例4: getAllEvictingConflictManagers

import org.apache.ivy.plugins.conflict.ConflictManager; //导入依赖的package包/类
public Collection<ConflictManager> getAllEvictingConflictManagers() {
    Collection<ConflictManager> ret = new HashSet<>();
    for (EvictionData ed : evicted.values()) {
        ret.add(ed.getConflictManager());
    }
    return ret;
}
 
开发者ID:apache,项目名称:ant-ivy,代码行数:8,代码来源:IvyNodeEviction.java

示例5: getConflictManager

import org.apache.ivy.plugins.conflict.ConflictManager; //导入依赖的package包/类
public ConflictManager getConflictManager(ModuleId mid) {
    if (md == null) {
        throw new IllegalStateException(
                "impossible to get conflict manager when data has not been loaded. IvyNode = "
                        + this);
    }
    ConflictManager cm = md.getConflictManager(mid);
    return cm == null ? settings.getConflictManager(mid) : cm;
}
 
开发者ID:apache,项目名称:ant-ivy,代码行数:10,代码来源:IvyNode.java

示例6: managerStarted

import org.apache.ivy.plugins.conflict.ConflictManager; //导入依赖的package包/类
protected void managerStarted(Attributes attributes, String managerAtt) {
    String org = settings.substitute(attributes.getValue("org"));
    if (org == null) {
        org = PatternMatcher.ANY_EXPRESSION;
    }
    String mod = settings.substitute(attributes.getValue("module"));
    if (mod == null) {
        mod = PatternMatcher.ANY_EXPRESSION;
    }
    ConflictManager cm;
    String name = settings.substitute(attributes.getValue(managerAtt));
    String rev = settings.substitute(attributes.getValue("rev"));
    if (rev != null) {
        cm = new FixedConflictManager(splitToArray(rev));
    } else if (name != null) {
        cm = settings.getConflictManager(name);
        if (cm == null) {
            addError("unknown conflict manager: " + name);
            return;
        }
    } else {
        addError("bad conflict manager: no manager nor rev");
        return;
    }
    String matcherName = settings.substitute(attributes.getValue("matcher"));
    PatternMatcher matcher = (matcherName == null) ? defaultMatcher
            : settings.getMatcher(matcherName);
    if (matcher == null) {
        addError("unknown matcher: " + matcherName);
        return;
    }
    getMd().addConflictManager(new ModuleId(org, mod), matcher, cm);
}
 
开发者ID:apache,项目名称:ant-ivy,代码行数:34,代码来源:XmlModuleDescriptorParser.java

示例7: getConflictManager

import org.apache.ivy.plugins.conflict.ConflictManager; //导入依赖的package包/类
public ConflictManager getConflictManager(String name) {
    return settings.getConflictManager(name);
}
 
开发者ID:Pushjet,项目名称:Pushjet-Android,代码行数:4,代码来源:LegacyResolverParserSettings.java

示例8: getConflictManager

import org.apache.ivy.plugins.conflict.ConflictManager; //导入依赖的package包/类
public ConflictManager getConflictManager() {
    return conflictManager;
}
 
开发者ID:apache,项目名称:ant-ivy,代码行数:4,代码来源:IvyNodeEviction.java

示例9: getAllEvictingConflictManagers

import org.apache.ivy.plugins.conflict.ConflictManager; //导入依赖的package包/类
public Collection<ConflictManager> getAllEvictingConflictManagers() {
    return eviction.getAllEvictingConflictManagers();
}
 
开发者ID:apache,项目名称:ant-ivy,代码行数:4,代码来源:IvyNode.java

示例10: markEvicted

import org.apache.ivy.plugins.conflict.ConflictManager; //导入依赖的package包/类
public void markEvicted(String rootModuleConf, IvyNode node, ConflictManager conflictManager,
        Collection<IvyNode> resolved) {
    EvictionData evictionData = new EvictionData(rootModuleConf, node, conflictManager,
            resolved);
    markEvicted(evictionData);
}
 
开发者ID:apache,项目名称:ant-ivy,代码行数:7,代码来源:IvyNode.java

示例11: getConflictManager

import org.apache.ivy.plugins.conflict.ConflictManager; //导入依赖的package包/类
public ConflictManager getConflictManager(ModuleId moduleId) {
    return conflictManagers.getRule(moduleId);
}
 
开发者ID:apache,项目名称:ant-ivy,代码行数:4,代码来源:DefaultModuleDescriptor.java

示例12: getConflictManager

import org.apache.ivy.plugins.conflict.ConflictManager; //导入依赖的package包/类
public ConflictManager getConflictManager(String name) {
    return delegate.getConflictManager(name);
}
 
开发者ID:apache,项目名称:ant-ivy,代码行数:4,代码来源:DefaultResolutionCacheManager.java

示例13: getConflictManager

import org.apache.ivy.plugins.conflict.ConflictManager; //导入依赖的package包/类
public ConflictManager getConflictManager(String name) {
    return delegatedSettings.getConflictManager(name);
}
 
开发者ID:apache,项目名称:ant-ivy,代码行数:4,代码来源:ParserSettingsMonitor.java

示例14: addConfigured

import org.apache.ivy.plugins.conflict.ConflictManager; //导入依赖的package包/类
public synchronized void addConfigured(ConflictManager cm) {
    addConflictManager(cm.getName(), cm);
}
 
开发者ID:apache,项目名称:ant-ivy,代码行数:4,代码来源:IvySettings.java

示例15: addConflictManager

import org.apache.ivy.plugins.conflict.ConflictManager; //导入依赖的package包/类
public synchronized void addConflictManager(String name, ConflictManager cm) {
    init(cm);
    conflictsManager.put(name, cm);
}
 
开发者ID:apache,项目名称:ant-ivy,代码行数:5,代码来源:IvySettings.java


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