final String schemaPluginsDir = geonetworkDataDirectory.getSchemaPluginsDir().getPath();
final String resourcePath = geonetworkDataDirectory.getResourcesDir().getPath();
final SchemaManager schemaManager = _applicationContext.getBean(SchemaManager.class);
if (syncReport.updateSchemaManager || !schemaManager.existsSchema("iso19139")) {
new File(_dataDirectory, "config/schemaplugin-uri-catalog.xml").delete();
final String schemaPluginsCatalogFile = new File(schemaPluginsDir, "/schemaplugin-uri-catalog.xml").getPath();
deploySchema(webappDir, schemaPluginsDir);
_applicationContext.getBean(LuceneConfig.class).configure("WEB-INF/config-lucene.xml");
SchemaManager.registerXmlCatalogFiles(webappDir, schemaPluginsCatalogFile);
schemaManager.configure(_applicationContext, webappDir, resourcePath,
schemaPluginsCatalogFile, schemaPluginsDir, "eng", "iso19139", true);
}
assertTrue(schemaManager.existsSchema("iso19139"));
assertTrue(schemaManager.existsSchema("iso19115"));
assertTrue(schemaManager.existsSchema("dublin-core"));
_applicationContext.getBean(SearchManager.class).init(false, false, "", 100);
_applicationContext.getBean(DataManager.class).init(createServiceContext(), false);
String siteUuid = _dataDirectory.getName();