dep.setVersionRequirement(vr);
return resolve(dep);
}
private Resolution resolveAll(Dependency dependency) throws IOException {
VersionRange vReq = dependency.getVersionRequirement();
Metadata[] candidates = releasesPerModule.get(dependency.getName());
if(candidates == null)
candidates = refreshCache(dependency.getName());
int idx = candidates.length;
ArrayList<Metadata> matchingReleases = null;
while(--idx >= 0) {
Metadata release = candidates[idx];
if(vReq == null || vReq.isIncluded(release.getVersion())) {
if(matchingReleases == null)
matchingReleases = new ArrayList<Metadata>();
matchingReleases.add(release);
}
}