+ ": check your configuration");
return false;
}
try {
Message.debug("\tusing " + resolver + " to resolve " + getId());
DependencyDescriptor dependencyDescriptor = getDependencyDescriptor(parent);
data.getEventManager().fireIvyEvent(
new StartResolveDependencyEvent(resolver, dependencyDescriptor));
module = resolver.getDependency(dependencyDescriptor, data);
data.getEventManager().fireIvyEvent(
new EndResolveDependencyEvent(resolver, dependencyDescriptor, module));
if (module != null) {
data.getCacheManager().saveResolver(module.getDescriptor(),
module.getResolver().getName());
data.getCacheManager().saveArtResolver(module.getDescriptor(),
module.getArtifactResolver().getName());
if (settings.logModuleWhenFound()) {
Message.info("\tfound " + module.getId() + " in "
+ module.getResolver().getName());
} else {
Message.verbose("\tfound " + module.getId() + " in "
+ module.getResolver().getName());
}
if (data.getSettings().getVersionMatcher().isDynamic(getId())) {
// IVY-56: check if revision has actually been resolved
if (data.getSettings().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;
}
IvyNode resolved = data.getNode(module.getId());
if (resolved != null) {
// exact 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)) {
return false;
}
if (resolved.md == null) {
resolved.md = md;
}
if (resolved.module == null) {
resolved.module = module;
}
resolved.downloaded |= module.isDownloaded();
resolved.searched |= module.isSearched();
resolved.dds.putAll(dds);
resolved.updateDataFrom(this, rootModuleConf);
resolved.loadData(rootModuleConf, parent, parentConf, conf,
shouldBePublic);
DependencyDescriptor dd = dependencyDescriptor;
if (dd != null) {
resolved.addDependencyArtifacts(rootModuleConf, dd
.getDependencyArtifacts(parentConf));
resolved.addDependencyIncludes(rootModuleConf, dd
.getIncludeRules(parentConf));
}
data.replaceNode(getId(), resolved, rootModuleConf); // this
// actually
// discards
// the node
if (settings.logResolvedRevision()) {
Message.info("\t[" + module.getId().getRevision() + "] "
+ getId());
} else {
Message.verbose("\t[" + module.getId().getRevision() + "] "
+ getId());
}
return true;
}
}
downloaded = module.isDownloaded();
searched = module.isSearched();
} else {
Message.warn("\tmodule not found: " + getId());
resolver.reportFailure();
problem = new RuntimeException("not found");
}
} catch (Exception e) {
problem = e;
}
// still not resolved, report error
if (module == null) {
return false;
} else {
loaded = true;
if (settings.getVersionMatcher().isDynamic(getId())) {
if (settings.logResolvedRevision()) {
Message.info("\t[" + module.getId().getRevision() + "] " + getId());
} else {
Message.verbose("\t[" + module.getId().getRevision() + "] " + getId());
}
}
md = module.getDescriptor();
confsToFetch.remove("*");
updateConfsToFetch(Arrays.asList(resolveSpecialConfigurations(
getRequiredConfigurations(parent, parentConf), this)));
}
} else {
loaded = true;
}
}
if (hasProblem()) {
return handleConfiguration(loaded, rootModuleConf, parent, parentConf, conf,
shouldBePublic)
&& loaded;
}
if (!handleConfiguration(loaded, rootModuleConf, parent, parentConf, conf, shouldBePublic)) {
return false;
}
DependencyDescriptor dd = getDependencyDescriptor(parent);
if (dd != null) {
addDependencyArtifacts(rootModuleConf, dd.getDependencyArtifacts(parentConf));
addDependencyIncludes(rootModuleConf, dd.getIncludeRules(parentConf));
}
return loaded;
}