From f1476be417fd07361c83953da24be8d77ce2f416 Mon Sep 17 00:00:00 2001 From: Foivos Zakkak Date: Tue, 12 Sep 2023 13:32:37 +0300 Subject: [PATCH] Exclude new GraalVM dependencies that are part of GraalVM/Mandrel https://github.com/oracle/graal/pull/7171 splits graal-sdk in 4 new modules/artifacts. As a result starting with GraalVM for JDK 21 (23.1) we need to remove those as well. Note that it's OK to have them marked for removal even when using GraalVM < 23.1 despite them not actually being present. Closes https://github.com/quarkusio/quarkus/issues/35872 --- .../io/quarkus/deployment/pkg/steps/JarResultBuildStep.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/core/deployment/src/main/java/io/quarkus/deployment/pkg/steps/JarResultBuildStep.java b/core/deployment/src/main/java/io/quarkus/deployment/pkg/steps/JarResultBuildStep.java index 1f274c63e2ad7..ad31f3ed8d66e 100644 --- a/core/deployment/src/main/java/io/quarkus/deployment/pkg/steps/JarResultBuildStep.java +++ b/core/deployment/src/main/java/io/quarkus/deployment/pkg/steps/JarResultBuildStep.java @@ -1003,11 +1003,15 @@ private NativeImageSourceJarBuildItem buildNativeImageThinJar(CurateOutcomeBuild // Remove svm and graal-sdk artifacts as they are provided by GraalVM itself if (classLoadingConfig.removedArtifacts.isEmpty()) { - classLoadingConfig.removedArtifacts = Optional.of(new ArrayList<>(2)); + classLoadingConfig.removedArtifacts = Optional.of(new ArrayList<>(5)); } List removedArtifacts = classLoadingConfig.removedArtifacts.get(); removedArtifacts.add("org.graalvm.nativeimage:svm"); removedArtifacts.add("org.graalvm.sdk:graal-sdk"); + removedArtifacts.add("org.graalvm.sdk:nativeimage"); + removedArtifacts.add("org.graalvm.sdk:word"); + removedArtifacts.add("org.graalvm.sdk:collections"); + removedArtifacts.add("org.graalvm.polyglot:polyglot"); doLegacyThinJarGeneration(curateOutcomeBuildItem, outputTargetBuildItem, transformedClasses, applicationArchivesBuildItem, applicationInfo, packageConfig, generatedResources, libDir, allClasses,