public class ServerMojo extends AbstractAnalysisAggregatorMojo {
@Override
protected void aggregate(MavenProject baseProject, Set<MavenProject> projects, Store store) throws MojoExecutionException,
MojoFailureException {
Server server = new Server((EmbeddedGraphStore) store);
server.start();
getLog().info(
"Running server for module " + baseProject.getGroupId() + ":" + baseProject.getArtifactId() + ":"
+ baseProject.getVersion());
getLog().info("Press <Enter> to finish.");
try {
System.in.read();
} catch (IOException e) {
throw new MojoExecutionException("Cannot read from System.in.", e);
} finally {
server.stop();
}
}