From 9838aae28f06a6d738f5bad1549fc230e4389d1f 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..dbd97d5d072d2 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<>(6)); } 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,