diff --git a/core/deployment/src/main/java/io/quarkus/deployment/pkg/builditem/CompiledJavaVersionBuildItem.java b/core/deployment/src/main/java/io/quarkus/deployment/pkg/builditem/CompiledJavaVersionBuildItem.java index ee2ab28b42d4d..33d544f1fadd4 100644 --- a/core/deployment/src/main/java/io/quarkus/deployment/pkg/builditem/CompiledJavaVersionBuildItem.java +++ b/core/deployment/src/main/java/io/quarkus/deployment/pkg/builditem/CompiledJavaVersionBuildItem.java @@ -24,10 +24,13 @@ public JavaVersion getJavaVersion() { public interface JavaVersion { + @Deprecated(forRemoval = true) Status isExactlyJava11(); + @Deprecated(forRemoval = true) Status isJava11OrHigher(); + @Deprecated(forRemoval = true) Status isJava17OrHigher(); Status isJava21OrHigher(); diff --git a/core/deployment/src/main/java/io/quarkus/deployment/pkg/steps/AppCDSBuildStep.java b/core/deployment/src/main/java/io/quarkus/deployment/pkg/steps/AppCDSBuildStep.java index c9ca54d8d6262..87267e781a429 100644 --- a/core/deployment/src/main/java/io/quarkus/deployment/pkg/steps/AppCDSBuildStep.java +++ b/core/deployment/src/main/java/io/quarkus/deployment/pkg/steps/AppCDSBuildStep.java @@ -75,28 +75,10 @@ public void build(Optional appCDsRequested, } } - boolean useArchiveClassesAtExit = compiledJavaVersion.getJavaVersion() - .isJava17OrHigher() == CompiledJavaVersionBuildItem.JavaVersion.Status.TRUE; - - Path classesListPath = null; - if (!useArchiveClassesAtExit) { - classesListPath = createClassesList(jarResult, outputTarget, javaBinPath, containerImage, - appCDsRequested.get().getAppCDSDir(), packageConfig.isFastJar()); - if (classesListPath == null) { - return; - } - log.debugf("'%s' successfully created.", CLASSES_LIST_FILE_NAME); - } - Path appCDSPath; log.info("Launching AppCDS creation process."); - if (useArchiveClassesAtExit) { - appCDSPath = createAppCDSFromExit(jarResult, outputTarget, javaBinPath, containerImage, - packageConfig.isFastJar()); - } else { - appCDSPath = createAppCDSFromClassesList(jarResult, outputTarget, javaBinPath, containerImage, classesListPath, - packageConfig.isFastJar()); - } + appCDSPath = createAppCDSFromExit(jarResult, outputTarget, javaBinPath, containerImage, + packageConfig.isFastJar()); if (appCDSPath == null) { log.warn("Unable to create AppCDS."); diff --git a/extensions/container-image/container-image-docker/deployment/src/main/java/io/quarkus/container/image/docker/deployment/DockerProcessor.java b/extensions/container-image/container-image-docker/deployment/src/main/java/io/quarkus/container/image/docker/deployment/DockerProcessor.java index 959b6b2618ee9..bc8ca177fa232 100644 --- a/extensions/container-image/container-image-docker/deployment/src/main/java/io/quarkus/container/image/docker/deployment/DockerProcessor.java +++ b/extensions/container-image/container-image-docker/deployment/src/main/java/io/quarkus/container/image/docker/deployment/DockerProcessor.java @@ -87,8 +87,7 @@ public void dockerBuildFromJar(DockerConfig dockerConfig, Optional dockerFileBaseInformation = dockerFileBaseInformationProvider .determine(dockerfilePaths.getDockerfilePath()); - if ((compiledJavaVersion.getJavaVersion().isJava17OrHigher() == CompiledJavaVersionBuildItem.JavaVersion.Status.TRUE) - && dockerFileBaseInformation.isPresent() && (dockerFileBaseInformation.get().getJavaVersion() < 17)) { + if (dockerFileBaseInformation.isPresent() && (dockerFileBaseInformation.get().getJavaVersion() < 17)) { throw new IllegalStateException( String.format( "The project is built with Java 17 or higher, but the selected Dockerfile (%s) is using a lower Java version in the base image (%s). Please ensure you are using the proper base image in the Dockerfile.",