From bf195c65c7c0f229f476e16423c384ecbc451bb3 Mon Sep 17 00:00:00 2001 From: lgdd Date: Wed, 31 Jul 2024 18:55:49 +0200 Subject: [PATCH] feat: add more info about java 17 & 21 --- internal/cmd/diagnose/diagnose.go | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/internal/cmd/diagnose/diagnose.go b/internal/cmd/diagnose/diagnose.go index 8edc1b0..54c43c4 100644 --- a/internal/cmd/diagnose/diagnose.go +++ b/internal/cmd/diagnose/diagnose.go @@ -44,20 +44,31 @@ func verifyJava() bool { if err != nil { logger.PrintError("[✗] ") - logger.Print("Liferay requires Java 8 or 11.\n") + logger.Print("Liferay requires Java 8, 11, 17 or 21.\n") return false } if major == "8" || major == "11" { + logger.PrintWarn("[!] ") + logger.Printf("Java intalled (%s)\n", strings.Split(version, "\n")[0]) + if major == "8" { + logger.PrintlnBold("\t! Liferay DXP 2024.Q1 and Liferay Portal 7.4 GA112 will be the last version to support Java 8.") + } + if major == "11" { + logger.PrintlnBold("\t! Liferay DXP DXP 2024.Q2 and Liferay Portal 7.4 GA120 will be the last version to support Java 11.") + } + } else if major == "17" || major == "21" { logger.PrintSuccess("[✓] ") logger.Printf("Java intalled (%s)\n", strings.Split(version, "\n")[0]) - logger.PrintlnBold("\t• Make sure that your Java edition is a Java Technical Compatibility Kit (TCK) compliant build.") - logger.PrintlnBold("\t• JDK compatibility is for runtime and project compile time. DXP source compile is compatible with JDK 8 only.") + logger.PrintlnBold("\t• Liferay DXP 2024.Q2+ and Liferay Portal CE 7.4 GA120+ are fully certified to run on both Java JDK 17 and 21.") + } else { logger.PrintWarn("[!] ") - logger.Printf("Java (%s)\n", strings.Split(version, "\n")[0]) + logger.Printf("Java installed (%s)\n", strings.Split(version, "\n")[0]) logger.PrintlnBold("\t! Liferay supports Java 8 and 11 only.") } + logger.PrintlnBold("\t• Make sure that your Java edition is a Java Technical Compatibility Kit (TCK) compliant build.") + logger.PrintlnBold("\t• JDK compatibility is for runtime and project compile time.") return true }