Good point Claus! I'll add an enforcer plugin with requiredJavaVersion 25 as minimum in the release profile.
Thanks Il giorno mer 15 apr 2026 alle ore 19:42 Claus Ibsen <[email protected]> ha scritto: > Hi > > Can we make some enforce rule when you do a release (release profile) that > requires using Java 25. > As we should ensure from Camel 4.20 onwards that we have built it with Java > 25. > > But when we code on Camel then IHMO its okay that its just 21 which is the > primary java version we use. > > > > On Tue, Apr 14, 2026 at 1:49 PM Federico Mariani < > [email protected]> wrote: > > > Hi, > > > > I'd like to propose enforcing JDK 21 as the minimum build JDK for Apache > > Camel (both main and camel-4.18.x), while keeping the bytecode target at > > Java 17. This means that anyone wanting to build Camel, will need to have > > JDK21 (or 25) on their machine. > > > > camel-util uses multi-release JARs to provide virtual thread support. The > > java-21-sources Maven profile activates only when the build JDK is 21+ > > (<jdk>[21,)</jdk>). If Camel is built with JDK 17, the virtual thread > > classes under META-INF/versions/21/ are silently omitted, users running > on > > JDK 21 would get JARs that never use virtual threads, with no warning. > > > > Today this works because the release was built with JDK 21 > (Build-Jdk-Spec: > > 21 in the 4.19.0 MANIFEST), but Jenkinsfile.deploy defaults to > > jdk_17_latest (daily SNAPSHOT were released without VirtualThread > support) > > and nothing enforces the build JDK. > > > > Moreover, main has a java-25-sources profile (<jdk>[25,)</jdk>) for > > ScopedValue support. > > To fully compile everything on main, JDK 25 would be needed. However, I > > think that requiring JDK 25 to build Camel may cause friction for > > contributors and users building from source. For now I'm proposing JDK 21 > > as the minimum (which covers virtual threads), but does anyone have a > > strong opinion about requiring JDK 25 instead to include the ScopedValue? > > > > main draft PR <https://github.com/apache/camel/pull/22608> > > camel-4.18.x draft PR <https://github.com/apache/camel/pull/22609> > > > > Regards, > > Federico > > > > > -- > Claus Ibsen >
