public void resolve(DependencyMetaData dependency, BuildableModuleVersionResolveResult result) {
    resolver.resolve(dependency, result);

    DependencyDescriptor descriptor = dependency.getDescriptor();
    if (result.getFailure() != null || !(descriptor instanceof ClientModuleDependencyDescriptor)) {
      return;
    }

    ClientModuleDependencyDescriptor clientModuleDependencyDescriptor =
        (ClientModuleDependencyDescriptor) descriptor;
    ModuleDescriptor moduleDescriptor = clientModuleDependencyDescriptor.getTargetModule();

    result.setMetaData(moduleDescriptor);
  }
 public void resolve(
     Module module,
     Set<? extends Configuration> configurations,
     BuildableModuleVersionResolveResult result) {
   LocalComponentMetaData componentMetaData =
       localComponentFactory.convert(configurations, module);
   result.resolved(
       componentMetaData.toResolveMetaData(), new ProjectArtifactResolver(componentMetaData));
 }
 public void resolve(DependencyMetaData dependency, BuildableModuleVersionResolveResult result) {
   DependencyDescriptor descriptor = dependency.getDescriptor();
   if (descriptor instanceof ProjectDependencyDescriptor) {
     ProjectDependencyDescriptor desc = (ProjectDependencyDescriptor) descriptor;
     LocalComponentMetaData componentMetaData = projectModuleRegistry.findProject(desc);
     result.resolved(
         componentMetaData.toResolveMetaData(), new ProjectArtifactResolver(componentMetaData));
   } else {
     resolver.resolve(dependency, result);
   }
 }
 public void resolve(DependencyMetaData dependency, BuildableModuleVersionResolveResult result) {
   DependencyDescriptor descriptor = dependency.getDescriptor();
   if (descriptor instanceof ProjectDependencyDescriptor) {
     ProjectDependencyDescriptor desc = (ProjectDependencyDescriptor) descriptor;
     ModuleDescriptor moduleDescriptor = projectModuleRegistry.findProject(desc);
     final ModuleRevisionId moduleRevisionId = moduleDescriptor.getModuleRevisionId();
     final DefaultModuleVersionIdentifier moduleVersionIdentifier =
         new DefaultModuleVersionIdentifier(
             moduleRevisionId.getOrganisation(),
             moduleRevisionId.getName(),
             moduleRevisionId.getRevision());
     result.resolved(moduleVersionIdentifier, moduleDescriptor, artifactResolver);
   } else {
     resolver.resolve(dependency, result);
   }
 }