boolean log = settings.logNotConvertedExclusionRule();
try {
settings.setLogNotConvertedExclusionRule(true);
resolveEngine.setDictatorResolver(fromResolver);
DefaultModuleDescriptor md = new DefaultModuleDescriptor(ModuleRevisionId.newInstance(
"apache", "ivy-install", "1.0"), settings.getStatusManager().getDefaultStatus(),
new Date());
String resolveId = ResolveOptions.getDefaultResolveId(md);
md.addConfiguration(new Configuration("default"));
md.addConflictManager(new ModuleId(ExactPatternMatcher.ANY_EXPRESSION,
ExactPatternMatcher.ANY_EXPRESSION), ExactPatternMatcher.INSTANCE,
new NoConflictManager());
if (MatcherHelper.isExact(matcher, mrid)) {
DefaultDependencyDescriptor dd = new DefaultDependencyDescriptor(md, mrid, false,
false, transitive);
dd.addDependencyConfiguration("default", "*");
md.addDependency(dd);
} else {
Collection mrids = searchEngine.findModuleRevisionIds(fromResolver, mrid, matcher);
for (Iterator iter = mrids.iterator(); iter.hasNext();) {
ModuleRevisionId foundMrid = (ModuleRevisionId) iter.next();
Message.info("\tfound " + foundMrid + " to install: adding to the list");
DefaultDependencyDescriptor dd = new DefaultDependencyDescriptor(md, foundMrid,
false, false, transitive);
dd.addDependencyConfiguration("default", "*");
md.addDependency(dd);
}
}
// resolve using appropriate resolver
ResolveReport report = new ResolveReport(md, resolveId);