From bfd704d2605edd1a4b20512aa518a0f4ed6a310d Mon Sep 17 00:00:00 2001 From: Georgios Andrianakis Date: Fri, 27 Sep 2024 10:11:00 +0300 Subject: [PATCH 1/2] Truffle no longer needs the java.class.path sysprop Relates to: #43410 --- .../deployment/steps/ClassPathSystemPropBuildStep.java | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/core/deployment/src/main/java/io/quarkus/deployment/steps/ClassPathSystemPropBuildStep.java b/core/deployment/src/main/java/io/quarkus/deployment/steps/ClassPathSystemPropBuildStep.java index dccb19214baec..ef13a10c2d896 100644 --- a/core/deployment/src/main/java/io/quarkus/deployment/steps/ClassPathSystemPropBuildStep.java +++ b/core/deployment/src/main/java/io/quarkus/deployment/steps/ClassPathSystemPropBuildStep.java @@ -6,7 +6,6 @@ import java.util.List; import java.util.stream.Stream; -import io.quarkus.deployment.annotations.BuildProducer; import io.quarkus.deployment.annotations.BuildStep; import io.quarkus.deployment.annotations.ExecutionTime; import io.quarkus.deployment.annotations.Record; @@ -17,15 +16,6 @@ public class ClassPathSystemPropBuildStep { - @BuildStep - public void produce(BuildProducer producer, CurateOutcomeBuildItem curateOutcome) { - boolean truffleUsed = curateOutcome.getApplicationModel().getDependencies().stream() - .anyMatch(d -> d.getGroupId().equals("org.graalvm.polyglot")); - if (truffleUsed) { - producer.produce(new SetClassPathSystemPropBuildItem()); - } - } - @BuildStep @Record(ExecutionTime.STATIC_INIT) public void set(List setCPItems, From 401ef73970e62ae1da2ebfd80100835a631e70ee Mon Sep 17 00:00:00 2001 From: Georgios Andrianakis Date: Fri, 27 Sep 2024 11:51:27 +0300 Subject: [PATCH 2/2] Deprecate SetClassPathSystemPropBuildItem --- .../deployment/builditem/SetClassPathSystemPropBuildItem.java | 3 +++ .../quarkus/deployment/steps/ClassPathSystemPropBuildStep.java | 1 + 2 files changed, 4 insertions(+) diff --git a/core/deployment/src/main/java/io/quarkus/deployment/builditem/SetClassPathSystemPropBuildItem.java b/core/deployment/src/main/java/io/quarkus/deployment/builditem/SetClassPathSystemPropBuildItem.java index 7461e22f7a73f..e22770f0fc4ee 100644 --- a/core/deployment/src/main/java/io/quarkus/deployment/builditem/SetClassPathSystemPropBuildItem.java +++ b/core/deployment/src/main/java/io/quarkus/deployment/builditem/SetClassPathSystemPropBuildItem.java @@ -7,6 +7,9 @@ * This system property is used in rare by libraries (Truffle for example) to create their own ClassLoaders. * The value of the system property is simply best effort, as there is no way to faithfully represent * the Quarkus ClassLoader hierarchies in a system property value. + * + * @deprecated This was initially added to support Truffle, but it is no longer needed so the build item should not be used */ +@Deprecated(forRemoval = true) public final class SetClassPathSystemPropBuildItem extends MultiBuildItem { } diff --git a/core/deployment/src/main/java/io/quarkus/deployment/steps/ClassPathSystemPropBuildStep.java b/core/deployment/src/main/java/io/quarkus/deployment/steps/ClassPathSystemPropBuildStep.java index ef13a10c2d896..d34385c4ac233 100644 --- a/core/deployment/src/main/java/io/quarkus/deployment/steps/ClassPathSystemPropBuildStep.java +++ b/core/deployment/src/main/java/io/quarkus/deployment/steps/ClassPathSystemPropBuildStep.java @@ -14,6 +14,7 @@ import io.quarkus.maven.dependency.ResolvedDependency; import io.quarkus.runtime.ClassPathSystemPropertyRecorder; +@SuppressWarnings("removal") public class ClassPathSystemPropBuildStep { @BuildStep