diff --git a/maven-embedder/src/main/java/org/apache/maven/cli/MavenCli.java b/maven-embedder/src/main/java/org/apache/maven/cli/MavenCli.java index fa224d08b2..07e28bf295 100644 --- a/maven-embedder/src/main/java/org/apache/maven/cli/MavenCli.java +++ b/maven-embedder/src/main/java/org/apache/maven/cli/MavenCli.java @@ -191,6 +191,7 @@ public class MavenCli MavenCli cli = new MavenCli(); MessageUtils.systemInstall(); + MessageUtils.registerShutdownHook(); int result = cli.doMain( new CliRequest( args, classWorld ) ); MessageUtils.systemUninstall();