private static MavenExecutionResult safeExecute(MavenExecutionRequest request, Maven maven) {
    MavenLeakDetector detector = new MavenLeakDetector().mark();
    MavenExecutionResult result = maven.execute(request);
    detector.check();
    return result;
  }
private static MavenExecutionResult safeExecute(MavenExecutionRequest request, Maven maven)