private void initializeResolvers(IvySettings ivySettings, List<DependencyResolver> allResolvers) {
for (DependencyResolver dependencyResolver : allResolvers) {
ivySettings.addResolver(dependencyResolver);
((DefaultRepositoryCacheManager) dependencyResolver.getRepositoryCacheManager()).setSettings(ivySettings);
if (dependencyResolver instanceof RepositoryResolver) {
Repository repository = ((RepositoryResolver) dependencyResolver).getRepository();
if (!repository.hasTransferListener(transferListener)) {
repository.addTransferListener(transferListener);
}
}
}
}