From 212f0dc240d4619da5616cd7269096a7bde3b3e7 Mon Sep 17 00:00:00 2001 From: Clement Escoffier Date: Mon, 28 Feb 2022 11:52:17 +0100 Subject: [PATCH] Deprecate the quarkus-resteasy-mutiny extension and explain why in a warning --- .../mutiny/deployment/ResteasyMutinyProcessor.java | 11 +++++++++++ .../main/resources/META-INF/quarkus-extension.yaml | 2 +- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/extensions/resteasy-classic/resteasy-mutiny/deployment/src/main/java/io/quarkus/resteasy/mutiny/deployment/ResteasyMutinyProcessor.java b/extensions/resteasy-classic/resteasy-mutiny/deployment/src/main/java/io/quarkus/resteasy/mutiny/deployment/ResteasyMutinyProcessor.java index d5eb331ef64e1..abd613640a2ea 100644 --- a/extensions/resteasy-classic/resteasy-mutiny/deployment/src/main/java/io/quarkus/resteasy/mutiny/deployment/ResteasyMutinyProcessor.java +++ b/extensions/resteasy-classic/resteasy-mutiny/deployment/src/main/java/io/quarkus/resteasy/mutiny/deployment/ResteasyMutinyProcessor.java @@ -1,5 +1,7 @@ package io.quarkus.resteasy.mutiny.deployment; +import org.jboss.logging.Logger; + import io.quarkus.deployment.Feature; import io.quarkus.deployment.annotations.BuildStep; import io.quarkus.deployment.builditem.FeatureBuildItem; @@ -8,7 +10,16 @@ public class ResteasyMutinyProcessor { @BuildStep FeatureBuildItem feature() { + warn(); return new FeatureBuildItem(Feature.RESTEASY_MUTINY); } + void warn() { + Logger.getLogger(ResteasyMutinyProcessor.class).warn("The quarkus-resteasy-mutiny extension is deprecated. " + + "Switch to RESTEasy Reactive instead.\n" + + "This extension adds support for Uni and Multi to RESTEasy 'classic', without using the reactive execution model," + + + " as RESTEasy classic does not use it. To properly integrate Mutiny and RESTEasy, use RESTEasy Reactive. See https://quarkus.io/guides/getting-started-reactive for detailed instructions"); + } + } diff --git a/extensions/resteasy-classic/resteasy-mutiny/runtime/src/main/resources/META-INF/quarkus-extension.yaml b/extensions/resteasy-classic/resteasy-mutiny/runtime/src/main/resources/META-INF/quarkus-extension.yaml index 2b9bf99156012..c4321424d05cb 100644 --- a/extensions/resteasy-classic/resteasy-mutiny/runtime/src/main/resources/META-INF/quarkus-extension.yaml +++ b/extensions/resteasy-classic/resteasy-mutiny/runtime/src/main/resources/META-INF/quarkus-extension.yaml @@ -10,4 +10,4 @@ metadata: categories: - "web" - "reactive" - status: "preview" \ No newline at end of file + status: "deprecated" \ No newline at end of file