You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
seo-title: Java Toolchains in Liberty Build Plugins in 26.0.0.2- OpenLiberty.io
9
-
seo-description: This release introduces Java Toolchains support in the Liberty Maven and Gradle plugins, enabling developers to decouple the JDK used to run build tools from the JDK used to run the Liberty server.
10
-
blog_description: This release introduces Java Toolchains support in the Liberty Maven and Gradle plugins, enabling developers to decouple the JDK used to run build tools from the JDK used to run the Liberty server.
9
+
seo-description: This release introduces Java Toolchains support, enabling developers to decouple the JDK used to run build tools from the JDK used to run the Liberty server.
10
+
blog_description: This release introduces Java Toolchains support, enabling developers to decouple the JDK used to run build tools from the JDK used to run the Liberty server.
= Java Toolchains in Liberty Build Plugins in 26.0.0.2
18
15
Navaneeth S Nair <https://github.com/navaneethsnair1>
@@ -52,7 +49,7 @@ Navaneeth S Nair <https://github.com/navaneethsnair1>
52
49
// change the "IMAGE CAPTION" to a couple words of what the image is
53
50
// // // // // // // //
54
51
55
-
This release introduces Java Toolchains support in the Liberty Maven and Gradle plugins, enabling developers to decouple the JDK used to run build tools from the JDK used to run the Liberty server.
52
+
This release introduces Java Toolchains support, enabling developers to decouple the JDK used to run build tools from the JDK used to run the Liberty server.
56
53
57
54
// // // // // // // //
58
55
// In the preceding section:
@@ -150,40 +147,34 @@ image::img/blog/blog_btn_stack.svg[Ask a question on Stack Overflow, align="cent
150
147
[#java_toolchains]
151
148
== Java Toolchains in Liberty Build Plugins
152
149
153
-
In this update, Open Liberty introduces support for Java Toolchains in the Liberty Maven and Gradle plugins. This enhancement enables developers to decouple the JDK used to run their build toolsfrom the JDK used to run the Liberty server, providing greater flexibility and environmental consistency.
150
+
In the latest release of the Liberty build plugins, support has been added for Java Toolchains. This enhancement enables developers to decouple the JDK used to run their build tools(Maven or Gradle) from the JDK used to run the Liberty server and their applications. This provides greater flexibility and environmental consistency.
154
151
155
152
=== Java Toolchains support
156
153
157
-
Open Liberty build plugins now support the standard Java Toolchain mechanism.
154
+
The Liberty build plugins now support the standard Java Toolchain mechanism.
158
155
Previously, Liberty plugins were restricted to using the same Java version that was running Maven or Gradle.
159
-
This often forced developers to use older JDKs for their entire build process if their application required a specific legacy runtime.
156
+
This prevented developers from using more recent JDK versions for their build process if their applications required a specific older JDK version.
160
157
161
-
With Java Toolchains, you can now run your build tool on a modern JDK (for example, Java 21). This helps ensure that the Liberty server and its tasks (such as dev mode or JSP compilation) execute using a different, specified JDK (for example, Java 8 or 11).
158
+
With Java Toolchains, you can now run your build tool on a modern JDK (for example, Java 25). At the same time, Liberty server and all server operations can execute using a different, configured JDK (for example, Java 8).
162
159
163
160
=== Maven Plugin integration
164
161
165
162
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.
163
+
The Liberty Maven Plugin now integrates seamlessly with the maven-toolchain-plugin as of version 3.12.0.
164
+
To use this feature, define your available JDKs in your `~/.m2/toolchains.xml` file and then configure `<jdkToolchain>` tag in `<configuration>`.
166
165
166
+
The plugin automatically detects and uses the toolchain specified in your project’s `pom.xml` file.
167
167
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].
168
168
169
-
[source,xml]
170
-
----
171
-
<plugin>
172
-
<groupId>io.openliberty.tools</groupId>
173
-
<artifactId>liberty-maven-plugin</artifactId>
174
-
<version>3.12.0</version>
175
-
</plugin>
176
-
----
177
-
178
169
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.
179
170
180
171
=== Gradle Plugin integration
181
172
182
-
For Gradle users, the Liberty Gradle plugin now recognizes the native `java { toolchain { ... } }` configuration block. This configuration provides a unified way to manage Java versions across multi-project builds, where different services might have different runtime requirements.
173
+
The Liberty Gradle plugin now recognizes the native `java { toolchain { ... } }` configuration block as of version 3.10.0. This configuration provides a unified way to manage Java versions across multi-project builds, where different services might have different runtime requirements.
183
174
184
-
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].
175
+
For detailed configuration steps and parameters, see the link:https://github.com/OpenLiberty/ci.gradle/blob/main/docs/toolchain.md[Liberty Gradle Plugin Toolchain documentation].
185
176
186
-
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`.
177
+
When a toolchain is configured in your `build.gradle`, the Liberty plugin uses that specific Java runtime for all server-related tasks(for example, `libertyDev` and `libertyStart`).
187
178
188
179
=== Try it now
189
180
@@ -236,7 +227,7 @@ java {
236
227
== Notable bugs fixed in this release
237
228
238
229
239
-
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].
230
+
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.2].
240
231
241
232
* 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)]
242
233
* 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]
0 commit comments