Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
260 changes: 260 additions & 0 deletions posts/2026-02-24-26.0.0.2.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,260 @@
---
layout: post
title: "Java Toolchains in Liberty Build Plugins in 26.0.0.2"
# Do NOT change the categories section
categories: blog
author_picture: https://avatars3.githubusercontent.com/navaneethsnair1
author_github: https://github.com/navaneethsnair1
seo-title: Java Toolchains in Liberty Build Plugins in 26.0.0.2- OpenLiberty.io
seo-description: This release introduces Java Toolchains support in the Liberty Maven and Gradle plugins, allowing developers to decouple the JDK used to run build tools from the JDK used to run the Liberty server.
blog_description: This release introduces Java Toolchains support in the Liberty Maven and Gradle plugins, allowing developers to decouple the JDK used to run build tools from the JDK used to run the Liberty server.
open-graph-image: https://openliberty.io/img/twitter_card.jpg
open-graph-image-alt: Open Liberty Logo
blog-available-in-languages:
- lang: ja
path: /ja/blog/2026/01/27/26.0.0.2.html
---
= Java Toolchains in Liberty Build Plugins in 26.0.0.2
Navaneeth S Nair <https://github.com/navaneethsnair1>
:imagesdir: /
:url-prefix:
:url-about: /
//Blank line here is necessary before starting the body of the post.

// // // // // // // //
// In the preceding section:
// Do not insert any blank lines between any of the lines.
// Do not remove or edit the variables on the lines beneath the author name.
//
// "open-graph-image" is set to OL logo. Whenever possible update this to a more appropriate/specific image (For example if present a image that is being used in the post). However, it
// can be left empty which will set it to the default
//
// "open-graph-image-alt" is a description of what is in the image (not a caption). When changing "open-graph-image" to
// a custom picture, you must provide a custom string for "open-graph-image-alt".
//
// Replace TITLE with the blog post title eg: MicroProfile 3.3 is now available on Open Liberty 20.0.0.4
// Replace navaneethsnair1 with your GitHub username eg: lauracowen
// Replace DESCRIPTION with a short summary (~60 words) of the release (a more succinct version of the first paragraph of the post).
// Replace Navaneeth S Nair with your name as you'd like it to be displayed, eg: Laura Cowen
//
// Example post: 2020-04-09-microprofile-3-3-open-liberty-20004.adoc
//
// If adding image into the post add :
// -------------------------
// [.img_border_light]
// image::img/blog/FILE_NAME[IMAGE CAPTION ,width=70%,align="center"]
// -------------------------
// "[.img_border_light]" = This adds a faint grey border around the image to make its edges sharper. Use it around screenshots but not
// around diagrams. Then double check how it looks.
// There is also a "[.img_border_dark]" class which tends to work best with screenshots that are taken on dark
// backgrounds.
// Change "FILE_NAME" to the name of the image file. Also make sure to put the image into the right folder which is: img/blog
// change the "IMAGE CAPTION" to a couple words of what the image is
// // // // // // // //

This release introduces Java Toolchains support in the Liberty Maven and Gradle plugins, allowing developers to decouple the JDK used to run build tools from the JDK used to run the Liberty server.

// // // // // // // //
// In the preceding section:
// Leave any instances of `tag::xxxx[]` or `end:xxxx[]` as they are.
//
// Replace RELEASE_SUMMARY with a short paragraph that summarises the release. Start with the lead feature but also summarise what else is new in the release. You will agree which will be the lead feature with the reviewers so you can just leave a placeholder here until after the initial review.
// // // // // // // //

// // // // // // // //
// Replace the following throughout the document:
// Replace 26.0.0.2 with the version number of Open Liberty, eg: 22.0.0.2
// Replace 26001 with the version number of Open Liberty wihtout the periods, eg: 22002
// // // // // // // //

In link:{url-about}[Open Liberty] 26.0.0.2:

* <<java_toolchains, Java Toolchains in Liberty Build Plugins>>
* <<bugs, Notable bug fixes>>

View the list of fixed bugs in link:https://github.com/OpenLiberty/open-liberty/issues?q=label%3Arelease%3A26002+label%3A%22release+bug%22[26.0.0.2].

Check out link:{url-prefix}/blog/?search=release&search!=beta[previous Open Liberty GA release blog posts].


[#run]

// // // // // // // //
// LINKS
//
// OpenLiberty.io site links:
// link:{url-prefix}/guides/maven-intro.html[Maven]
//
// Off-site links:
//link:https://openapi-generator.tech/docs/installation#jar[Download Instructions]
//
// IMAGES
//
// Place images in ./img/blog/
// Use the syntax:
// image::/img/blog/log4j-rhocp-diagrams/current-problem.png[Logging problem diagram,width=70%,align="center"]
// // // // // // // //

== Develop and run your apps using 26.0.0.2

If you're using link:{url-prefix}/guides/maven-intro.html[Maven], include the following in your `pom.xml` file:

[source,xml]
----
<plugin>
<groupId>io.openliberty.tools</groupId>
<artifactId>liberty-maven-plugin</artifactId>
<version>3.12.0</version>
</plugin>
----

Or for link:{url-prefix}/guides/gradle-intro.html[Gradle], include the following in your `build.gradle` file:

[source,gradle]
----
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath 'io.openliberty.tools:liberty-gradle-plugin:3.10.0'
}
}
apply plugin: 'liberty'
----
// // // // // // // //
// In the preceding section:
// Replace the Maven `3.11.5` with the latest version of the plugin: https://search.maven.org/artifact/io.openliberty.tools/liberty-maven-plugin
// Replace the Gradle `3.9.5` with the latest version of the plugin: https://search.maven.org/artifact/io.openliberty.tools/liberty-gradle-plugin
// TODO: Update GHA to automatically do the above. If the maven.org is problematic, then could fallback to using the GH Releases for the plugins
// // // // // // // //

Or if you're using link:{url-prefix}/docs/latest/container-images.html[container images]:

[source]
----
FROM icr.io/appcafe/open-liberty
----

Or take a look at our link:{url-prefix}/start/[Downloads page].

If you're using link:https://plugins.jetbrains.com/plugin/14856-liberty-tools[IntelliJ IDEA], link:https://marketplace.visualstudio.com/items?itemName=Open-Liberty.liberty-dev-vscode-ext[Visual Studio Code] or link:https://marketplace.eclipse.org/content/liberty-tools[Eclipse IDE], you can also take advantage of our open source link:https://openliberty.io/docs/latest/develop-liberty-tools.html[Liberty developer tools] to enable effective development, testing, debugging and application management all from within your IDE.

[link=https://stackoverflow.com/tags/open-liberty]
image::img/blog/blog_btn_stack.svg[Ask a question on Stack Overflow, align="center"]

// // // // DO NOT MODIFY THIS COMMENT BLOCK <GHA-BLOG-TOPIC> // // // //
// Blog issue: https://github.com/OpenLiberty/open-liberty/issues/34101
// Contact/Reviewer: venmanyarun
// // // // // // // //
[#java_toolchains]
== Java Toolchains in Liberty Build Plugins

In this update, Open Liberty introduces support for Java Toolchains in the Liberty Maven and Gradle plugins. This enhancement allows developers to decouple the JDK used to run their build tools from the JDK used to run the Liberty server, providing greater flexibility and environmental consistency.

* link:https://www.google.com/search?q=%23java-toolchains[Java Toolchains support]
* link:https://www.google.com/search?q=%23maven-integration[Maven Plugin integration]
* link:https://www.google.com/search?q=%23gradle-integration[Gradle Plugin integration]

=== Java Toolchains support

Open Liberty build plugins now support the standard Java Toolchain mechanism.
Previously, Liberty plugins were restricted to using the same Java version that was running Maven or Gradle.
This often forced developers to use older JDKs for their entire build process if their application required a specific legacy runtime.

With Java Toolchains, you can now run your build tool on a modern JDK (e.g., Java 21). This ensures the Liberty server and its tasks (such as dev mode or JSP compilation) execute on a different, specified JDK (e.g., Java 8 or 11).

=== Maven Plugin integration

The Liberty Maven plugin now integrates seamlessly with the maven-toolchain-plugin. To use this feature, define your available JDKs in your `~/.m2/toolchains.xml` file. The plugin automatically detects and uses the toolchain that is specified in your project's `pom.xml` file.

For detailed configuration steps and parameters, see the link:https://github.com/OpenLiberty/ci.maven/blob/main/docs/toolchain.md[Liberty Maven Plugin Toolchain documentation].

[source,xml]
----
<plugin>
<groupId>io.openliberty.tools</groupId>
<artifactId>liberty-maven-plugin</artifactId>
<version>3.12.0</version>
</plugin>
----

The plugin acknowledges the JDK vendor and version constraints that are defined in your Maven profiles, helping to ensure that your server environment remains consistent across different developer machines and CI/CD pipelines.

=== Gradle Plugin integration

For Gradle users, the Liberty Gradle plugin now acknowledges the native `java { toolchain { ... } }` configuration block. This configuration provides a unified way to manage Java versions in multi-project builds where different services might have different runtime requirements.

For technical specifics on how the plugin resolves these environments, see the link:https://github.com/OpenLiberty/ci.gradle/blob/main/docs/toolchain.md[Liberty Gradle Plugin Toolchain documentation].

When a toolchain is configured in your `build.gradle`, the Liberty plugin uses that specific Java runtime for all server-related tasks, including `libertyDev` and `libertyStart`.

=== Try it now

To start using Java Toolchains, update your build tools to the latest versions of the Liberty Maven or Gradle plugins.

*For Maven:*

[source,xml]
----
<plugin>
<groupId>io.openliberty.tools</groupId>
<artifactId>liberty-maven-plugin</artifactId>
<version>3.12.0</version>
<configuration>
<jdkToolchain>
<version>11</version>
<vendor>temurin</vendor>
</jdkToolchain>
</configuration>
</plugin>
----

*For Gradle:*

[source,gradle]
----
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath 'io.openliberty.tools:liberty-gradle-plugin:3.10.0'
}
}
apply plugin: 'liberty'


java {
toolchain {
languageVersion = JavaLanguageVersion.of(17)
// Optional: specify vendor
// vendor = JvmVendorSpec.ADOPTIUM
}
}
----

// DO NOT MODIFY THIS LINE. </GHA-BLOG-TOPIC>

[#bugs]
== Notable bugs fixed in this release


We’ve spent some time fixing bugs. The following sections describe the issues resolved in this release. If you’re interested, here’s the link:https://github.com/OpenLiberty/open-liberty/issues?q=label%3Arelease%3A26002+label%3A%22release+bug%22[full list of bugs fixed in 26.0.0.1].

* link:https://github.com/OpenLiberty/open-liberty/issues/33927[IBM WebSphere Application Server Liberty is affected by a remote code execution vulnerability (CVE-2025-14914 CVSS 7.6)]
* link:https://github.com/OpenLiberty/open-liberty/issues/32996["WARNING: package sun.security.action not in java.base" shows up in console.log starting in Java 24]

// // // // // // // //
// In the preceding section:
// For this section ask either Michal Broz or Tom Evans or the #openliberty-release-blog channel for Notable bug fixes in this release.
// Present them as a list in the order as provided, linking to the issue and providing a short description of the bug and the resolution.
// If the issue on Github is missing any information, leave a comment in the issue along the lines of:
// "@[issue_owner(s)] please update the description of this `release bug` using the [bug report template](https://github.com/OpenLiberty/open-liberty/issues/new?assignees=&labels=release+bug&template=bug_report.md&title=)"
// Feel free to message the owner(s) directly as well, especially if no action has been taken by them.
// For inspiration about how to write this section look at previous blogs e.g- 20.0.0.10 or 21.0.0.12 (https://openliberty.io/blog/2021/11/26/jakarta-ee-9.1.html#bugs)
// // // // // // // //

== Get Open Liberty 26.0.0.2 now

Available through <<run,Maven, Gradle, Docker, and as a downloadable archive>>.