With spring-boot, I know that I can have profiles and use different configuration files depending on the active profiles. For instance the command:
"mvn spring-boot:run -Drun.profiles=default,production"
will run my spring-boot application using the settings defined in both the "application-default.properties" and "application-production.properties" with the settings on the second file overriding the same settings defined in the first file (for instance db connection settings). All this is currently running well.
However, I want to build my spring-boot application and generate a runnable jar using the following command:
"mvn package spring-boot:repackage".
This command does generate self-contained runnable jar perfectly well. The question is, ¿how do I specifiy active profiles with the former command? I have used
"mvn package spring-boot:repackage -Drun.profiles=default,production"
but it is not working.