in src/main/java/org/apache/sling/feature/extension/content/ContentHandler.java [139:160]
private File getRegistryHomeDir(ExtensionContext context) {
//read repository- home from framework properties (throw exception if repo.home not set)
String registryPath = System.getProperty(PACKAGEREGISTRY_HOME);
File registryHome;
if (registryPath != null) {
registryHome = Paths.get(registryPath).toFile();
} else {
String repoHome = context.getFrameworkProperties().get(REPOSITORY_HOME);
if (repoHome == null) {
throw new IllegalStateException("Neither registry.home set nor repository.home configured.");
}
registryHome = Paths.get(repoHome, REGISTRY_FOLDER).toFile();
}
if (!registryHome.exists()) {
registryHome.mkdirs();
}
if (!registryHome.isDirectory()) {
throw new IllegalStateException("Registry home points to file - must be directory: " + registryHome);
}
return registryHome;
}