String path = projectRoot + "/examples/src/descriptor/META-INF/" + fileName;
ClassResolver resolver = new DefaultClassResolver();
RegistryBuilder builder = new RegistryBuilder();
builder.addModuleDescriptorProvider(new XmlModuleDescriptorProvider(resolver));
// Register the examples.xml file, which (given its non-standard name)
// is not visible.
builder.addModuleDescriptorProvider(new XmlModuleDescriptorProvider(resolver,
new FileResource(path)));
return builder.constructRegistry(Locale.getDefault());
}