Skip to content

Commit

Permalink
Get rid of Stork related CDI warnings in REST Client usage
Browse files Browse the repository at this point in the history
  • Loading branch information
geoand committed Mar 23, 2023
1 parent 29ae153 commit 6c9d663
Showing 1 changed file with 9 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -39,6 +41,13 @@ void registerServiceProviders(BuildProducer<ServiceProviderBuildItem> 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
Expand Down

0 comments on commit 6c9d663

Please sign in to comment.