return cacheLockingManager.useCache(String.format("Locate %s", artifact), new Factory<ArtifactOrigin>() {
public ArtifactOrigin create() {
try {
DependencyDescriptor dependencyDescriptor = new DefaultDependencyDescriptor(artifact.getModuleRevisionId(), false);
DefaultBuildableModuleVersionResolveResult dependency = new DefaultBuildableModuleVersionResolveResult();
<BUG>userResolverChain.resolve(dependencyDescriptor, dependency);
File artifactFile = dependency.getArtifactResolver().resolve(artifact).getFile();

return new ArtifactOrigin(artifact, false, artifactFile.getAbsolutePath());</BUG>
} catch (ModuleVersionNotFoundException e) {

return cacheLockingManager.useCache(String.format("Locate %s", artifact), new Factory<ArtifactOrigin>() {
public ArtifactOrigin create() {
try {
DependencyDescriptor dependencyDescriptor = new DefaultDependencyDescriptor(artifact.getModuleRevisionId(), false);
DefaultBuildableModuleVersionResolveResult dependency = new DefaultBuildableModuleVersionResolveResult();
userResolverChain.resolve(dependencyDescriptor, dependency);
DefaultBuildableArtifactResolveResult result = new DefaultBuildableArtifactResolveResult();
dependency.getArtifactResolver().resolve(artifact, result);
File artifactFile = result.getFile();
return new ArtifactOrigin(artifact, false, artifactFile.getAbsolutePath());
} catch (ModuleVersionNotFoundException e) {
