diff --git a/extensions/jaxp/deployment/src/main/java/io/quarkus/jaxp/deployment/JaxpProcessor.java b/extensions/jaxp/deployment/src/main/java/io/quarkus/jaxp/deployment/JaxpProcessor.java index 152b93015fef6..883b1e8ac0c3b 100644 --- a/extensions/jaxp/deployment/src/main/java/io/quarkus/jaxp/deployment/JaxpProcessor.java +++ b/extensions/jaxp/deployment/src/main/java/io/quarkus/jaxp/deployment/JaxpProcessor.java @@ -1,5 +1,6 @@ package io.quarkus.jaxp.deployment; +import java.util.function.Consumer; import java.util.stream.Stream; import io.quarkus.deployment.annotations.BuildProducer; @@ -30,6 +31,8 @@ void reflectiveClasses(BuildProducer reflectiveClass) @BuildStep void resourceBundles(BuildProducer resourceBundle) { + Consumer resourceBundleItemProducer = bundleName -> resourceBundle + .produce(new NativeImageResourceBundleBuildItem(bundleName, "java.xml")); Stream.of( "com.sun.org.apache.xml.internal.serializer.utils.SerializerMessages", "com.sun.org.apache.xml.internal.res.XMLErrorResources", @@ -37,8 +40,7 @@ void resourceBundles(BuildProducer resourceB "com.sun.org.apache.xerces.internal.impl.msg.XMLMessages", "com.sun.org.apache.xerces.internal.impl.msg.XMLSchemaMessages", "com.sun.org.apache.xerces.internal.impl.xpath.regex.message") - .map(NativeImageResourceBundleBuildItem::new) - .forEach(resourceBundle::produce); + .forEach(resourceBundleItemProducer); } @BuildStep