本文整理汇总了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;
}
}
示例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);
}
示例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);
}
}
示例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;
}
示例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;
}
示例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);
}
示例7: getConflictManager
import org.apache.ivy.plugins.conflict.ConflictManager; //导入依赖的package包/类
public ConflictManager getConflictManager(String name) {
return settings.getConflictManager(name);
}
示例8: getConflictManager
import org.apache.ivy.plugins.conflict.ConflictManager; //导入依赖的package包/类
public ConflictManager getConflictManager() {
return conflictManager;
}
示例9: getAllEvictingConflictManagers
import org.apache.ivy.plugins.conflict.ConflictManager; //导入依赖的package包/类
public Collection<ConflictManager> getAllEvictingConflictManagers() {
return eviction.getAllEvictingConflictManagers();
}
示例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);
}
示例11: getConflictManager
import org.apache.ivy.plugins.conflict.ConflictManager; //导入依赖的package包/类
public ConflictManager getConflictManager(ModuleId moduleId) {
return conflictManagers.getRule(moduleId);
}
示例12: getConflictManager
import org.apache.ivy.plugins.conflict.ConflictManager; //导入依赖的package包/类
public ConflictManager getConflictManager(String name) {
return delegate.getConflictManager(name);
}
示例13: getConflictManager
import org.apache.ivy.plugins.conflict.ConflictManager; //导入依赖的package包/类
public ConflictManager getConflictManager(String name) {
return delegatedSettings.getConflictManager(name);
}
示例14: addConfigured
import org.apache.ivy.plugins.conflict.ConflictManager; //导入依赖的package包/类
public synchronized void addConfigured(ConflictManager cm) {
addConflictManager(cm.getName(), cm);
}
示例15: addConflictManager
import org.apache.ivy.plugins.conflict.ConflictManager; //导入依赖的package包/类
public synchronized void addConflictManager(String name, ConflictManager cm) {
init(cm);
conflictsManager.put(name, cm);
}