From 6c9d66384677dae90fcb6be3490e688db5831bbb Mon Sep 17 00:00:00 2001 From: Georgios Andrianakis Date: Thu, 23 Mar 2023 16:28:48 +0200 Subject: [PATCH] Get rid of Stork related CDI warnings in REST Client usage --- .../quarkus/stork/deployment/SmallRyeStorkProcessor.java | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/extensions/smallrye-stork/deployment/src/main/java/io/quarkus/stork/deployment/SmallRyeStorkProcessor.java b/extensions/smallrye-stork/deployment/src/main/java/io/quarkus/stork/deployment/SmallRyeStorkProcessor.java index 4fea62e416a078..4dbdfbf5c30797 100644 --- a/extensions/smallrye-stork/deployment/src/main/java/io/quarkus/stork/deployment/SmallRyeStorkProcessor.java +++ b/extensions/smallrye-stork/deployment/src/main/java/io/quarkus/stork/deployment/SmallRyeStorkProcessor.java @@ -2,9 +2,11 @@ import static java.util.Arrays.asList; +import org.jboss.jandex.DotName; import org.jboss.logging.Logger; import io.quarkus.arc.deployment.SyntheticBeansRuntimeInitBuildItem; +import io.quarkus.arc.deployment.UnremovableBeanBuildItem; import io.quarkus.bootstrap.classloading.QuarkusClassLoader; import io.quarkus.builder.item.EmptyBuildItem; import io.quarkus.deployment.Capabilities; @@ -39,6 +41,13 @@ void registerServiceProviders(BuildProducer services, } } + @BuildStep + UnremovableBeanBuildItem unremoveableBeans() { + return UnremovableBeanBuildItem.beanTypes( + DotName.createSimple("io.smallrye.stork.servicediscovery.staticlist.StaticListServiceDiscoveryProvider"), + DotName.createSimple("io.smallrye.stork.loadbalancer.leastresponsetime.LeastResponseTimeLoadBalancerProvider")); + } + /** * This build step is the fix for https://github.com/quarkusio/quarkus/issues/24444. * Because Stork itself cannot depend on Quarkus, and we do not want to have extensions for all the service