Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow to configure StartMojo's wait and maxAttempts attributes from the command-line #26422

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -61,29 +61,29 @@ public class StartMojo extends AbstractRunMojo {
* The JMX name of the automatically deployed MBean managing the lifecycle of the
* spring application.
*/
@Parameter
private String jmxName = SpringApplicationAdminClient.DEFAULT_OBJECT_NAME;
@Parameter(defaultValue = SpringApplicationAdminClient.DEFAULT_OBJECT_NAME)
private String jmxName;

/**
* The port to use to expose the platform MBeanServer if the application is forked.
*/
@Parameter
private int jmxPort = 9001;
@Parameter(defaultValue = "9001")
private int jmxPort;

/**
* The number of milli-seconds to wait between each attempt to check if the spring
* application is ready.
*/
@Parameter
private long wait = 500;
@Parameter(property = "spring-boot.start.wait", defaultValue = "500")
private long wait;

/**
* The maximum number of attempts to check if the spring application is ready.
* Combined with the "wait" argument, this gives a global timeout value (30 sec by
* default)
*/
@Parameter
private int maxAttempts = 60;
@Parameter(property = "spring-boot.start.maxAttempts", defaultValue = "60")
private int maxAttempts;

private final Object lock = new Object();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,15 +62,15 @@ public class StopMojo extends AbstractMojo {
* The JMX name of the automatically deployed MBean managing the lifecycle of the
* application.
*/
@Parameter
private String jmxName = SpringApplicationAdminClient.DEFAULT_OBJECT_NAME;
@Parameter(defaultValue = SpringApplicationAdminClient.DEFAULT_OBJECT_NAME)
private String jmxName;

/**
* The port to use to lookup the platform MBeanServer if the application has been
* forked.
*/
@Parameter
private int jmxPort = 9001;
@Parameter(defaultValue = "9001")
private int jmxPort;

/**
* Skip the execution.
Expand Down