This allows overriding the settings for the Maven StartMojo (spring-boot:start
) from the command line, most notably wait
and maxAttempts
, but also the other missing ones and for StopMojo as well. It is useful to increase the timeout on an CI environment, where it can take a longer time to start than usual. I've also moved the default values to the @Parameter
annotation, so that these show up in the documentation.
Comment From: pivotal-cla
@marcus-nl Please sign the Contributor License Agreement!
Click here to manually synchronize the status of this Pull Request.
See the FAQ for frequently asked questions.
Comment From: pivotal-cla
@marcus-nl Thank you for signing the Contributor License Agreement!
Comment From: marcus-nl
Hi @snicoll, Thanks for the feedback.
No doubt that exposing that via a property is useful but you can achieve that too by configuring the plugin with a property of your own and set that property in your CI environment.
True, but doesn't that apply to every configuration option? I think the timeout settings are particularly good candidates to give their own properties because their values may quite realistically differ in different circumstances. Not having to change the pom.xml (even to add your own property) makes it a lot more convenient.
I am, in particular, not keen to expose separate properties for thing that must have the same value. Thoughts?
You are right. Alternative combined names could be something like "spring-boot.management.jmxName" (/Port) or "spring-boot.jmx.name" (port)? Or just leave them propertly-less, since these seem less likely to need customization. I would suggest keeping the default values in the annotation though, so they show up in the generated documentation.
Comment From: snicoll
Thanks for the quick follow-up.
True, but doesn't that apply to every configuration option? I think the timeout settings are particularly good candidates to give their own properties because their values may quite realistically differ in different circumstances. Not having to change the pom.xml (even to add your own property) makes it a lot more convenient.
Agreed. The core of my review is that we shouldn't expose all properties. I agree those are good candidates.
Alternative combined names could be something like "spring-boot.management.jmxName" (/Port) or "spring-boot.jmx.name" (port)? Or just leave them propertly-less, since these seem less likely to need customization. I would suggest keeping the default values in the annotation though, so they show up in the generated documentation.
We don't really have any other use cases like this so I'd rather not expose it at all if we can. The default values is good feedback and should be done regardless.
Would you have the time to update your PR in that direction if you agree?
Comment From: marcus-nl
Done
Comment From: snicoll
@marcus-nl thank you for making your first contribution to Spring Boot.