DefaultModuleDescriptor md = DefaultModuleDescriptor.newCallerInstance(
toMrid(module.getId()), new String[]{"master", "runtime"}, opts.isTransitive(), opts.isChanging());
for (String exclude : opts.getExclusions()) {
DefaultExcludeRule rule = new DefaultExcludeRule(
new ArtifactId(toModuleId(exclude), ".*", ".*", ".*"),
new ExactOrRegexpPatternMatcher(),
null);
rule.addConfiguration("master");
rule.addConfiguration("runtime");
md.addExcludeRule(rule);
}