System.out.println("DELETE test repo dir: " + repoDir.getAbsolutePath());
RepositorySessionUtil.deleteDir( repoDir );
System.out.println("TEST repo dir deleted.");
}
JCRRepositoryConfigurator config = new JackrabbitRepositoryConfigurator();
String home = System.getProperty("guvnor.repository.dir");
repository = config.getJCRRepository(home);
Session testSession = repository.login(new SimpleCredentials("alan_parsons", "password".toCharArray()));
RulesRepositoryAdministrator admin = new RulesRepositoryAdministrator(testSession);
if (erase && admin.isRepositoryInitialized()) {
admin.clearRulesRepository( );
}
config.setupRulesRepository( testSession );
PrintWriter out = new PrintWriter(new FileOutputStream("/tmp/pepe.txt"));
//dump(testSession.getRootNode(), out);
// OutputStream out = new FileOutputStream("/tmp/pepe.txt");
// testSession.exportSystemView("/", out, true, false);
out.close();