public static void registerShutdownTask(Runnable task) {
    Runtime.getRuntime().addShutdownHook(new Thread(task, "Maven-server-shutdown-hook"));
  }
public static void registerShutdownTask(Runnable task)