@@ -159,6 +159,7 @@ public void start() {
159159 LOG .debug ("Plugin Health Score Url: {}" , config .getPluginHealthScore ());
160160 LOG .debug ("Installation Stats Url: {}" , config .getPluginStatsInstallations ());
161161 LOG .debug ("Cache Path: {}" , config .getCachePath ());
162+ LOG .debug ("Java Version: {}" , getJavaVersion ());
162163 LOG .debug ("Maven Home: {}" , config .getMavenHome ());
163164 LOG .debug ("Maven Local Repository: {}" , config .getMavenLocalRepo ());
164165 LOG .debug ("Dry Run: {}" , config .isDryRun ());
@@ -237,7 +238,7 @@ private void process(Plugin plugin) {
237238 plugin .checkoutBranch (ghService );
238239
239240 // Minimum JDK to run openrewrite
240- plugin .withJDK (JDK .JAVA_17 );
241+ plugin .withJDK (JDK .JAVA_21 );
241242
242243 // Collect metadata and move metadata from the target directory of the plugin to the common cache
243244 if (!plugin .hasMetadata () || config .isFetchMetadataOnly ()) {
@@ -348,7 +349,7 @@ private void process(Plugin plugin) {
348349
349350 // Recollect metadata after modernization
350351 if (!config .isFetchMetadataOnly ()) {
351- plugin .withJDK (JDK .JAVA_17 );
352+ plugin .withJDK (JDK .JAVA_21 );
352353 plugin .clean (mavenInvoker );
353354 collectMetadata (plugin , false );
354355 LOG .debug (
@@ -416,7 +417,7 @@ private void process(Plugin plugin) {
416417 */
417418 private void collectMetadata (Plugin plugin , boolean retryAfterFirstCompile ) {
418419 LOG .trace ("Collecting metadata for plugin {}... Please be patient" , plugin .getName ());
419- plugin .withJDK (JDK .JAVA_17 );
420+ plugin .withJDK (JDK .JAVA_21 );
420421 try {
421422 plugin .collectMetadata (mavenInvoker );
422423 if (plugin .hasErrors ()) {
@@ -435,7 +436,7 @@ private void collectMetadata(Plugin plugin, boolean retryAfterFirstCompile) {
435436 plugin .getName ());
436437 plugin .raiseLastError ();
437438 }
438- plugin .withJDK (JDK .JAVA_17 );
439+ plugin .withJDK (JDK .JAVA_21 );
439440 plugin .collectMetadata (mavenInvoker );
440441 } else {
441442 LOG .info ("Failed to collect metadata for plugin {}. Not retrying." , plugin .getName ());
@@ -539,7 +540,7 @@ private JDK verifyPlugin(Plugin plugin) {
539540 // Determine the JDK
540541 JDK jdk ;
541542 if (metadata .getJdks () == null || metadata .getJdks ().isEmpty ()) {
542- jdk = JDK .JAVA_17 ;
543+ jdk = JDK .JAVA_21 ;
543544 LOG .info (
544545 "No JDKs found in metadata for plugin {}. Using same JDK as rewrite for verification" ,
545546 plugin .getName ());
0 commit comments