Im currently trying to run a microprofile open liberty project as a jar.
java -jar myapp.jar -Dmp.config.profile=test
The app runs but is not picking the configuration values from microprofile-config-test.properties instead is using values from microprofile-config.properties
Thank you in advance
Enabling MicroProfile Config 2.0 Feature
First, you enable in your server.xml via:
Installing GA version of Open Liberty
Default version
By default,
liberty-maven-plugin
will install the latest version of Open Liberty.Installing a specific GA version
You can install a specific version of Open Liberty (e.g. version 21.0.0.3 which contains the GA support for MicroProfile 4.0 features such as MicroProfile Config 2.0) via liberty-maven-plugin config:
Installing a beta version of Open Liberty with liberty-maven-plugin
UPDATE: (I originally posted this answer when the MicroProfile Config 2.0 feature was still in beta, but for reference I'll move this to a new section below.)
Here is how to install a specific version of the Open Liberty runtime beta, using the liberty-maven-plugin: