throw new BuildException("specify only one of 'baseDir' or 'cache'");
}
if (!baseDir.isDirectory()) {
throw new BuildException(baseDir + " is not a directory");
}
it = new FSManifestIterable(baseDir).iterator();
} else if (cacheName != null) {
Ivy ivy = getIvyInstance();
RepositoryCacheManager cacheManager = ivy.getSettings().getRepositoryCacheManager(
cacheName);
if (!(cacheManager instanceof DefaultRepositoryCacheManager)) {
throw new BuildException("the type of cache '"
+ cacheManager.getClass().getName() + "' is not supported.");
}
File basedir = ((DefaultRepositoryCacheManager) cacheManager).getBasedir();
it = new FSManifestIterable(basedir).iterator();
} else {
throw new BuildException(
"No resolver, cache or basedir specified: "
+ "please provide one of them through the attribute 'resolver', 'cache' or 'dir'");
}