Hi there, I think it would be useful if the Spring Boot Maven plugin was somehow able to set Spring active profiles based on active Maven build profiles at the time of build.

Currently we achieve this by setting a property in the build profile's properties, and using property substitution to write the value into our application.properties file. However this is a bit inconvenient in the case where you are dealing with multiple active Maven build profiles: there is no simple way to concatenate the property from both build profiles.

Thanks for reading, Shawn

Comment From: philwebb

Thanks for the suggestion, this has actually come up before in #2626. We declined that one and after some discussion today we still feel the same way, and we don't think this is a pattern that we want to encourage.

One thing you could look into is developing your own Maven plugin to update the application.properties file automatically with the Maven profiles.

Comment From: shawnz

My apologies, I didn't see the dupe. Thanks for looking into this anyway.