This is an automated email from the ASF dual-hosted git repository. jamesnetherton pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/camel-quarkus.git
commit 6361212ac3418fa19be1ea8ebc3f3fc166f67a9b Author: James Netherton <[email protected]> AuthorDate: Wed Dec 2 09:06:38 2026 +0000 Fix FHIR R5 native build failure FHIRPathEngine references classes from the optional org.fhir:ucum library, so initializing it at build time fails when ucum is not on the classpath. Initialize it at run time instead. Co-Authored-By: Claude Opus 5.5 <[email protected]> --- .../quarkus/component/fhir/deployment/r5/FhirR5Processor.java | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/extensions/fhir/deployment/src/main/java/org/apache/camel/quarkus/component/fhir/deployment/r5/FhirR5Processor.java b/extensions/fhir/deployment/src/main/java/org/apache/camel/quarkus/component/fhir/deployment/r5/FhirR5Processor.java index 1cca06665eb..602524faed4 100644 --- a/extensions/fhir/deployment/src/main/java/org/apache/camel/quarkus/component/fhir/deployment/r5/FhirR5Processor.java +++ b/extensions/fhir/deployment/src/main/java/org/apache/camel/quarkus/component/fhir/deployment/r5/FhirR5Processor.java @@ -27,6 +27,7 @@ import io.quarkus.deployment.annotations.ExecutionTime; import io.quarkus.deployment.annotations.Record; import io.quarkus.deployment.builditem.nativeimage.NativeImageResourceBuildItem; import io.quarkus.deployment.builditem.nativeimage.ReflectiveClassBuildItem; +import io.quarkus.deployment.builditem.nativeimage.RuntimeInitializedClassBuildItem; import jakarta.inject.Singleton; import org.apache.camel.quarkus.component.fhir.FhirContextRecorder; import org.apache.camel.quarkus.component.fhir.FhirFlags; @@ -55,6 +56,12 @@ public class FhirR5Processor { return new NativeImageResourceBuildItem(FHIR_VERSION_PROPERTIES); } + @BuildStep(onlyIf = FhirFlags.R5Enabled.class) + RuntimeInitializedClassBuildItem runtimeInitializedClasses() { + // Depends on the optional org.fhir:ucum library, which may be missing at build time + return new RuntimeInitializedClassBuildItem("org.hl7.fhir.r5.fhirpath.FHIRPathEngine"); + } + @BuildStep(onlyIf = FhirFlags.R5Enabled.class) @Record(ExecutionTime.STATIC_INIT) SyntheticBeanBuildItem recordFhirContext(
