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 25, 2023
1 parent d341764 commit 7d68700
Showing 1 changed file with 11 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,13 @@

import static java.util.Arrays.asList;

import io.smallrye.stork.spi.LoadBalancerProvider;
import io.smallrye.stork.spi.ServiceDiscoveryProvider;
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 +43,13 @@ void registerServiceProviders(BuildProducer<ServiceProviderBuildItem> services,
}
}

@BuildStep
UnremovableBeanBuildItem unremoveableBeans() {
return UnremovableBeanBuildItem.beanTypes(
DotName.createSimple(ServiceDiscoveryProvider.class),
DotName.createSimple(LoadBalancerProvider.class));
}

/**
* 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 7d68700

Please sign in to comment.