private static void removeHook(Thread thread) {
    Runtime.getRuntime().removeShutdownHook(thread);
    MavenServerGlobals.getLogger().print(String.format("ShutdownHook[%s] was removed to avoid memory leak", thread));
  }
private static void removeHook(Thread thread)