}
if (resolver != null) {
Message.debug("\tfound ivy file in cache for " + mrid + " (resolved by "
+ resolver.getName() + "): " + ivyFile);
if (expectedResolver == null || expectedResolver.equals(resolver.getName())) {
MetadataArtifactDownloadReport madr = new MetadataArtifactDownloadReport(
depMD.getMetadataArtifact());
madr.setDownloadStatus(DownloadStatus.NO);
madr.setSearched(false);
madr.setLocalFile(ivyFile);
madr.setSize(ivyFile.length());
madr.setArtifactOrigin(getSavedArtifactOrigin(depMD
.getMetadataArtifact()));
if (madr.getArtifactOrigin().isExists()) {
if (madr.getArtifactOrigin().isLocal()
&& madr.getArtifactOrigin().getArtifact().getUrl() != null) {
madr.setOriginalLocalFile(new File(madr.getArtifactOrigin()
.getArtifact().getUrl().toURI()));
} else {
// find locally cached file
madr.setOriginalLocalFile(getArchiveFileInCache(madr
.getArtifactOrigin().getArtifact()));
}
}
return new ResolvedModuleRevision(resolver, artResolver, depMD, madr);
} else {