This is an automated email from the ASF dual-hosted git repository.
yesamer pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/incubator-kie.git
The following commit(s) were added to refs/heads/main by this push:
new 39fbbd7a6c9 feat(build): support JDK 25 alongside JDK 17 and 21 (#7331)
39fbbd7a6c9 is described below
commit 39fbbd7a6c9dc691ca8ba971b04cd562e41e1091
Author: Yeser Amer <[email protected]>
AuthorDate: Mon Nov 30 19:00:58 2026 +0100
feat(build): support JDK 25 alongside JDK 17 and 21 (#7331)
* JDK25- First round
* Fix Quarkus argLine warnings: add @{argLine} to surefire/failsafe configs
The Quarkus Maven extension requires @{argLine} to be present in any
explicit argLine configuration so it can inject its JVM parameters.
All argLine entries across kie-parent, efesto, kogito-build, and
drools-quarkus-extension modules were missing this placeholder,
causing repeated warnings during mvn clean install.
* Updated archunit.maven.plugin to support JDK 25
* Updated mvel to support JDK25
* JDK 25 added in the matrix
* Revert "Fix Quarkus argLine warnings: add @{argLine} to surefire/failsafe
configs"
This reverts commit 8ae42b3cec4c4f349487e872b616b7c85b6f450d.
* Use plugin versions managed by the Apache parent in Kogito build and ITs
The Apache parent POM (v39) manages the surefire, failsafe, surefire-report,
clean and compiler plugin versions, so the dedicated properties in the
Kogito
build are no longer needed.
- Remove version.surefire.plugin and version.surefire.report.plugin from
kogito-build-no-bom-parent and let the plugins inherit the managed version
(surefire/failsafe/surefire-report now 3.5.6 instead of 3.3.1/3.1.2).
- Drop the explicit surefire/failsafe <version> from kogito-quarkus addons,
kogito-maven-plugin-test and the Spring Boot integration tests.
- Point the invoker IT and devmode test projects at the Apache property
names
(version.maven-clean-plugin, version.maven-compiler-plugin,
version.maven-surefire), since version.clean.plugin and
version.compiler.plugin no longer exist and their @...@ placeholders were
left unresolved.
- Remove the unused surefire.version property from the devmode test
projects.
* Keep only JDK 25 required changes: move POM cleanup and plugin updates
out of this branch
Also keep ArchUnit maven plugin 4.0.2 on JDK 21 (5.x needs Java 25 to run)
and maven-invoker-plugin 3.10.1 (older Groovy cannot read JDK 25 class
files).
* Kogito build parent: use shared version.archunit.maven.plugin instead of
stale 4.0.2 property
* maven-archetype-plugin 3.4.1: bundled Groovy supports JDK 25 class files
* Drop changes not required for JDK 25: shade 3.6.2, ArchUnit 5.0.0 (+ JDK
21 profile) and locale-safe test edits
* Shorten locale argLine comment
* Document why <proc>full</proc> is needed
* Restore ArchUnit plugin 5.0.0 (4.x bundles an ArchUnit that cannot read
JDK 25 classes); keep 4.0.2 on JDK 21
* Kogito build parent: drop stale version.com.societegenerale.commons, use
shared version.archunit.maven.plugin
* Make locale argLine comment generic
* Register apiNote/implSpec/implNote javadoc tags for JDK 25
* Revert default locale argLine; use test-en profile instead and document
for JDK 25
* docs: add Java 25 to PR_CHECKS_AND_CI.md
---
.github/workflows/ci.yaml | 6 +++++-
docs/BUILDING.md | 6 ++++--
docs/PR_CHECKS_AND_CI.md | 13 +++++++------
.../mvel/java/JavaForMvelDialectConfiguration.java | 2 +-
.../java/JavaForMvelDialectConfigurationTest.java | 4 ++++
kie-dmn/kie-dmn-core-jsr223/pom.xml | 1 +
.../org/kie/memorycompiler/JavaConfiguration.java | 4 ++--
kie-parent/pom.xml | 22 ++++++++++++++++++----
kogito-build/kogito-build-no-bom-parent/pom.xml | 5 ++---
optaplanner-build/optaplanner-build-parent/pom.xml | 18 ++++++++++++++++++
pom.xml | 2 ++
11 files changed, 64 insertions(+), 19 deletions(-)
diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml
index a7c766b8289..8915db32a5d 100644
--- a/.github/workflows/ci.yaml
+++ b/.github/workflows/ci.yaml
@@ -48,7 +48,7 @@ jobs:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
- java: [17, 21]
+ java: [17, 21, 25]
# macos and windows temporarily excluded
# due to Docker-dependent tests introduced by the kogito-runtimes merge
# failing on non-Linux runners. Re-enable once resolved.
@@ -57,10 +57,14 @@ jobs:
java: 17
- os: windows-latest
java: 21
+ - os: windows-latest
+ java: 25
- os: macos-latest
java: 17
- os: macos-latest
java: 21
+ - os: macos-latest
+ java: 25
steps:
- name: 'SETUP :: Set paths for temporary files'
diff --git a/docs/BUILDING.md b/docs/BUILDING.md
index 961183c4dc3..44663bc0a64 100644
--- a/docs/BUILDING.md
+++ b/docs/BUILDING.md
@@ -21,7 +21,7 @@
## Prerequisites
-- Java SDK 17 or 21 (OpenJDK recommended) — CI builds with both — and Git
+- Java SDK 17, 21 or 25 (OpenJDK recommended) — CI builds with all three — and
Git
- Docker — not strictly required, but needed by some integration tests
(Testcontainers-based); those tests can be skipped
- For GraalVM native image builds, follow the
@@ -56,7 +56,9 @@ standard Maven reactor flags (`-pl <module> -am` / `-amd`).
- Unit tests run with surefire; integration tests run with failsafe and are
named with a trailing `IT` (e.g. `SomethingIT.java`).
- Some tests assume an `en_US` locale. On machines with a different locale,
- activate the `test-en` profile: `-Ptest-en` or `-DTestEn`.
+ activate the `test-en` profile: `-Ptest-en` or `-DTestEn`. This matters most
+ on JDK 25, whose newer locale data formats numbers and currencies differently
+ for some locales (e.g. `en_IT`) than JDK 21 does.
- Test coverage (Jacoco): `mvn clean verify -Ptest-coverage`, report under
`target/site/jacoco/`.
- Quarkus modules: `@QuarkusTest` classes are unit tests (surefire),
diff --git a/docs/PR_CHECKS_AND_CI.md b/docs/PR_CHECKS_AND_CI.md
index 3b13771f131..496e033b96c 100644
--- a/docs/PR_CHECKS_AND_CI.md
+++ b/docs/PR_CHECKS_AND_CI.md
@@ -24,7 +24,7 @@ CI runs on GitHub Actions. Workflows live in
[`script/ci/`](../script/ci/) as [JBang](https://www.jbang.dev) scripts, plus
local composite actions in [`.github/actions/`](../.github/actions/).
-## `CI :: Build (Java 17)` / `CI :: Build (Java 21)` — the main PR checks
+## `CI :: Build (Java 17)` / `CI :: Build (Java 21)` / `CI :: Build (Java 25)`
— the main PR checks
Defined in [ci.yaml](../.github/workflows/ci.yaml). Runs on every pull request
against `main`, and on every push to `main`. Documentation-only changes
@@ -61,16 +61,17 @@ JARs) and `-Dreproducible`.
Notes:
-- The build matrix currently runs on Linux with Java 17 and Java 21 (producing
- check names `CI :: Build (Java 17) / ubuntu-latest` and
- `CI :: Build (Java 21) / ubuntu-latest`); macOS and Windows are temporarily
+- The build matrix currently runs on Linux with Java 17, Java 21, and Java 25
(producing
+ check names `CI :: Build (Java 17) / ubuntu-latest`,
+ `CI :: Build (Java 21) / ubuntu-latest`, and
+ `CI :: Build (Java 25) / ubuntu-latest`); macOS and Windows are temporarily
excluded because of Docker-dependent tests failing on non-Linux runners.
- The `apache.snapshots` Maven repository is blocked via a mirror in
`settings.xml`, so builds cannot silently depend on snapshot artifacts.
- A new push to a PR cancels that PR's in-progress run, and so does closing
or merging the PR. Runs for pushes to `main` are never canceled.
- `CI :: Build (Java 17)`, `CI :: Build (Java 21)`, `CI :: CI Tests`, and
- `Dev :: Tests` follow the same rules.
+ `CI :: Build (Java 17)`, `CI :: Build (Java 21)`, `CI :: Build (Java 25)`,
+ `CI :: CI Tests`, and `Dev :: Tests` follow the same rules.
- After the build, a Surefire report step fails the job on test failures, and
the build logs (`build.log`) plus the reproducibility outputs
(`*.buildcompare`, `*.buildinfo`) are uploaded as workflow artifacts.
diff --git
a/drools-mvel/src/main/java/org/drools/mvel/java/JavaForMvelDialectConfiguration.java
b/drools-mvel/src/main/java/org/drools/mvel/java/JavaForMvelDialectConfiguration.java
index 6e914fc7fb9..a8f8d6be64d 100644
---
a/drools-mvel/src/main/java/org/drools/mvel/java/JavaForMvelDialectConfiguration.java
+++
b/drools-mvel/src/main/java/org/drools/mvel/java/JavaForMvelDialectConfiguration.java
@@ -35,7 +35,7 @@ import org.slf4j.LoggerFactory;
* The valid values are "ECLIPSE" and "NATIVE" only.
*
* drools.dialect.java.compiler = <ECLIPSE|NATIVE>
- * drools.dialect.java.compiler.lnglevel = <17|18|19|20|21>
+ * drools.dialect.java.compiler.lnglevel = <17|18|19|20|21|22|23|24|25>
*
* Defaults (Eclipse compiler, language level 17 with autodiscovery from the
* "java.version" system property) are applied by JavaDialectConfiguration#init
diff --git
a/drools-mvel/src/test/java/org/drools/mvel/compiler/rule/builder/dialect/java/JavaForMvelDialectConfigurationTest.java
b/drools-mvel/src/test/java/org/drools/mvel/compiler/rule/builder/dialect/java/JavaForMvelDialectConfigurationTest.java
index baaf8394863..1481283f222 100644
---
a/drools-mvel/src/test/java/org/drools/mvel/compiler/rule/builder/dialect/java/JavaForMvelDialectConfigurationTest.java
+++
b/drools-mvel/src/test/java/org/drools/mvel/compiler/rule/builder/dialect/java/JavaForMvelDialectConfigurationTest.java
@@ -32,6 +32,10 @@ public class JavaForMvelDialectConfigurationTest {
new JavaForMvelDialectConfiguration().setJavaLanguageLevel("19");
new JavaForMvelDialectConfiguration().setJavaLanguageLevel("20");
new JavaForMvelDialectConfiguration().setJavaLanguageLevel("21");
+ new JavaForMvelDialectConfiguration().setJavaLanguageLevel("22");
+ new JavaForMvelDialectConfiguration().setJavaLanguageLevel("23");
+ new JavaForMvelDialectConfiguration().setJavaLanguageLevel("24");
+ new JavaForMvelDialectConfiguration().setJavaLanguageLevel("25");
}
@Test
diff --git a/kie-dmn/kie-dmn-core-jsr223/pom.xml
b/kie-dmn/kie-dmn-core-jsr223/pom.xml
index 18f37e6220d..5ba1c0c8fe6 100644
--- a/kie-dmn/kie-dmn-core-jsr223/pom.xml
+++ b/kie-dmn/kie-dmn-core-jsr223/pom.xml
@@ -68,6 +68,7 @@
<dependency>
<groupId>org.graalvm.js</groupId>
<artifactId>js</artifactId>
+ <type>pom</type>
<scope>test</scope>
</dependency>
<dependency>
diff --git
a/kie-memory-compiler/src/main/java/org/kie/memorycompiler/JavaConfiguration.java
b/kie-memory-compiler/src/main/java/org/kie/memorycompiler/JavaConfiguration.java
index 45faad36c4d..8aa587f3ee2 100644
---
a/kie-memory-compiler/src/main/java/org/kie/memorycompiler/JavaConfiguration.java
+++
b/kie-memory-compiler/src/main/java/org/kie/memorycompiler/JavaConfiguration.java
@@ -31,7 +31,7 @@ import org.kie.memorycompiler.jdknative.NativeJavaCompiler;
* The valid values are "ECLIPSE" and "NATIVE" only.
*
* drools.dialect.java.compiler = <ECLIPSE|NATIVE>
- * drools.dialect.java.compiler.lnglevel = <17|18|19|20|21>
+ * drools.dialect.java.compiler.lnglevel = <17|18|19|20|21|22|23|24|25>
*
* This base class holds the validated values; defaults (Eclipse compiler,
* language level 17 with autodiscovery from the "java.version" system
@@ -40,7 +40,7 @@ import org.kie.memorycompiler.jdknative.NativeJavaCompiler;
public class JavaConfiguration {
// This should be in alphabetic order to search with BinarySearch
- protected static final String[] LANGUAGE_LEVELS = new String[]{"17",
"18", "19", "20", "21"};
+ protected static final String[] LANGUAGE_LEVELS = new String[]{"17",
"18", "19", "20", "21", "22", "23", "24", "25"};
public static final String JAVA_COMPILER_PROPERTY =
"drools.dialect.java.compiler";
public static final String JAVA_LANG_LEVEL_PROPERTY =
"drools.dialect.java.compiler.lnglevel";
diff --git a/kie-parent/pom.xml b/kie-parent/pom.xml
index bb7966ce7ca..d073d5b3523 100644
--- a/kie-parent/pom.xml
+++ b/kie-parent/pom.xml
@@ -82,7 +82,7 @@
<version.apache.commons.commons-compress>1.28.0</version.apache.commons.commons-compress>
<version.archunit.junit5>1.4.0</version.archunit.junit5>
<!-- plugin used to enforce architectural constraints -->
- <version.archunit.maven.plugin>4.0.2</version.archunit.maven.plugin>
+ <version.archunit.maven.plugin>5.0.0</version.archunit.maven.plugin>
<version.artifact.transfer>0.9.1</version.artifact.transfer>
<version.asciidoctor-maven-plugin>2.0.0-RC.1</version.asciidoctor-maven-plugin>
<version.at.yawk.lz4.java>1.11.4</version.at.yawk.lz4.java>
@@ -144,7 +144,7 @@
<version.enforce-victims-rule>1.3.4</version.enforce-victims-rule>
<version.exec-maven-plugin>1.5.0</version.exec-maven-plugin>
<version.extra-enforcer-rules>1.0</version.extra-enforcer-rules>
- <version.graalvm>22.0.0.2</version.graalvm>
+ <version.graalvm>25.0.3</version.graalvm>
<version.gradle>8.11.1</version.gradle>
<version.guru.nidi>0.18.0</version.guru.nidi>
<version.illegal-transitive-dependency-check>1.7.4</version.illegal-transitive-dependency-check>
@@ -203,7 +203,7 @@
<version.maven-javadoc-plugin>3.12.0</version.maven-javadoc-plugin>
<!-- Note: following ones are two different plugins -->
<version.maven.invoker>3.2.0</version.maven.invoker>
- <version.maven-invoker-plugin>3.6.1</version.maven-invoker-plugin>
+ <version.maven-invoker-plugin>3.10.1</version.maven-invoker-plugin>
<version.maven.min>3.8.1</version.maven.min>
<version.maven.plugin>3.15.1</version.maven.plugin>
<version.maven.project>2.2.1</version.maven.project>
@@ -287,7 +287,7 @@
<version.org.mockito>5.24.0</version.org.mockito>
<version.org.mongo>5.3.1</version.org.mongo>
<version.org.mozilla.rhino>1.8.1</version.org.mozilla.rhino>
- <version.org.mvel>2.5.4.Final</version.org.mvel>
+ <version.org.mvel>2.6.0.Final</version.org.mvel>
<!-- Version of JMH -->
<version.org.openjdk.jmh>1.21</version.org.openjdk.jmh>
<version.org.ow2.asm>9.11.1</version.org.ow2.asm>
@@ -1814,6 +1814,7 @@
<groupId>org.graalvm.js</groupId>
<artifactId>js</artifactId>
<version>${version.graalvm}</version>
+ <type>pom</type>
<scope>test</scope>
</dependency>
<dependency>
@@ -2431,6 +2432,9 @@
<version>${version.compiler.plugin}</version>
<configuration>
<encoding>UTF-8</encoding>
+ <!-- JDK 23+ no longer runs annotation processors found on the
classpath unless asked to.
+ Required by: drools-reliability-tests (ProtoStream schema),
drools-model-codegen (JMH BenchmarkList) -->
+ <proc>full</proc>
</configuration>
</plugin>
<plugin>
@@ -3540,5 +3544,15 @@
<version.archunit.maven.plugin>2.9.1</version.archunit.maven.plugin>
</properties>
</profile>
+ <profile>
+ <!-- arch-unit-maven-plugin 5.x requires Java 25 to run; 4.x bundles an
ArchUnit that cannot read the JDK 25 classes -->
+ <id>archunit-java21</id>
+ <activation>
+ <jdk>[21,25)</jdk>
+ </activation>
+ <properties>
+ <version.archunit.maven.plugin>4.0.2</version.archunit.maven.plugin>
+ </properties>
+ </profile>
</profiles>
</project>
diff --git a/kogito-build/kogito-build-no-bom-parent/pom.xml
b/kogito-build/kogito-build-no-bom-parent/pom.xml
index e82a5662ccb..2662c0fe3cf 100644
--- a/kogito-build/kogito-build-no-bom-parent/pom.xml
+++ b/kogito-build/kogito-build-no-bom-parent/pom.xml
@@ -80,7 +80,7 @@
<!-- plugin versions -->
<version.antapacheregexp>1.8.2</version.antapacheregexp>
<version.antrun.plugin>1.8</version.antrun.plugin>
- <version.archetype.plugin>3.4.0</version.archetype.plugin>
+ <version.archetype.plugin>3.4.1</version.archetype.plugin>
<version.asciidoctor.plugin>1.5.2.1</version.asciidoctor.plugin>
<version.build.helper.plugin>3.0.0</version.build.helper.plugin>
<version.clean.plugin>3.1.0</version.clean.plugin>
@@ -122,7 +122,6 @@
<!-- These are added as part of the migration from JBoss to Apache parent
pom.xml. They may be extracted to a KIE parent bom. -->
<version.maven-checkstyle>3.3.0</version.maven-checkstyle>
-
<version.com.societegenerale.commons>4.0.2</version.com.societegenerale.commons>
<version.io.github.download-maven-plugin>2.0.0</version.io.github.download-maven-plugin>
<!-- This dependency is used in exec-maven-plugin configuration to remove
timestamps from properties files generated by Quarkus. -->
@@ -142,7 +141,7 @@
<plugin>
<groupId>com.societegenerale.commons</groupId>
<artifactId>arch-unit-maven-plugin</artifactId>
- <version>${version.com.societegenerale.commons}</version>
+ <version>${version.archunit.maven.plugin}</version>
<configuration>
<skip>true</skip>
</configuration>
diff --git a/optaplanner-build/optaplanner-build-parent/pom.xml
b/optaplanner-build/optaplanner-build-parent/pom.xml
index b9f93887d32..a32ad36dd38 100644
--- a/optaplanner-build/optaplanner-build-parent/pom.xml
+++ b/optaplanner-build/optaplanner-build-parent/pom.xml
@@ -580,6 +580,24 @@
<quiet>true</quiet>
<doclint>none</doclint>
<legacyMode>true</legacyMode>
+ <!-- JDK 25 javadoc reports these JDK tags as unknown, which fails
the build with failOnWarnings. -->
+ <tags>
+ <tag>
+ <name>apiNote</name>
+ <placement>a</placement>
+ <head>API Note:</head>
+ </tag>
+ <tag>
+ <name>implSpec</name>
+ <placement>a</placement>
+ <head>Implementation Requirements:</head>
+ </tag>
+ <tag>
+ <name>implNote</name>
+ <placement>a</placement>
+ <head>Implementation Note:</head>
+ </tag>
+ </tags>
</configuration>
</plugin>
<plugin>
diff --git a/pom.xml b/pom.xml
index a8ce6fe4256..663cb0674c0 100644
--- a/pom.xml
+++ b/pom.xml
@@ -116,6 +116,8 @@
<project.build.outputTimestamp>2024-01-12T00:00:00Z</project.build.outputTimestamp>
<version.maven-remote-resources-plugin>3.3.0</version.maven-remote-resources-plugin>
<version.maven.artifact.plugin>3.6.1</version.maven.artifact.plugin>
+ <!-- Groovy bundled in older invoker plugin versions cannot read JDK 25
class files -->
+ <version.maven-invoker-plugin>3.10.1</version.maven-invoker-plugin>
</properties>
<!-- Block apache.snapshots inherited from org.apache:apache parent -->
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]