System.out.printf(" %s at %s\n",
app.getKind(), app.getURL());
}
// Is Discovery available?
ConfigurationService config = new DSpace().getConfigurationService();
String consumers = config.getPropertyAsType("event.dispatcher.default.consumers", ""); // Avoid null pointer
List<String> consumerList = Arrays.asList(consumers.split("\\s*,\\s*"));
if (consumerList.contains("discovery"))
{
System.out.println(" Discovery: enabled.");
}
// Is Lucene search enabled?
if (consumerList.contains("search"))
{
System.out.println(" Lucene search: enabled.");
}
// Java version
System.out.printf(" JRE: %s version %s\n",
sys.get("java.vendor"),
sys.get("java.version"));
// ant version
Properties ant = new Properties();
propStream = Version.class.getResourceAsStream("/ant.properties");
if (null != propStream)
{
ant.load(propStream);
}
System.out.printf(" Ant version: %s\n",
ant.get("ant.version"));
// maven version
Properties maven = new Properties();
propStream = Version.class.getResourceAsStream("/maven.properties");
if (null != propStream)
{
maven.load(propStream);
}
System.out.printf(" Maven version: %s\n",
maven.get("maven.version"));
// DSpace directory path
System.out.printf(" DSpace home: %s\n",
config.getProperty("dspace.dir"));
}