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 ecd7e9ed34dc03cbdee3a8cfa99cc375c638fc41
Author: JiriOndrusek <ondrusek.j...@gmail.com>
AuthorDate: Mon Jun 10 16:37:02 2024 +0200

    fixed azure and xchange
---
 extensions/xchange/deployment/pom.xml              |  5 +++
 .../xchange/deployment/XchangeProcessor.java       |  7 ++++
 .../deployment/graal/XchangeSubstitutions.java     | 44 ++++++++++++++++++++++
 pom.xml                                            |  2 +-
 4 files changed, 57 insertions(+), 1 deletion(-)

diff --git a/extensions/xchange/deployment/pom.xml 
b/extensions/xchange/deployment/pom.xml
index c7eebda0d1..d591231eed 100644
--- a/extensions/xchange/deployment/pom.xml
+++ b/extensions/xchange/deployment/pom.xml
@@ -42,6 +42,11 @@
             <groupId>org.apache.camel.quarkus</groupId>
             <artifactId>camel-quarkus-xchange</artifactId>
         </dependency>
+        <dependency>
+            <groupId>org.graalvm.sdk</groupId>
+            <artifactId>nativeimage</artifactId>
+            <scope>provided</scope>
+        </dependency>
     </dependencies>
 
     <build>
diff --git 
a/extensions/xchange/deployment/src/main/java/org/apache/camel/quarkus/component/xchange/deployment/XchangeProcessor.java
 
b/extensions/xchange/deployment/src/main/java/org/apache/camel/quarkus/component/xchange/deployment/XchangeProcessor.java
index 158f3f6198..6328d03b00 100644
--- 
a/extensions/xchange/deployment/src/main/java/org/apache/camel/quarkus/component/xchange/deployment/XchangeProcessor.java
+++ 
b/extensions/xchange/deployment/src/main/java/org/apache/camel/quarkus/component/xchange/deployment/XchangeProcessor.java
@@ -109,6 +109,13 @@ class XchangeProcessor {
                 .filter(className -> className.startsWith("jakarta.ws.rs"))
                 .toArray(String[]::new);
         
reflectiveClass.produce(ReflectiveClassBuildItem.builder(jaxrsAnnotations).methods().build());
+
+        //constructors for converters
+        String[] converterClasses = 
index.getAllKnownSubclasses("com.fasterxml.jackson.databind.util.StdConverter")
+                .stream()
+                .map(classInfo -> classInfo.name().toString())
+                .toArray(String[]::new);
+        
reflectiveClass.produce(ReflectiveClassBuildItem.builder(converterClasses).methods().fields().build());
     }
 
     @BuildStep
diff --git 
a/extensions/xchange/deployment/src/main/java/org/apache/camel/quarkus/component/xchange/deployment/graal/XchangeSubstitutions.java
 
b/extensions/xchange/deployment/src/main/java/org/apache/camel/quarkus/component/xchange/deployment/graal/XchangeSubstitutions.java
new file mode 100644
index 0000000000..7eeac51c19
--- /dev/null
+++ 
b/extensions/xchange/deployment/src/main/java/org/apache/camel/quarkus/component/xchange/deployment/graal/XchangeSubstitutions.java
@@ -0,0 +1,44 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.quarkus.component.xchange.deployment.graal;
+
+import com.oracle.svm.core.annotate.Substitute;
+import com.oracle.svm.core.annotate.TargetClass;
+import com.oracle.svm.core.annotate.TargetElement;
+import org.knowm.xchange.binance.config.converter.StringToCurrencyConverter;
+import 
org.knowm.xchange.binance.config.converter.StringToCurrencyPairConverter;
+
+public class XchangeSubstitutions {
+
+    @TargetClass(StringToCurrencyPairConverter.class)
+    class StringToCurrencyPairConverterSubstitutions {
+
+        @Substitute
+        @TargetElement(name = TargetElement.CONSTRUCTOR_NAME)
+        public StringToCurrencyPairConverterSubstitutions() {
+        }
+    }
+
+    @TargetClass(StringToCurrencyConverter.class)
+    class StringToCurrencyConverterSubstitutions {
+
+        @Substitute
+        @TargetElement(name = TargetElement.CONSTRUCTOR_NAME)
+        public StringToCurrencyConverterSubstitutions() {
+        }
+    }
+}
diff --git a/pom.xml b/pom.xml
index 0fe1cbcb0d..709b894613 100644
--- a/pom.xml
+++ b/pom.xml
@@ -216,7 +216,7 @@
         
<activemq.container.image>docker.io/rmohr/activemq:5.15.9-alpine</activemq.container.image>
         
<activemq-artemis.container.image>quay.io/artemiscloud/activemq-artemis-broker:1.0.20</activemq-artemis.container.image>
         
<arangodb.container.image>docker.io/arangodb:3.12.0</arangodb.container.image>
-        
<azurite.container.image>mcr.microsoft.com/azure-storage/azurite:3.29.0</azurite.container.image>
+        
<azurite.container.image>mcr.microsoft.com/azure-storage/azurite:3.30.0</azurite.container.image>
         
<calculator-ws.container.image>quay.io/l2x6/calculator-ws:1.2</calculator-ws.container.image>
         
<cassandra.container.image>docker.io/cassandra:4.1.3</cassandra.container.image>
         
<consul.container.image>docker.io/hashicorp/consul:1.16</consul.container.image>

Reply via email to