Skip to content

Commit

Permalink
Run war:war in ShutdownHook
Browse files Browse the repository at this point in the history
Signed-off-by: Scott Kurz <[email protected]>
  • Loading branch information
scottkurz committed Aug 9, 2023
1 parent 4ebcd7e commit 7dbfd95
Showing 1 changed file with 12 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1424,6 +1424,18 @@ private void doDevMode() throws MojoExecutionException {
}

util.addShutdownHook(executor);

Runtime.getRuntime().addShutdownHook(new Thread() {
@Override
public void run() {
try {
runMojoForProject("org.apache.maven.plugins", "maven-war-plugin", "war", project);
} catch (MojoExecutionException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
});

try {
util.startServer();
Expand Down

0 comments on commit 7dbfd95

Please sign in to comment.