Set modules = new HashSet();
for (int i = 0; i < mrids.length; i++) {
modules.add(ModuleRevisionId.newInstance(mrids[i], revision));
}
mrids = (ModuleRevisionId[]) modules.toArray(new ModuleRevisionId[modules.size()]);
ModuleDescriptor md = DefaultModuleDescriptor.newCallerInstance(mrids, true, false);
String resolveId = ResolveOptions.getDefaultResolveId(md);
ResolveReport report = ivy.resolve(md, new ResolveOptions().setResolveId(resolveId)
.setValidate(doValidate(settings)));