In my pom.xml file, I have multiple profiles set up. I would like to use the current profile's values in my application.conf file. The Ninja Framework documentation only mentions mode configurations, however I can't find anything concerning profile configurations.
An example: The documentation mentions
database.name=database_production # will be used when no mode is set (or prod)
%prod.database.name=database_prod # will be used when running in prod mode
%dev.database.name=database_dev # will be used when running in dev mode
%test.database.name=database_test # will be used when running in test mode
How would I be able to set different database names depending on the currently used profile?
You could add whatever it is you want replaced as a property to your profile definition, and then enable maven resource filtering like this:
Be careful, if you use spring-boot, you should reference the properties in the application.properties file like this for it to work:
After that, building the app should filter the property correctly:
Result: