ResolveRequest request = (ResolveRequest) inworkspaceModules.values().iterator().next();
VersionMatcher versionMatcher = ((Ivy) ivys.get(request)).getSettings()
.getVersionMatcher();
WarningNonMatchingVersionReporter vReporter = new WarningNonMatchingVersionReporter();
CircularDependencyStrategy circularDependencyStrategy = WarnCircularDependencyStrategy
.getInstance();
ModuleDescriptorSorter sorter = new ModuleDescriptorSorter(inworkspaceModules.keySet(),
versionMatcher, vReporter, circularDependencyStrategy);
List sortedModuleDescriptors = sorter.sortModuleDescriptors();