public void resolve(DependencyMetaData dependency, BuildableComponentIdResolveResult result) {
   if (dependency.getSelector() instanceof ProjectComponentSelector) {
     ProjectComponentSelector selector = (ProjectComponentSelector) dependency.getSelector();
     LocalComponentMetaData componentMetaData =
         projectComponentRegistry.getProject(selector.getProjectPath());
     result.resolved(componentMetaData.toResolveMetaData());
   } else {
     delegate.resolve(dependency, result);
   }
 }
 public void resolve(DependencyMetaData dependency, BuildableComponentIdResolveResult result) {
   if (dependency.getSelector() instanceof ProjectComponentSelector) {
     ProjectComponentSelector selector = (ProjectComponentSelector) dependency.getSelector();
     String projectPath = selector.getProjectPath();
     LocalComponentMetaData componentMetaData = projectComponentRegistry.getProject(projectPath);
     if (componentMetaData == null) {
       result.failed(
           new ModuleVersionResolveException(
               selector, "project '" + projectPath + "' not found."));
     } else {
       result.resolved(componentMetaData.toResolveMetaData());
     }
   }
 }