Skip to content

Commit

Permalink
Register provider accessed by SmallRyeHealthReporter
Browse files Browse the repository at this point in the history
`META-INF/services/jakarta.json.spi.JsonProvider` is accessed as a
resource by SmallRyeHealthReporter.
  • Loading branch information
zakkak committed Nov 21, 2024
1 parent 296ffde commit 57095af
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@
import io.quarkus.deployment.builditem.RunTimeConfigurationDefaultBuildItem;
import io.quarkus.deployment.builditem.ShutdownContextBuildItem;
import io.quarkus.deployment.builditem.ShutdownListenerBuildItem;
import io.quarkus.deployment.builditem.nativeimage.NativeImageResourceBuildItem;
import io.quarkus.deployment.shutdown.ShutdownBuildTimeConfig;
import io.quarkus.deployment.util.ServiceUtil;
import io.quarkus.kubernetes.spi.KubernetesHealthLivenessPathBuildItem;
Expand Down Expand Up @@ -162,7 +163,8 @@ void healthCheck(BuildProducer<AdditionalBeanBuildItem> buildItemBuildProducer,
void build(SmallRyeHealthRecorder recorder,
BuildProducer<ExcludedTypeBuildItem> excludedTypes,
BuildProducer<AdditionalBeanBuildItem> additionalBean,
BuildProducer<BeanDefiningAnnotationBuildItem> beanDefiningAnnotation)
BuildProducer<BeanDefiningAnnotationBuildItem> beanDefiningAnnotation,
BuildProducer<NativeImageResourceBuildItem> serviceProviders)
throws IOException, ClassNotFoundException {

// Discover the beans annotated with @Health, @Liveness, @Readiness, @Startup, @HealthGroup,
Expand All @@ -179,6 +181,9 @@ void build(SmallRyeHealthRecorder recorder,
excludedTypes.produce(new ExcludedTypeBuildItem(AsyncHealthCheckFactory.class.getName()));
additionalBean.produce(new AdditionalBeanBuildItem(SmallRyeHealthReporter.class));

// Register META-INF/services/jakarta.json.spi.JsonProvider as a resource, accessed by SmallRyeHealthReporter
serviceProviders.produce(new NativeImageResourceBuildItem("META-INF/services/jakarta.json.spi.JsonProvider"));

// Make ArC discover @HealthGroup as a qualifier
additionalBean.produce(new AdditionalBeanBuildItem(HealthGroup.class));

Expand Down

0 comments on commit 57095af

Please sign in to comment.