Enabling MicroProfile Config 2.0 Feature
First, you enable in your server.xml via:
<featureManager>
<feature>mpConfig-2.0</feature>
<!--
Or enable all MicroProfile 4.0 features via:
<feature>microProfile-4.0</feature>
-->
</featureManager>
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:
<plugin>
<groupId>io.openliberty.tools</groupId>
<artifactId>liberty-maven-plugin</artifactId>
<version>3.3.4</version>
<configuration>
<assemblyArtifact>
<groupId>io.openliberty</groupId>
<artifactId>openliberty-runtime</artifactId>
<version>21.0.0.3</version>
</assemblyArtifact>
</configuration>
</plugin>
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:
<plugin>
<groupId>io.openliberty.tools</groupId>
<artifactId>liberty-maven-plugin</artifactId>
<version>3.3.4</version>
<configuration>
<assemblyArtifact>
<groupId>io.openliberty.beta</groupId>
<artifactId>openliberty-runtime</artifactId>
<version>21.0.0.3-beta</version>
<type>zip</type>
</assemblyArtifact>
</configuration>
</plugin>