diff --git a/core/src/main/java/jenkins/monitor/JavaVersionRecommendationAdminMonitor.java b/core/src/main/java/jenkins/monitor/JavaVersionRecommendationAdminMonitor.java index 86093a634617..4b3642bb059c 100644 --- a/core/src/main/java/jenkins/monitor/JavaVersionRecommendationAdminMonitor.java +++ b/core/src/main/java/jenkins/monitor/JavaVersionRecommendationAdminMonitor.java @@ -78,7 +78,16 @@ public class JavaVersionRecommendationAdminMonitor extends AdministrativeMonitor static { NavigableMap supportedVersions = new TreeMap<>(); - supportedVersions.put(11, LocalDate.of(2024, 9, 30)); // Temurin: 2024-10-31 + // Adjust Java 11 end of life date for weekly and LTS + if (Jenkins.VERSION.split("[.]").length > 2) { + // LTS will require Java 17 or newer beginning 30 Oct 2024 + // https://groups.google.com/g/jenkinsci-dev/c/gsXAqOQQEPc/m/VT9IBYdmAQAJ + supportedVersions.put(11, LocalDate.of(2024, 10, 30)); // Temurin: 2024-10-31 + } else { + // Weekly will require Java 17 or newer beginning 18 Jun 2024 + // https://groups.google.com/g/jenkinsci-dev/c/gsXAqOQQEPc/m/4fn4Un1iAwAJ + supportedVersions.put(11, LocalDate.of(2024, 6, 18)); // Temurin: 2024-10-31 + } supportedVersions.put(17, LocalDate.of(2026, 3, 31)); // Temurin: 2027-10-31 supportedVersions.put(21, LocalDate.of(2027, 9, 30)); // Temurin: 2029-09-30 SUPPORTED_JAVA_VERSIONS = Collections.unmodifiableNavigableMap(supportedVersions);