back to all blogsSee all blog posts

Simplify your configuration with versionless features in 24.0.0.8

image of author
David Mueller on Aug 13, 2024
Post available in languages:

This release introduces versionless features for the Jakarta EE, Java EE, and MicroProfile platforms. It also includes updates to eliminate unnecessary audit records.

In Open Liberty 24.0.0.8:

Along with the new features and functions added to the runtime, we’ve also added a new guide to using MicroProfile Config.

View the list of fixed bugs in 24.0.0.8.

Develop and run your apps using 24.0.0.8

If you’re using Maven, include the following in your pom.xml file:

<plugin>
    <groupId>io.openliberty.tools</groupId>
    <artifactId>liberty-maven-plugin</artifactId>
    <version>3.10.3</version>
</plugin>

Or for Gradle, include the following in your build.gradle file:

buildscript {
    repositories {
        mavenCentral()
    }
    dependencies {
        classpath 'io.openliberty.tools:liberty-gradle-plugin:3.8.3'
    }
}
apply plugin: 'liberty'

Or if you’re using container images:

FROM icr.io/appcafe/open-liberty

Or take a look at our Downloads page.

If you’re using IntelliJ IDEA, Visual Studio Code or Eclipse IDE, you can also take advantage of our open source Liberty developer tools to enable effective development, testing, debugging and application management all from within your IDE.

Ask a question on Stack Overflow

Streamline feature selection with versionless Jakarta EE, Java EE, and MicroProfile features

With Open Liberty, you configure only the features at the specific versions that your application needs. This composable design pattern minimizes runtime resource requirements and accelerates application startup times. However, you might not always know which version of a feature is compatible with the rest of your application configuration. In previous releases, determining the correct version typically required a mix of experimentation, guesswork, and digging deep into feature documentation. In 24.0.0.8 and later, versionless features automate version selection, enabling you to focus on application development without worrying about compatibility issues.

For example, instead of specifying servlet-6.0 in your server.xml file and having to figure out which other feature versions are compatible with Servlet 6.0, you can specify a platform version and servlet. The platform that you specify resolves all versionless features to a compatible version.

The following server.xml file configuration uses a Java EE platform of javaee-8.0 with associated versionless features that are defined for servlet, jpa, and jaxrs:

    <!-- Enable features -->
    <featureManager>
        <platform>javaee-8.0</platform>
        <feature>servlet</feature>
        <feature>jpa</feature>
        <feature>jaxrs</feature>
    </featureManager>

This example enables versionless MicroProfile features with microProfile-5.0 specified as the platform element:

    <!-- Enable features -->
    <featureManager>
        <platform>microProfile-5.0</platform>
        <feature>mpHealth</feature>
        <feature>mpMetrics</feature>
    </featureManager>

Note: The Liberty Maven and Gradle build plugins do not yet support versionless features or platform definitions.

Learn more and check out the full collection of available platforms and versionless features in the Open Liberty docs. Stay tuned for more versionless features and platforms in future releases.

Use the Audit 2.0 feature to avoid generating unnecessary REST Handler records

The 24.0.0.8 release introduces the Audit 2.0 feature (audit-2.0). The feature is designed for users who are not using REST Handler applications. It provides the same audit records as the Audit 1.0 feature (audit-1.0) but it does not generate records for REST Handler applications.

If you need to keep audit records for REST Handler applications, you can continue to use the Audit 1.0 feature.

To enable the Audit 2.0 feature in your application, add the following code to your server.xml file:

<featureManager>
    <feature>audit-2.0</feature>
</featureManager>

New guide: Externalizing environment-specific microservice configuration for CI/CD

A new guide is available under the Configuration category: Externalizing environment-specific microservice configuration for CI/CD. You’ll learn how to use MicroProfile Config’s configuration profiles to externalize configurations for different phases of the CI/CD lifecycle.

Get Open Liberty 24.0.0.8 now