+ ": check your configuration");
return false;
}
try {
Message.debug("\tusing " + resolver + " to resolve " + getId());
DependencyDescriptor dependencyDescriptor = getDependencyDescriptor(parent);
long start = System.currentTimeMillis();
ModuleRevisionId requestedRevisionId
= dependencyDescriptor.getDependencyRevisionId();
data.getEventManager().fireIvyEvent(
new StartResolveDependencyEvent(
resolver, dependencyDescriptor, requestedRevisionId));
module = resolver.getDependency(dependencyDescriptor, data);
data.getEventManager().fireIvyEvent(
new EndResolveDependencyEvent(
resolver, dependencyDescriptor, requestedRevisionId,
module, System.currentTimeMillis() - start));
if (module != null) {
module.getResolver().getRepositoryCacheManager().saveResolvers(
module.getDescriptor(),
module.getResolver().getName(),
module.getArtifactResolver().getName());
if (settings.logModuleWhenFound()
&& LogOptions.LOG_DEFAULT.equals(getData().getOptions().getLog())) {
Message.info("\tfound " + module.getId() + " in "
+ module.getResolver().getName());
} else {
Message.verbose("\tfound " + module.getId() + " in "
+ module.getResolver().getName());
}
// IVY-56: check if revision has actually been resolved
if (settings.getVersionMatcher().isDynamic(getId())
&& settings.getVersionMatcher().isDynamic(module.getId())) {
Message.error("impossible to resolve dynamic revision for "
+ getId() + ": check your configuration and "
+ "make sure revision is part of your pattern");
problem = new RuntimeException(
"impossible to resolve dynamic revision");
return false;
}
if (!getId().equals(module.getId())) {
IvyNode resolved = data.getNode(module.getId());
if (resolved != null) {
// found revision has already been resolved
// => update it and discard this node
md = module.getDescriptor(); // needed for handleConfiguration
if (!handleConfiguration(loaded, rootModuleConf, parent,
parentConf, conf, shouldBePublic, usage)) {
return false;
}
moveToRealNode(rootModuleConf, parent, parentConf, conf,
shouldBePublic, resolved);
return true;
}
String log = "\t[" + module.getId().getRevision() + "] " + getId();
if (!settings.getVersionMatcher().isDynamic(getId())) {
log += " (forced)";
}
if (settings.logResolvedRevision()
&& LogOptions.LOG_DEFAULT.equals(getData().getOptions().getLog())) {
Message.info(log);
} else {
Message.verbose(log);
}
}
downloaded = module.getReport().isDownloaded();
searched = module.getReport().isSearched();
loaded = true;
md = module.getDescriptor();
confsToFetch.remove("*");
updateConfsToFetch(Arrays.asList(resolveSpecialConfigurations(
getRequiredConfigurations(parent, parentConf), this)));
} else {
Message.warn("\tmodule not found: " + getId());
resolver.reportFailure();
problem = new RuntimeException("not found");
return false;
}
} catch (ResolveProcessException e) {
throw e;
} catch (Exception e) {
problem = e;
return false;
}
} else {
loaded = true;
}
}
handleConfiguration(
loaded, rootModuleConf, parent, parentConf, conf, shouldBePublic, usage);
if (hasProblem()) {
Message.debug("problem : " + problem.getMessage());
return false;
} else {
DependencyDescriptor dd = getDependencyDescriptor(parent);
if (dd != null) {
usage.addUsage(rootModuleConf, dd, parentConf);
}
return loaded;
}