You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by ji...@apache.org on 2022/10/31 07:54:34 UTC

[camel-quarkus] 01/02: Fix #4216 to make xml integration tests working in native build (#4217)

This is an automated email from the ASF dual-hosted git repository.

jiriondrusek pushed a commit to branch camel-main
in repository https://gitbox.apache.org/repos/asf/camel-quarkus.git

commit 7bbf78ac7af9d99a1a20e90d0470b85265a4718a
Author: Zheng Feng <zh...@gmail.com>
AuthorDate: Fri Oct 28 00:18:16 2022 +0800

    Fix #4216 to make xml integration tests working in native build (#4217)
---
 .../camel/quarkus/component/xslt/deployment/XsltProcessor.java     | 7 +++++++
 .../org/apache/camel/quarkus/component/xml/it/XmlRouteBuilder.java | 1 +
 2 files changed, 8 insertions(+)

diff --git a/extensions/xslt/deployment/src/main/java/org/apache/camel/quarkus/component/xslt/deployment/XsltProcessor.java b/extensions/xslt/deployment/src/main/java/org/apache/camel/quarkus/component/xslt/deployment/XsltProcessor.java
index b0ef7fe3b8..02afa701e4 100644
--- a/extensions/xslt/deployment/src/main/java/org/apache/camel/quarkus/component/xslt/deployment/XsltProcessor.java
+++ b/extensions/xslt/deployment/src/main/java/org/apache/camel/quarkus/component/xslt/deployment/XsltProcessor.java
@@ -36,6 +36,7 @@ import io.quarkus.deployment.annotations.BuildStep;
 import io.quarkus.deployment.annotations.ExecutionTime;
 import io.quarkus.deployment.annotations.Record;
 import io.quarkus.deployment.builditem.GeneratedClassBuildItem;
+import io.quarkus.deployment.builditem.nativeimage.RuntimeInitializedClassBuildItem;
 import io.quarkus.runtime.RuntimeValue;
 import org.apache.camel.component.xslt.XsltComponent;
 import org.apache.camel.quarkus.component.xslt.CamelXsltConfig;
@@ -149,4 +150,10 @@ class XsltProcessor {
         }
     }
 
+    //It should be removed with fixing https://github.com/apache/camel-quarkus/issues/1615
+    @BuildStep
+    RuntimeInitializedClassBuildItem runtimeInit() {
+        return new RuntimeInitializedClassBuildItem("org.apache.hc.client5.http.impl.auth.NTLMEngineImpl");
+    }
+
 }
diff --git a/integration-tests/xml/src/main/java/org/apache/camel/quarkus/component/xml/it/XmlRouteBuilder.java b/integration-tests/xml/src/main/java/org/apache/camel/quarkus/component/xml/it/XmlRouteBuilder.java
index 160efcc5cb..90c8b29cbe 100644
--- a/integration-tests/xml/src/main/java/org/apache/camel/quarkus/component/xml/it/XmlRouteBuilder.java
+++ b/integration-tests/xml/src/main/java/org/apache/camel/quarkus/component/xml/it/XmlRouteBuilder.java
@@ -29,6 +29,7 @@ import org.apache.camel.support.builder.Namespaces;
         "net.sf.saxon.functions.String_1",
         "net.sf.saxon.functions.Tokenize_1",
         "net.sf.saxon.functions.StringJoin",
+        "org.xmlresolver.loaders.XmlLoader",
         "org.apache.camel.component.xslt.saxon.XsltSaxonBuilder" })
 public class XmlRouteBuilder extends RouteBuilder {
     public static final String DIRECT_HTML_TRANSFORM = "direct:html-transform";