Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Register provider accessed by SmallRyeHealthReporter #44649

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading