String[] confs = ConfigurationUtils.replaceWildcards(options.getConfs(), md);
Set confsToRemove = new HashSet(Arrays.asList(md.getConfigurationsNames()));
confsToRemove.removeAll(Arrays.asList(confs));
try {
UpdateOptions opts = new UpdateOptions()
.setSettings(settings)
.setResolvedRevisions(resolvedDependencies)
.setStatus(options.getStatus())
.setRevision(revision)
.setBranch(options.getPubBranch())
.setPubdate(options.getPubdate())
.setGenerateRevConstraint(options.isGenerateRevConstraint())
.setMerge(options.isMerge())
.setMergedDescriptor(md)
.setConfsToExclude(
(String[]) confsToRemove.toArray(new String[confsToRemove.size()]));
if (!resolvedBranches.isEmpty()) {
opts = opts.setResolvedBranches(resolvedBranches);
}
Resource res = md.getResource();
XmlModuleDescriptorUpdater.update(res.openStream(), res, publishedIvy, opts);
} catch (SAXException ex) {
throw new RuntimeException("bad ivy file in cache for " + mrid, ex);