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 25, 2024
1 parent 9361824 commit c7a9032
Showing 1 changed file with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,20 @@
import io.quarkus.deployment.annotations.BuildProducer;
import io.quarkus.deployment.annotations.BuildStep;
import io.quarkus.deployment.builditem.FeatureBuildItem;
import io.quarkus.deployment.builditem.nativeimage.NativeImageResourceBundleBuildItem;
import io.quarkus.deployment.builditem.nativeimage.NativeImageResourceBuildItem;
import io.quarkus.deployment.builditem.nativeimage.ReflectiveClassBuildItem;

public class JsonpProcessor {

@BuildStep
void build(BuildProducer<FeatureBuildItem> feature,
BuildProducer<ReflectiveClassBuildItem> reflectiveClass,
BuildProducer<NativeImageResourceBundleBuildItem> resourceBundle) {
BuildProducer<NativeImageResourceBuildItem> serviceProviders) {
reflectiveClass.produce(
ReflectiveClassBuildItem.builder(JsonProviderImpl.class.getName()).build());

// 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"));
}

}

0 comments on commit c7a9032

Please sign in to comment.