DependencyResolver oldDictator = getDictatorResolver();
if (options.isUseCacheOnly()) {
setDictatorResolver(new CacheResolver(settings));
}
try {
CacheManager cacheManager = options.getCache();
if (cacheManager == null) { // ensure that a cache is configured
cacheManager = IvyContext.getContext().getCacheManager();
options.setCache(cacheManager);
} else {
IvyContext.getContext().setCacheManager(cacheManager);
}
String[] confs = options.getConfs(md);
options.setConfs(confs);
if (options.getResolveId() == null) {
options.setResolveId(ResolveOptions.getDefaultResolveId(md));
}
eventManager.fireIvyEvent(new StartResolveEvent(md, confs));
long start = System.currentTimeMillis();
Message.info(":: resolving dependencies :: " + md.getResolvedModuleRevisionId()
+ (options.isTransitive() ? "" : " [not transitive]"));
Message.info("\tconfs: " + Arrays.asList(confs));
Message.verbose("\tvalidate = " + options.isValidate());
ResolveReport report = new ResolveReport(md, options.getResolveId());
// resolve dependencies
IvyNode[] dependencies = getDependencies(md, options, report);
report.setDependencies(Arrays.asList(dependencies), options.getArtifactFilter());
// produce resolved ivy file and ivy properties in cache
File ivyFileInCache = cacheManager.getResolvedIvyFileInCache(md
.getResolvedModuleRevisionId());
md.toIvyFile(ivyFileInCache);
// we store the resolved dependencies revisions and statuses per asked dependency
// revision id,
// for direct dependencies only.
// this is used by the deliver task to resolve dynamic revisions to static ones
File ivyPropertiesInCache = cacheManager.getResolvedIvyPropertiesInCache(
md.getResolvedModuleRevisionId());
Properties props = new Properties();
if (dependencies.length > 0) {
IvyNode root = dependencies[0].getRoot();
for (int i = 0; i < dependencies.length; i++) {