}
List<IClassPackageRepositoryRemote> attempted = new ArrayList<IClassPackageRepositoryRemote>();
for (IClassPackageRepositoryRemote remote : remoteRepositories.values()) {
log.warn("Attempting to locate " + reference + " @ " + remote.getRepositoryURL());
IClassPackageDescriptor descriptor = this.getImportableRepository().getCachedRemotedDescriptor(this, remote, reference);
if (descriptor == null && remote.contains(this, reference)) {
descriptor = remote.getDescriptor(this, reference);
this.getImportableRepository().cacheRemoteDescriptor(remote, descriptor);
} else {
log.warn("Locally cached copy found of " + reference);
}
if (descriptor != null) {
if (descriptor.getRelocation() != null) {
getImportableRepository().importPackage(remote, this, descriptor);
ClassPackageDependencyReferenceImpl dep = new ClassPackageDependencyReferenceImpl(
ClassPackageReferenceImpl.getRelocation(ctx.getCurrentDependency(), descriptor.getRelocation())
);
return this.resolveRemotely(ctx.popNode().pushNode(dep, null), remoteRepositories);
}
if (descriptor.isDescriptorOnly()) {
ctx.setAvailable(this, repository, null, descriptor);
} else {
ctx.setDownloadable(this, this.repository, remote);
}
this.resolveDependencies(ctx, descriptor);