});
}
protected ModulesRegistry createModulesRegistry() throws Exception {
assert (mrReg == null);
ModulesRegistry mr = AbstractFactory.getInstance().createModulesRegistry();
String hk2RepositoryUris = ctx.getProperty(Constants.HK2_REPOSITORIES);
if (hk2RepositoryUris != null) {
for (String s : hk2RepositoryUris.split("\\s")) {
URI repoURI = URI.create(s);
File repoDir = new File(repoURI);
OSGiDirectoryBasedRepository repo = new OSGiDirectoryBasedRepository(repoDir.getAbsolutePath(), repoDir);
repo.initialize();
mr.addRepository(repo);
}
}
String osgiRepositoryUris = ctx.getProperty(Constants.OBR_REPOSITORIES);
if (osgiRepositoryUris != null && mr instanceof OSGiObrModulesRegistryImpl) {
OSGiObrModulesRegistryImpl mr1 = (OSGiObrModulesRegistryImpl) mr;