Skip to content

chore(ci): add Java 25 LTS to CI build matrix - #8015

Open
ash-thakur-rh wants to merge 9 commits into
fabric8io:mainfrom
ash-thakur-rh:issue-7427
Open

chore(ci): add Java 25 LTS to CI build matrix#8015
ash-thakur-rh wants to merge 9 commits into
fabric8io:mainfrom
ash-thakur-rh:issue-7427

Conversation

@ash-thakur-rh

@ash-thakur-rh ash-thakur-rh commented Jul 24, 2026

Copy link
Copy Markdown
Member

Summary

Add full Java 25 LTS build support:

  • CI matrix: add Java 25 to build.yml and windows-build.yml alongside existing LTS versions
  • Annotation processing (JDK 23+ fix): JDK 23+ defaults to -proc:none, silently disabling classpath-based annotation processor discovery. This broke both Lombok (@Data getters/setters) and Sundrio (@Buildable Builder/Fluent classes) across multiple modules. Fixed by:
    • Adding explicit Lombok annotationProcessorPaths to the root pom pluginManagement, so all modules get Lombok processing on JDK 23+
    • Committing Sundrio-generated Builder/Fluent classes as source in kubernetes-client-api and openshift-client-api (same pattern as kubernetes-model-generator), with a generate profile for regeneration
    • Adding Sundrio to annotationProcessorPaths in crd-generator/apt which explicitly names BuildableProcessor
  • Spock upgrade: upgrade to Spock 2.4-groovy-4.0 for Java 25 compatibility
  • Makefile: make generate-model now also regenerates builders for kubernetes-client-api and openshift-client-api

Fixes #7427

Test plan

  • Verify Java 25 Linux ARM build passes in CI
  • Verify Java 25 Windows build passes in CI
  • Verify existing Java 11, 17, 21 builds are unaffected
  • Verify make quickly succeeds with JDK 25
  • Verify make generate-model regenerates builders for kubernetes-client-api and openshift-client-api (requires JDK ≤ 21)

Add Java 25 to the build matrix in build.yml and windows-build.yml
to ensure compatibility with the latest LTS release. Also add
fail-fast: false to windows-build.yml for consistency with build.yml
now that the matrix has multiple entries.

Fixes fabric8io#7427
Spock 2.4-M6-groovy-4.0 pulls in Groovy 4.0.26, whose bundled ASM
does not support Java 25 class files (major version 69). The stable
Spock 2.4-groovy-4.0 release pulls in Groovy 4.0.29 which includes
ASM with Java 25 support.
Signed-off-by: Ashish Thakur <ashishth@redhat.com>
Signed-off-by: Ashish Thakur <ashishth@redhat.com>
Signed-off-by: Ashish Thakur <ashishth@redhat.com>
Signed-off-by: Ashish Thakur <ashishth@redhat.com>
<configuration>
<source>1.8</source>
<target>1.8</target>
<proc>full</proc>

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you've mentioned (internally) that this is required by Lombok and JDK23+. Can we add a comment on top of this so we are aware why this was added in case we eventually remove Lombok?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done!

Comment on lines +172 to +202
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
<executions>
<execution>
<id>add-generated-builders-source</id>
<phase>generate-sources</phase>
<goals>
<goal>add-source</goal>
</goals>
<configuration>
<sources>
<source>${sundrio.generatedBuildersDirectory}</source>
</sources>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<annotationProcessorPaths>
<path>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<version>${lombok.version}</version>
</path>
</annotationProcessorPaths>
</configuration>
</plugin>

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We might not actually need these builders.
Let's make sure that the builders are public API and people downstream are using them.
AFAIR these are just internal wirings to make ConfigBuilder work.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These builders are not public API, no downstream consumer imports or references the classes directly. However, all of them are required for compilation:

  • SundrioConfigFluent / SundrioOpenShiftConfigFluent: superclasses of ConfigFluent and OpenShiftConfigFluent, providing the fluent setter methods that the public builders
    inherit.
  • SundrioConfigBuilder: used internally by ConfigBuilder.toSundrioConfig() and the Config constructor.
  • SundrioOpenShiftConfigBuilder: extends SundrioOpenShiftConfigFluent (Sundrio always emits both as a unit for @buildable).
  • RequestConfigFluent, LeaderElectionConfigFluent: superclasses that RequestConfigBuilder and LeaderElectionConfigBuilder extend.
  • EditableRunConfig: returned by RunConfigBuilder.build().
  • CustomResourceFluent: extended by Tekton's generated CustomResourceBuilder and ResourcesFluent.

In short: they are internal wiring, but none can be removed, they are compile-time dependencies of either public API builders or downstream extension modules.

Signed-off-by: Ashish Thakur <ashishth@redhat.com>
Signed-off-by: Ashish Thakur <ashishth@redhat.com>
@ash-thakur-rh
ash-thakur-rh marked this pull request as ready for review September 1, 2026 09:24
Comment thread java-generator/it/src/it/cert-manager/pom.xml
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add Java 25 LTS to CI build matrix

3 participants