|
|
@ -74,8 +74,7 @@ public class StopMojo extends AbstractMojo {
|
|
|
|
return;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
getLog().info("Stopping application...");
|
|
|
|
getLog().info("Stopping application...");
|
|
|
|
try (JMXConnector connector = SpringApplicationAdminClient
|
|
|
|
try (JMXConnector connector = SpringApplicationAdminClient.connect(this.jmxPort)) {
|
|
|
|
.connect(this.jmxPort)) {
|
|
|
|
|
|
|
|
MBeanServerConnection connection = connector.getMBeanServerConnection();
|
|
|
|
MBeanServerConnection connection = connector.getMBeanServerConnection();
|
|
|
|
stop(connection);
|
|
|
|
stop(connection);
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -91,8 +90,7 @@ public class StopMojo extends AbstractMojo {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
catch (InstanceNotFoundException ex) {
|
|
|
|
catch (InstanceNotFoundException ex) {
|
|
|
|
throw new MojoExecutionException(
|
|
|
|
throw new MojoExecutionException(
|
|
|
|
"Spring application lifecycle JMX bean not found. Could not stop application gracefully",
|
|
|
|
"Spring application lifecycle JMX bean not found. Could not stop application gracefully", ex);
|
|
|
|
ex);
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|