You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by ja...@apache.org on 2020/01/30 09:25:12 UTC

[camel-quarkus] branch camel-master updated (0e97cc8 -> aeb1a52)

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

jamesnetherton pushed a change to branch camel-master
in repository https://gitbox.apache.org/repos/asf/camel-quarkus.git.


 discard 0e97cc8  Upgrade to Camel 3.1.0 - WIP
 discard 41f8c76  Fix incompatibilities between Quarkus and Camel MongoDB dependencies
     add af59c8f  chore: Fix typo
     add f7d07bc  Added a camel-bindy extension #653
     new bca04a4  Fix incompatibilities between Quarkus and Camel MongoDB dependencies
     new aeb1a52  Upgrade to Camel 3.1.0 - WIP

This update added new revisions after undoing existing revisions.
That is to say, some revisions that were in the old version of the
branch are not in the new version.  This situation occurs
when a user --force pushes a change and generates a repository
containing something like this:

 * -- * -- B -- O -- O -- O   (0e97cc8)
            \
             N -- N -- N   refs/heads/camel-master (aeb1a52)

You should already have received notification emails for all of the O
revisions, and so the following emails describe only the N revisions
from the common base, B.

Any revisions marked "omit" are not gone; other references still
refer to them.  Any revisions marked "discard" are gone forever.

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .github/workflows/pr-build.yaml                    |   1 +
 .../pages/list-of-camel-quarkus-extensions.adoc    |  10 +-
 .../bindy/deployment/pom.xml                       |  16 +--
 .../bindy/deployment/BindyProcessor.java}          |   6 +-
 .../parent-pom.xml => extensions/bindy/pom.xml     |   6 +-
 extensions/{base64 => bindy}/runtime/pom.xml       |  15 +--
 .../main/resources/META-INF/quarkus-extension.yaml |   6 +-
 extensions/pom.xml                                 |   1 +
 extensions/readme.adoc                             |   8 +-
 integration-tests/{dozer => bindy}/pom.xml         |  14 +--
 .../quarkus/component/bindy/it/BindyResource.java  | 107 +++++++++++++++++++++
 .../quarkus/component/bindy/it/BindyTestRoute.java |  47 +++++++++
 .../quarkus/component/bindy/it/model/CsvOrder.java |  50 ++++++++++
 .../bindy/it/model/FixedLengthOrder.java}          |  23 +++--
 .../quarkus/component/bindy/it/model/Header.java}  |  38 +++++---
 .../component/bindy/it/model/MessageOrder.java     | 107 +++++++++++++++++++++
 .../bindy/it/model/NameWithLengthSuffix.java}      |  29 ++++--
 .../model/NameWithLengthSuffixFormatFactory.java}  |  29 ++++--
 .../component/bindy/it/model/Security.java}        |  23 +++--
 .../component/bindy/it/model/TestConverter.java}   |  23 ++---
 .../quarkus/component/bindy/it/model/Trailer.java} |  25 +++--
 .../quarkus/component/bindy/it/CsvRecordIT.java}   |   4 +-
 .../quarkus/component/bindy/it/CsvRecordTest.java  |  58 +++++++++++
 .../component/bindy/it/FixedLengthRecordIT.java}   |   4 +-
 .../component/bindy/it/FixedLengthRecordTest.java  |  57 +++++++++++
 .../component/bindy/it/MessageRecordIT.java}       |   4 +-
 .../component/bindy/it/MessageRecordTest.java      |  76 +++++++++++++++
 .../quarkus/component/pdf/it/PdfResource.java      |   2 +-
 integration-tests/pom.xml                          |   1 +
 poms/bom-deployment/pom.xml                        |   5 +
 poms/bom/pom.xml                                   |  10 ++
 31 files changed, 699 insertions(+), 106 deletions(-)
 copy tooling/create-extension-templates/deployment-pom.xml => extensions/bindy/deployment/pom.xml (84%)
 copy extensions/{ahc/deployment/src/main/java/org/apache/camel/quarkus/component/ahc/deployment/AhcProcessor.java => bindy/deployment/src/main/java/org/apache/camel/quarkus/component/bindy/deployment/BindyProcessor.java} (87%)
 copy tooling/create-extension-templates/parent-pom.xml => extensions/bindy/pom.xml (91%)
 copy extensions/{base64 => bindy}/runtime/pom.xml (83%)
 copy extensions/{rest => bindy}/runtime/src/main/resources/META-INF/quarkus-extension.yaml (91%)
 copy integration-tests/{dozer => bindy}/pom.xml (90%)
 create mode 100644 integration-tests/bindy/src/main/java/org/apache/camel/quarkus/component/bindy/it/BindyResource.java
 create mode 100644 integration-tests/bindy/src/main/java/org/apache/camel/quarkus/component/bindy/it/BindyTestRoute.java
 create mode 100644 integration-tests/bindy/src/main/java/org/apache/camel/quarkus/component/bindy/it/model/CsvOrder.java
 copy integration-tests/{jackson/src/main/java/org/apache/camel/quarkus/component/jackson/model/PojoA.java => bindy/src/main/java/org/apache/camel/quarkus/component/bindy/it/model/FixedLengthOrder.java} (66%)
 copy integration-tests/{support/core-main/runtime/src/main/java/org/apache/camel/quarkus/core/runtime/support/MyDataFormat.java => bindy/src/main/java/org/apache/camel/quarkus/component/bindy/it/model/Header.java} (51%)
 create mode 100644 integration-tests/bindy/src/main/java/org/apache/camel/quarkus/component/bindy/it/model/MessageOrder.java
 copy integration-tests/{jackson/src/main/java/org/apache/camel/quarkus/component/jackson/model/PojoA.java => bindy/src/main/java/org/apache/camel/quarkus/component/bindy/it/model/NameWithLengthSuffix.java} (63%)
 copy integration-tests/{salesforce/src/main/java/org/apache/camel/quarkus/component/salesforce/CamelRoute.java => bindy/src/main/java/org/apache/camel/quarkus/component/bindy/it/model/NameWithLengthSuffixFormatFactory.java} (52%)
 copy integration-tests/{microprofile/src/main/java/org/apache/camel/quarkus/component/microprofile/it/health/FailingHealthCheck.java => bindy/src/main/java/org/apache/camel/quarkus/component/bindy/it/model/Security.java} (64%)
 copy integration-tests/{jackson/src/main/java/org/apache/camel/quarkus/component/jackson/model/PojoB.java => bindy/src/main/java/org/apache/camel/quarkus/component/bindy/it/model/TestConverter.java} (68%)
 copy integration-tests/{microprofile/src/main/java/org/apache/camel/quarkus/component/microprofile/it/health/FailingHealthCheck.java => bindy/src/main/java/org/apache/camel/quarkus/component/bindy/it/model/Trailer.java} (61%)
 copy integration-tests/{csv/src/test/java/org/apache/camel/quarkus/component/csv/it/CsvIT.java => bindy/src/test/java/org/apache/camel/quarkus/component/bindy/it/CsvRecordIT.java} (90%)
 create mode 100644 integration-tests/bindy/src/test/java/org/apache/camel/quarkus/component/bindy/it/CsvRecordTest.java
 copy integration-tests/{dataformat/src/test/java/org/apache/camel/quarkus/component/dataformat/it/DataformatIT.java => bindy/src/test/java/org/apache/camel/quarkus/component/bindy/it/FixedLengthRecordIT.java} (88%)
 create mode 100644 integration-tests/bindy/src/test/java/org/apache/camel/quarkus/component/bindy/it/FixedLengthRecordTest.java
 copy integration-tests/{controlbus/src/test/java/org/apache/camel/quarkus/component/controlbus/it/ControlbusIT.java => bindy/src/test/java/org/apache/camel/quarkus/component/bindy/it/MessageRecordIT.java} (89%)
 create mode 100644 integration-tests/bindy/src/test/java/org/apache/camel/quarkus/component/bindy/it/MessageRecordTest.java


[camel-quarkus] 02/02: Upgrade to Camel 3.1.0 - WIP

Posted by ja...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit aeb1a5273ed16659d8834e9cc4235ae1c60203e8
Author: James Netherton <ja...@gmail.com>
AuthorDate: Wed Jan 29 08:03:34 2020 +0000

    Upgrade to Camel 3.1.0 - WIP
---
 .../pages/list-of-camel-quarkus-extensions.adoc    |   4 +-
 .../quarkus/core/CamelMainEventDispatcher.java     |   5 +
 .../apache/camel/quarkus/core/CamelMainEvents.java |   6 +
 .../camel/quarkus/core/CamelMainRecorder.java      |   3 +-
 .../core/DisabledPredicateValidatorReifier.java    |   2 +-
 .../camel/quarkus/core/FastCamelContext.java       |  17 +-
 .../camel/quarkus/core/FastTypeConverter.java      |   6 +-
 extensions/readme.adoc                             |   4 +-
 .../apache/camel/quarkus/core/CamelServlet.java    |   2 +-
 .../core/runtime/support/SupportListener.java      |   4 +
 pom.xml                                            |   2 +-
 tooling/package-maven-plugin/pom.xml               |  22 +
 .../apache/camel/quarkus/maven/ExtMvelHelper.java  |  12 +-
 .../camel/quarkus/maven/JSonSchemaHelper.java      | 567 +++++++++++++++++++++
 .../quarkus/maven/PrepareCatalogQuarkusMojo.java   |   2 +-
 .../quarkus/maven/UpdateDocExtensionsListMojo.java | 132 ++---
 16 files changed, 697 insertions(+), 93 deletions(-)

diff --git a/docs/modules/ROOT/pages/list-of-camel-quarkus-extensions.adoc b/docs/modules/ROOT/pages/list-of-camel-quarkus-extensions.adoc
index f8673ee..75b11fb 100644
--- a/docs/modules/ROOT/pages/list-of-camel-quarkus-extensions.adoc
+++ b/docs/modules/ROOT/pages/list-of-camel-quarkus-extensions.adoc
@@ -64,7 +64,7 @@ Number of Camel components: 61 in 52 JAR artifacts (0 deprecated)
 `aws-sqs:queueNameOrArn` | 0.2.0 | The aws-sqs component is used for sending and receiving messages to Amazon's SQS service.
 
 | link:https://camel.apache.org/components/latest/aws-translate-component.html[AWS Translate] (camel-quarkus-aws-translate) +
-`aws-translate:label` | 1.0.0-M3 | The aws-kms is used for managing Amazon Translate
+`aws-translate:label` | 1.0.0-M3 | The aws-translate component is used for managing Amazon Translate
 
 | link:https://camel.apache.org/components/latest/bean-component.html[Bean] (camel-quarkus-bean) +
 `bean:beanName` | 0.2.0 | The bean component is for invoking Java beans from Camel.
@@ -73,7 +73,7 @@ Number of Camel components: 61 in 52 JAR artifacts (0 deprecated)
 `bean-validator:label` | 1.0.0-M1 | The Validator component performs bean validation of the message body using the Java Bean Validation API.
 
 | link:https://camel.apache.org/components/latest/class-component.html[Class] (camel-quarkus-bean) +
-`class:beanName` | 0.2.0 | The class component is for invoking Java classes (Java beans) from Camel.
+`class:beanName` | 0.2.0 | The Class component is for invoking Java classes (Java beans) from Camel.
 
 | link:https://camel.apache.org/components/latest/consul-component.html[Consul] (camel-quarkus-consul) +
 `consul:apiEndpoint` | 1.0.0-M3 | The camel consul component allows you to work with Consul, a distributed, highly available, datacenter-aware, service discovery and configuration system.
diff --git a/extensions/core/runtime/src/main/java/org/apache/camel/quarkus/core/CamelMainEventDispatcher.java b/extensions/core/runtime/src/main/java/org/apache/camel/quarkus/core/CamelMainEventDispatcher.java
index 1df54ab..2b6f368 100644
--- a/extensions/core/runtime/src/main/java/org/apache/camel/quarkus/core/CamelMainEventDispatcher.java
+++ b/extensions/core/runtime/src/main/java/org/apache/camel/quarkus/core/CamelMainEventDispatcher.java
@@ -26,6 +26,11 @@ import org.apache.camel.main.MainSupport;
  */
 public class CamelMainEventDispatcher implements org.apache.camel.main.MainListener {
     @Override
+    public void beforeConfigure(BaseMainSupport main) {
+        fireEvent(CamelMainEvents.BeforeConfigure.class, new CamelMainEvents.BeforeConfigure());
+    }
+
+    @Override
     public void configure(CamelContext context) {
         fireEvent(CamelMainEvents.Configure.class, new CamelMainEvents.Configure());
     }
diff --git a/extensions/core/runtime/src/main/java/org/apache/camel/quarkus/core/CamelMainEvents.java b/extensions/core/runtime/src/main/java/org/apache/camel/quarkus/core/CamelMainEvents.java
index 122803a..75b1d0e 100644
--- a/extensions/core/runtime/src/main/java/org/apache/camel/quarkus/core/CamelMainEvents.java
+++ b/extensions/core/runtime/src/main/java/org/apache/camel/quarkus/core/CamelMainEvents.java
@@ -21,6 +21,12 @@ public final class CamelMainEvents {
     }
 
     /**
+     * Event fired by {@link CamelMain} before the CamelContext is configured.
+     */
+    public static class BeforeConfigure {
+    }
+
+    /**
      * Event fired by {@link CamelMain} before the CamelContext is being created and started.
      */
     public static class BeforeStart {
diff --git a/extensions/core/runtime/src/main/java/org/apache/camel/quarkus/core/CamelMainRecorder.java b/extensions/core/runtime/src/main/java/org/apache/camel/quarkus/core/CamelMainRecorder.java
index 118d7a0..87c7a99 100644
--- a/extensions/core/runtime/src/main/java/org/apache/camel/quarkus/core/CamelMainRecorder.java
+++ b/extensions/core/runtime/src/main/java/org/apache/camel/quarkus/core/CamelMainRecorder.java
@@ -21,6 +21,7 @@ import io.quarkus.runtime.RuntimeValue;
 import io.quarkus.runtime.ShutdownContext;
 import io.quarkus.runtime.annotations.Recorder;
 import org.apache.camel.CamelContext;
+import org.apache.camel.ExtendedCamelContext;
 import org.apache.camel.RoutesBuilder;
 import org.apache.camel.impl.engine.DefaultReactiveExecutor;
 import org.apache.camel.main.MainListener;
@@ -76,7 +77,7 @@ public class CamelMainRecorder {
     }
 
     public void setReactiveExecutor(RuntimeValue<CamelMain> main, RuntimeValue<ReactiveExecutor> executor) {
-        main.getValue().getCamelContext().setReactiveExecutor(executor.getValue());
+        main.getValue().getCamelContext().adapt(ExtendedCamelContext.class).setReactiveExecutor(executor.getValue());
     }
 
     public void start(ShutdownContext shutdown, RuntimeValue<CamelMain> main) {
diff --git a/extensions/core/runtime/src/main/java/org/apache/camel/quarkus/core/DisabledPredicateValidatorReifier.java b/extensions/core/runtime/src/main/java/org/apache/camel/quarkus/core/DisabledPredicateValidatorReifier.java
index ee6347f..29a9eae 100644
--- a/extensions/core/runtime/src/main/java/org/apache/camel/quarkus/core/DisabledPredicateValidatorReifier.java
+++ b/extensions/core/runtime/src/main/java/org/apache/camel/quarkus/core/DisabledPredicateValidatorReifier.java
@@ -29,7 +29,7 @@ public class DisabledPredicateValidatorReifier extends ValidatorReifier<Predicat
     }
 
     @Override
-    protected Validator doCreateValidator(CamelContext context) throws Exception {
+    protected Validator doCreateValidator(CamelContext context) {
         throw new UnsupportedOperationException("Please add a dependency to camel-quarkus-core-xml");
     }
 
diff --git a/extensions/core/runtime/src/main/java/org/apache/camel/quarkus/core/FastCamelContext.java b/extensions/core/runtime/src/main/java/org/apache/camel/quarkus/core/FastCamelContext.java
index 24d6a94..0857b05 100644
--- a/extensions/core/runtime/src/main/java/org/apache/camel/quarkus/core/FastCamelContext.java
+++ b/extensions/core/runtime/src/main/java/org/apache/camel/quarkus/core/FastCamelContext.java
@@ -23,9 +23,7 @@ import java.util.concurrent.ExecutorService;
 import org.apache.camel.AsyncProcessor;
 import org.apache.camel.Component;
 import org.apache.camel.Endpoint;
-import org.apache.camel.PollingConsumer;
 import org.apache.camel.Processor;
-import org.apache.camel.Producer;
 import org.apache.camel.TypeConverter;
 import org.apache.camel.component.microprofile.config.CamelMicroProfilePropertiesSource;
 import org.apache.camel.health.HealthCheckRegistry;
@@ -59,7 +57,6 @@ import org.apache.camel.impl.engine.DefaultValidatorRegistry;
 import org.apache.camel.impl.engine.EndpointKey;
 import org.apache.camel.impl.engine.HeadersMapFactoryResolver;
 import org.apache.camel.impl.engine.RestRegistryFactoryResolver;
-import org.apache.camel.impl.engine.ServicePool;
 import org.apache.camel.impl.health.DefaultHealthCheckRegistry;
 import org.apache.camel.impl.transformer.TransformerKey;
 import org.apache.camel.impl.validator.ValidatorKey;
@@ -264,16 +261,6 @@ public class FastCamelContext extends AbstractCamelContext {
     }
 
     @Override
-    protected ServicePool<Producer> createProducerServicePool() {
-        return new ServicePool<>(Endpoint::createProducer, Producer::getEndpoint, 100);
-    }
-
-    @Override
-    protected ServicePool<PollingConsumer> createPollingConsumerServicePool() {
-        return new ServicePool<>(Endpoint::createPollingConsumer, PollingConsumer::getEndpoint, 100);
-    }
-
-    @Override
     protected UnitOfWorkFactory createUnitOfWorkFactory() {
         return new DefaultUnitOfWorkFactory();
     }
@@ -355,12 +342,12 @@ public class FastCamelContext extends AbstractCamelContext {
     }
 
     @Override
-    protected TransformerRegistry<TransformerKey> createTransformerRegistry() throws Exception {
+    protected TransformerRegistry<TransformerKey> createTransformerRegistry() {
         return new DefaultTransformerRegistry(this);
     }
 
     @Override
-    protected ValidatorRegistry<ValidatorKey> createValidatorRegistry() throws Exception {
+    protected ValidatorRegistry<ValidatorKey> createValidatorRegistry() {
         return new DefaultValidatorRegistry(this);
     }
 
diff --git a/extensions/core/runtime/src/main/java/org/apache/camel/quarkus/core/FastTypeConverter.java b/extensions/core/runtime/src/main/java/org/apache/camel/quarkus/core/FastTypeConverter.java
index 3a829ff..7ed602b 100644
--- a/extensions/core/runtime/src/main/java/org/apache/camel/quarkus/core/FastTypeConverter.java
+++ b/extensions/core/runtime/src/main/java/org/apache/camel/quarkus/core/FastTypeConverter.java
@@ -18,8 +18,12 @@ package org.apache.camel.quarkus.core;
 
 import org.apache.camel.impl.converter.DefaultTypeConverter;
 import org.apache.camel.spi.TypeConverterLoader;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 public class FastTypeConverter extends DefaultTypeConverter {
+    private static final Logger LOG = LoggerFactory.getLogger(FastTypeConverter.class);
+
     public FastTypeConverter() {
         super(null, null, null, null, false);
     }
@@ -27,7 +31,7 @@ public class FastTypeConverter extends DefaultTypeConverter {
     @Override
     protected void doStart() throws Exception {
         for (TypeConverterLoader loader : getCamelContext().getRegistry().findByType(TypeConverterLoader.class)) {
-            log.debug("TypeConverterLoader: {} loading converters", loader);
+            LOG.debug("TypeConverterLoader: {} loading converters", loader);
             loader.load(this);
         }
     }
diff --git a/extensions/readme.adoc b/extensions/readme.adoc
index be0d62b..1fc42d3 100644
--- a/extensions/readme.adoc
+++ b/extensions/readme.adoc
@@ -51,7 +51,7 @@ Number of Camel components: 61 in 52 JAR artifacts (0 deprecated)
 `aws-sqs:queueNameOrArn` | 0.2.0 | The aws-sqs component is used for sending and receiving messages to Amazon's SQS service.
 
 | link:https://camel.apache.org/components/latest/aws-translate-component.html[AWS Translate] (camel-quarkus-aws-translate) +
-`aws-translate:label` | 1.0.0-M3 | The aws-kms is used for managing Amazon Translate
+`aws-translate:label` | 1.0.0-M3 | The aws-translate component is used for managing Amazon Translate
 
 | link:https://camel.apache.org/components/latest/bean-component.html[Bean] (camel-quarkus-bean) +
 `bean:beanName` | 0.2.0 | The bean component is for invoking Java beans from Camel.
@@ -60,7 +60,7 @@ Number of Camel components: 61 in 52 JAR artifacts (0 deprecated)
 `bean-validator:label` | 1.0.0-M1 | The Validator component performs bean validation of the message body using the Java Bean Validation API.
 
 | link:https://camel.apache.org/components/latest/class-component.html[Class] (camel-quarkus-bean) +
-`class:beanName` | 0.2.0 | The class component is for invoking Java classes (Java beans) from Camel.
+`class:beanName` | 0.2.0 | The Class component is for invoking Java classes (Java beans) from Camel.
 
 | link:https://camel.apache.org/components/latest/consul-component.html[Consul] (camel-quarkus-consul) +
 `consul:apiEndpoint` | 1.0.0-M3 | The camel consul component allows you to work with Consul, a distributed, highly available, datacenter-aware, service discovery and configuration system.
diff --git a/integration-tests/core-main/src/main/java/org/apache/camel/quarkus/core/CamelServlet.java b/integration-tests/core-main/src/main/java/org/apache/camel/quarkus/core/CamelServlet.java
index 1d13b31..b243845 100644
--- a/integration-tests/core-main/src/main/java/org/apache/camel/quarkus/core/CamelServlet.java
+++ b/integration-tests/core-main/src/main/java/org/apache/camel/quarkus/core/CamelServlet.java
@@ -165,7 +165,7 @@ public class CamelServlet {
     @GET
     @Produces(MediaType.TEXT_PLAIN)
     public JsonObject reactiveExecutor() {
-        ReactiveExecutor executor = context.getReactiveExecutor();
+        ReactiveExecutor executor = context.adapt(ExtendedCamelContext.class).getReactiveExecutor();
 
         JsonObjectBuilder builder = Json.createObjectBuilder();
         builder.add("class", executor.getClass().getName());
diff --git a/integration-tests/support/core-main/runtime/src/main/java/org/apache/camel/quarkus/core/runtime/support/SupportListener.java b/integration-tests/support/core-main/runtime/src/main/java/org/apache/camel/quarkus/core/runtime/support/SupportListener.java
index 962d471..decef0a 100644
--- a/integration-tests/support/core-main/runtime/src/main/java/org/apache/camel/quarkus/core/runtime/support/SupportListener.java
+++ b/integration-tests/support/core-main/runtime/src/main/java/org/apache/camel/quarkus/core/runtime/support/SupportListener.java
@@ -39,6 +39,10 @@ public class SupportListener implements MainListener {
     }
 
     @Override
+    public void beforeConfigure(BaseMainSupport main) {
+    }
+
+    @Override
     public void beforeStart(BaseMainSupport main) {
         main.addRoutesBuilder(new MyBuilder());
     }
diff --git a/pom.xml b/pom.xml
index ab3a66f..f188f2b 100644
--- a/pom.xml
+++ b/pom.xml
@@ -41,7 +41,7 @@
         <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
 
         <ahc.version>2.10.4</ahc.version>
-        <camel.version>3.0.1</camel.version>
+        <camel.version>3.1.0-SNAPSHOT</camel.version>
         <hapi.version>4.1.0</hapi.version>
         <quarkus.version>1.2.0.Final</quarkus.version>
         <httpmime.version>4.1.3</httpmime.version>
diff --git a/tooling/package-maven-plugin/pom.xml b/tooling/package-maven-plugin/pom.xml
index ad49f19..fc0eb30 100644
--- a/tooling/package-maven-plugin/pom.xml
+++ b/tooling/package-maven-plugin/pom.xml
@@ -53,6 +53,28 @@
             </exclusions>
         </dependency>
         <dependency>
+            <groupId>org.apache.camel</groupId>
+            <artifactId>camel-support</artifactId>
+            <version>${camel.version}</version>
+            <exclusions>
+                <exclusion>
+                    <groupId>org.slf4j</groupId>
+                    <artifactId>slf4j-api</artifactId>
+                </exclusion>
+            </exclusions>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.camel</groupId>
+            <artifactId>camel-util</artifactId>
+            <version>${camel.version}</version>
+            <exclusions>
+                <exclusion>
+                    <groupId>org.slf4j</groupId>
+                    <artifactId>slf4j-api</artifactId>
+                </exclusion>
+            </exclusions>
+        </dependency>
+        <dependency>
             <groupId>org.apache.maven</groupId>
             <artifactId>maven-core</artifactId>
             <exclusions>
diff --git a/tooling/package-maven-plugin/src/main/java/org/apache/camel/quarkus/maven/ExtMvelHelper.java b/tooling/package-maven-plugin/src/main/java/org/apache/camel/quarkus/maven/ExtMvelHelper.java
index 5066e5d..c70271c 100644
--- a/tooling/package-maven-plugin/src/main/java/org/apache/camel/quarkus/maven/ExtMvelHelper.java
+++ b/tooling/package-maven-plugin/src/main/java/org/apache/camel/quarkus/maven/ExtMvelHelper.java
@@ -19,10 +19,10 @@ package org.apache.camel.quarkus.maven;
 import java.nio.file.Path;
 
 import org.apache.camel.maven.packaging.MvelHelper;
-import org.apache.camel.maven.packaging.StringHelper;
-import org.apache.camel.maven.packaging.model.ComponentModel;
-import org.apache.camel.maven.packaging.model.DataFormatModel;
-import org.apache.camel.maven.packaging.model.LanguageModel;
+import org.apache.camel.tooling.util.Strings;
+import org.apache.camel.tooling.model.ComponentModel;
+import org.apache.camel.tooling.model.DataFormatModel;
+import org.apache.camel.tooling.model.LanguageModel;
 
 public class ExtMvelHelper {
 
@@ -37,7 +37,7 @@ public class ExtMvelHelper {
     }
 
     public String getFirstVersionShort(Object model) {
-        return StringHelper.cutLastZeroDigit((String) invokeGetter(model, "getFirstVersion"));
+        return Strings.cutLastZeroDigit((String) invokeGetter(model, "getFirstVersion"));
     }
 
     public String getDocLink(Object model) {
@@ -76,6 +76,6 @@ public class ExtMvelHelper {
     }
 
     private String getExtensionDocName(Object model) {
-        return StringHelper.after((String) invokeGetter(model, "getArtifactId"), "camel-quarkus-") + ".adoc";
+        return Strings.after((String) invokeGetter(model, "getArtifactId"), "camel-quarkus-") + ".adoc";
     }
 }
diff --git a/tooling/package-maven-plugin/src/main/java/org/apache/camel/quarkus/maven/JSonSchemaHelper.java b/tooling/package-maven-plugin/src/main/java/org/apache/camel/quarkus/maven/JSonSchemaHelper.java
new file mode 100644
index 0000000..1b560d0
--- /dev/null
+++ b/tooling/package-maven-plugin/src/main/java/org/apache/camel/quarkus/maven/JSonSchemaHelper.java
@@ -0,0 +1,567 @@
+/*
+ * 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.maven;
+
+import java.util.ArrayList;
+import java.util.LinkedHashMap;
+import java.util.LinkedHashSet;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+import java.util.stream.Collectors;
+
+import org.apache.camel.util.json.JsonArray;
+import org.apache.camel.util.json.JsonObject;
+import org.apache.camel.util.json.Jsoner;
+
+/**
+ * Used for parsing Camel components json meta-data descriptors.
+ */
+public final class JSonSchemaHelper {
+
+    private static final String[] LOGGING_LEVELS = new String[]{"ERROR", "WARN", "INFO", "DEBUG", "TRACE", "OFF"};
+
+    private JSonSchemaHelper() {
+    }
+
+    /**
+     * Parses the camel-main json schema to split it into a list or rows, where each row contains key value pairs with the metadata
+     *
+     * @param json the main configuration json
+     * @return a list of all the rows, where each row is a set of key value pairs with metadata
+     * @throws RuntimeException is thrown if error parsing the json data
+     */
+    @SuppressWarnings("unchecked")
+    public static List<Map<String, String>> parseMainJsonSchema(String json) {
+        List<Map<String, String>> answer = new ArrayList<>();
+        if (json == null) {
+            return answer;
+        }
+
+        // convert into a List<Map<String, String>> structure which is expected as output from this parser
+        try {
+            JsonObject output = (JsonObject) Jsoner.deserialize(json);
+            for (String key : output.keySet()) {
+                JsonArray array = (JsonArray) output.get(key);
+                if (key.equals("properties")) {
+                    // flattern each entry in the row with name as they key, and its value as the content (its a map also)
+                    for (Object obj : array) {
+                        Map entry = (Map) obj;
+                        Map<String, String> newRow = new LinkedHashMap();
+                        newRow.putAll(entry);
+                        answer.add(newRow);
+                        String name = ((Map) obj).get("name").toString();
+                        // use naming style with camel case
+                        String lookupKey = dashToCamelCase(name);
+                        newRow.put("name", lookupKey);
+                        // its the java type
+                        String type = newRow.get("type");
+                        newRow.put("javaType", type);
+                        newRow.put("type", fromMainToType(type));
+                        // add known enums
+                        if ("org.apache.camel.LoggingLevel".equals(type)) {
+                            newRow.put("enum", "ERROR,WARN,INFO,DEBUG,TRACE,OFF");
+                        } else if ("org.apache.camel.ManagementStatisticsLevel".equals(type)) {
+                            newRow.put("enum", "Extended,Default,RoutesOnly,Off");
+                        } else if ("org.apache.camel.spi.RestBindingMode".equals(type)) {
+                            newRow.put("enum", "auto,off,json,xml,json_xml");
+                        } else if ("org.apache.camel.spi.RestHostNameResolver".equals(type)) {
+                            newRow.put("enum", "allLocalIp,localIp,localHostName");
+                        }
+                    }
+                }
+            }
+        } catch (Exception e) {
+            // wrap parsing exceptions as runtime
+            throw new RuntimeException("Cannot parse json", e);
+        }
+
+        return answer;
+    }
+
+    private static String fromMainToType(String type) {
+        if ("boolean".equals(type) || "java.lang.Boolean".equals(type)) {
+            return "boolean";
+        } else if ("int".equals(type) || "java.lang.Integer".equals(type)) {
+            return "integer";
+        } else if ("long".equals(type) || "java.lang.Long".equals(type)) {
+            return "integer";
+        } else if ("float".equals(type) || "java.lang.Float".equals(type)) {
+            return "number";
+        } else if ("double".equals(type) || "java.lang.Double".equals(type)) {
+            return "number";
+        } else if ("string".equals(type) || "java.lang.String".equals(type)) {
+            return "string";
+        } else {
+            return "object";
+        }
+    }
+
+    /**
+     * Parses the json schema to split it into a list or rows, where each row contains key value pairs with the metadata
+     *
+     * @param group the group to parse from such as <tt>component</tt>, <tt>componentProperties</tt>, or <tt>properties</tt>.
+     * @param json the json
+     * @return a list of all the rows, where each row is a set of key value pairs with metadata
+     * @throws RuntimeException is thrown if error parsing the json data
+     */
+    @SuppressWarnings("unchecked")
+    public static List<Map<String, String>> parseJsonSchema(String group, String json, boolean parseProperties) {
+        List<Map<String, String>> answer = new ArrayList<>();
+        if (json == null) {
+            return answer;
+        }
+
+        // convert into a List<Map<String, String>> structure which is expected as output from this parser
+        try {
+            JsonObject output = (JsonObject) Jsoner.deserialize(json);
+            for (String key : output.keySet()) {
+                Map row = output.getMap(key);
+                if (key.equals(group)) {
+                    if (parseProperties) {
+                        // flattern each entry in the row with name as they key, and its value as the content (its a map also)
+                        for (Object obj : row.entrySet()) {
+                            Map.Entry entry = (Map.Entry) obj;
+                            Map<String, String> newRow = new LinkedHashMap();
+                            newRow.put("name", entry.getKey().toString());
+
+                            Map newData = transformMap((Map) entry.getValue());
+                            newRow.putAll(newData);
+                            answer.add(newRow);
+                        }
+                    } else {
+                        // flattern each entry in the row as a list of single Map<key, value> elements
+                        Map newData = transformMap(row);
+                        for (Object obj : newData.entrySet()) {
+                            Map.Entry entry = (Map.Entry) obj;
+                            Map<String, String> newRow = new LinkedHashMap<>();
+                            newRow.put(entry.getKey().toString(), entry.getValue().toString());
+                            answer.add(newRow);
+                        }
+                    }
+                }
+            }
+        } catch (Exception e) {
+            // wrap parsing exceptions as runtime
+            throw new RuntimeException("Cannot parse json", e);
+        }
+
+        return answer;
+    }
+
+    private static Map<String, String> transformMap(Map jsonMap) {
+        Map<String, String> answer = new LinkedHashMap<>();
+
+        for (Object rowObj : jsonMap.entrySet()) {
+            Map.Entry rowEntry = (Map.Entry) rowObj;
+            // if its a list type then its an enum, and we need to parse it as a single line separated with comma
+            // to be backwards compatible
+            Object newValue = rowEntry.getValue();
+            if (newValue instanceof List) {
+                List<?> list = (List) newValue;
+                newValue = list.stream().map(Object::toString)
+                        .collect(Collectors.joining(","));
+            }
+            // ensure value is escaped
+            String value = escapeJson(newValue.toString());
+            answer.put(rowEntry.getKey().toString(), value);
+        }
+
+        return answer;
+    }
+
+    private static String escapeJson(String value) {
+        // need to safe encode \r as \\r so its escaped
+        // need to safe encode \n as \\n so its escaped
+        // need to safe encode \t as \\t so its escaped
+        return value
+                .replace("\\r", "\\\\r")
+                .replace("\\n", "\\\\n")
+                .replace("\\t", "\\\\t");
+    }
+
+    public static boolean isComponentLenientProperties(List<Map<String, String>> rows) {
+        for (Map<String, String> row : rows) {
+            if (row.containsKey("lenientProperties")) {
+                return "true".equals(row.get("lenientProperties"));
+            }
+        }
+        return false;
+    }
+
+    public static boolean isComponentConsumerOnly(List<Map<String, String>> rows) {
+        for (Map<String, String> row : rows) {
+            if (row.containsKey("consumerOnly")) {
+                return "true".equals(row.get("consumerOnly"));
+            }
+        }
+        return false;
+    }
+
+    public static boolean isComponentProducerOnly(List<Map<String, String>> rows) {
+        for (Map<String, String> row : rows) {
+            if (row.containsKey("producerOnly")) {
+                return "true".equals(row.get("producerOnly"));
+            }
+        }
+        return false;
+    }
+
+    public static boolean isPropertyConsumerOnly(List<Map<String, String>> rows, String name) {
+        for (Map<String, String> row : rows) {
+            String labels = null;
+            boolean found = false;
+            if (row.containsKey("name")) {
+                found = name.equalsIgnoreCase(row.get("name"));
+            }
+            if (row.containsKey("label")) {
+                labels = row.get("label");
+            }
+            if (found) {
+                return labels != null && labels.contains("consumer");
+            }
+        }
+        return false;
+    }
+
+    public static boolean isPropertyProducerOnly(List<Map<String, String>> rows, String name) {
+        for (Map<String, String> row : rows) {
+            String labels = null;
+            boolean found = false;
+            if (row.containsKey("name")) {
+                found = name.equalsIgnoreCase(row.get("name"));
+            }
+            if (row.containsKey("label")) {
+                labels = row.get("label");
+            }
+            if (found) {
+                return labels != null && labels.contains("producer");
+            }
+        }
+        return false;
+    }
+
+    public static boolean isPropertyRequired(List<Map<String, String>> rows, String name) {
+        for (Map<String, String> row : rows) {
+            boolean required = false;
+            boolean found = false;
+            if (row.containsKey("name")) {
+                found = name.equalsIgnoreCase(row.get("name"));
+            }
+            if (row.containsKey("required")) {
+                required = "true".equals(row.get("required"));
+            }
+            if (found) {
+                return required;
+            }
+        }
+        return false;
+    }
+
+    public static boolean isPropertyDeprecated(List<Map<String, String>> rows, String name) {
+        for (Map<String, String> row : rows) {
+            boolean deprecated = false;
+            boolean found = false;
+            if (row.containsKey("name")) {
+                found = name.equalsIgnoreCase(row.get("name"));
+            }
+            if (row.containsKey("deprecated")) {
+                deprecated = "true".equals(row.get("deprecated"));
+            }
+            if (found) {
+                return deprecated;
+            }
+        }
+        return false;
+    }
+
+    public static String getPropertyKind(List<Map<String, String>> rows, String name) {
+        for (Map<String, String> row : rows) {
+            String kind = null;
+            boolean found = false;
+            if (row.containsKey("name")) {
+                found = name.equalsIgnoreCase(row.get("name"));
+            }
+            if (row.containsKey("kind")) {
+                kind = row.get("kind");
+            }
+            if (found) {
+                return kind;
+            }
+        }
+        return null;
+    }
+
+    public static String getPropertyJavaType(List<Map<String, String>> rows, String name) {
+        for (Map<String, String> row : rows) {
+            String javaType = null;
+            boolean found = false;
+            if (row.containsKey("name")) {
+                found = name.equalsIgnoreCase(row.get("name"));
+            }
+            if (row.containsKey("javaType")) {
+                javaType = row.get("javaType");
+            }
+            if (found) {
+                return javaType;
+            }
+        }
+        return null;
+    }
+
+    public static boolean isPropertyBoolean(List<Map<String, String>> rows, String name) {
+        for (Map<String, String> row : rows) {
+            String type = null;
+            boolean found = false;
+            if (row.containsKey("name")) {
+                found = name.equalsIgnoreCase(row.get("name"));
+            }
+            if (row.containsKey("type")) {
+                type = row.get("type");
+            }
+            if (found) {
+                return "boolean".equals(type);
+            }
+        }
+        return false;
+    }
+
+    public static boolean isPropertyInteger(List<Map<String, String>> rows, String name) {
+        for (Map<String, String> row : rows) {
+            String type = null;
+            boolean found = false;
+            if (row.containsKey("name")) {
+                found = name.equalsIgnoreCase(row.get("name"));
+            }
+            if (row.containsKey("type")) {
+                type = row.get("type");
+            }
+            if (found) {
+                return "integer".equals(type);
+            }
+        }
+        return false;
+    }
+
+    public static boolean isPropertyArray(List<Map<String, String>> rows, String name) {
+        for (Map<String, String> row : rows) {
+            String type = null;
+            boolean found = false;
+            if (row.containsKey("name")) {
+                found = name.equalsIgnoreCase(row.get("name"));
+            }
+            if (row.containsKey("type")) {
+                type = row.get("type");
+            }
+            if (found) {
+                return "array".equals(type);
+            }
+        }
+        return false;
+    }
+
+    public static boolean isPropertyNumber(List<Map<String, String>> rows, String name) {
+        for (Map<String, String> row : rows) {
+            String type = null;
+            boolean found = false;
+            if (row.containsKey("name")) {
+                found = name.equalsIgnoreCase(row.get("name"));
+            }
+            if (row.containsKey("type")) {
+                type = row.get("type");
+            }
+            if (found) {
+                return "number".equals(type);
+            }
+        }
+        return false;
+    }
+
+    public static boolean isPropertyObject(List<Map<String, String>> rows, String name) {
+        for (Map<String, String> row : rows) {
+            String type = null;
+            boolean found = false;
+            if (row.containsKey("name")) {
+                found = name.equalsIgnoreCase(row.get("name"));
+            }
+            if (row.containsKey("type")) {
+                type = row.get("type");
+            }
+            if (found) {
+                return "object".equals(type);
+            }
+        }
+        return false;
+    }
+
+    public static String getPropertyDefaultValue(List<Map<String, String>> rows, String name) {
+        for (Map<String, String> row : rows) {
+            String defaultValue = null;
+            boolean found = false;
+            if (row.containsKey("name")) {
+                found = name.equalsIgnoreCase(row.get("name"));
+            }
+            if (row.containsKey("defaultValue")) {
+                defaultValue = row.get("defaultValue");
+            }
+            if (found) {
+                return defaultValue;
+            }
+        }
+        return null;
+    }
+
+    public static String stripOptionalPrefixFromName(List<Map<String, String>> rows, String name) {
+        for (Map<String, String> row : rows) {
+            boolean found = false;
+            if (row.containsKey("name")) {
+                String optionalPrefix = row.get("optionalPrefix");
+                if (optionalPrefix != null && !optionalPrefix.isEmpty() && name.startsWith(optionalPrefix)) {
+                    name = name.substring(optionalPrefix.length());
+                    // try again
+                    return stripOptionalPrefixFromName(rows, name);
+                } else {
+                    found = name.equalsIgnoreCase(row.get("name"));
+                }
+            }
+            if (found) {
+                return name;
+            }
+        }
+        return name;
+    }
+
+    public static String getPropertyEnum(List<Map<String, String>> rows, String name) {
+        for (Map<String, String> row : rows) {
+            String enums = null;
+            boolean found = false;
+            if (row.containsKey("name")) {
+                found = name.equalsIgnoreCase(row.get("name"));
+            }
+            if (row.containsKey("enum")) {
+                enums = row.get("enum");
+            }
+            if (found) {
+                return enums;
+            }
+        }
+        return null;
+    }
+
+    public static String getPropertyPrefix(List<Map<String, String>> rows, String name) {
+        for (Map<String, String> row : rows) {
+            String prefix = null;
+            boolean found = false;
+            if (row.containsKey("name")) {
+                found = name.equalsIgnoreCase(row.get("name"));
+            }
+            if (row.containsKey("prefix")) {
+                prefix = row.get("prefix");
+            }
+            if (found) {
+                return prefix;
+            }
+        }
+        return null;
+    }
+
+    public static boolean isPropertyMultiValue(List<Map<String, String>> rows, String name) {
+        for (Map<String, String> row : rows) {
+            boolean multiValue = false;
+            boolean found = false;
+            if (row.containsKey("name")) {
+                found = name.equalsIgnoreCase(row.get("name"));
+            }
+            if (row.containsKey("multiValue")) {
+                multiValue = "true".equals(row.get("multiValue"));
+            }
+            if (found) {
+                return multiValue;
+            }
+        }
+        return false;
+    }
+
+    public static String getPropertyNameFromNameWithPrefix(List<Map<String, String>> rows, String name) {
+        for (Map<String, String> row : rows) {
+            String propertyName = null;
+            boolean found = false;
+            if (row.containsKey("name")) {
+                propertyName = row.get("name");
+            }
+            if (row.containsKey("prefix")) {
+                String preifx = row.get("prefix");
+                found = name.startsWith(preifx);
+            }
+            if (found) {
+                return propertyName;
+            }
+        }
+        return null;
+    }
+
+    public static Map<String, String> getRow(List<Map<String, String>> rows, String key) {
+        for (Map<String, String> row : rows) {
+            if (key.equals(row.get("name"))) {
+                return row;
+            }
+        }
+        return null;
+    }
+
+    public static Set<String> getNames(List<Map<String, String>> rows) {
+        Set<String> answer = new LinkedHashSet<>();
+        for (Map<String, String> row : rows) {
+            if (row.containsKey("name")) {
+                answer.add(row.get("name"));
+            }
+        }
+        return answer;
+    }
+
+    /**
+     * Converts the string from dash format into camel case (hello-great-world -> helloGreatWorld)
+     *
+     * @param text  the string
+     * @return the string camel cased
+     */
+    private static String dashToCamelCase(String text) {
+        if (text == null) {
+            return null;
+        }
+        int length = text.length();
+        if (length == 0) {
+            return text;
+        }
+        if (text.indexOf('-') == -1) {
+            return text;
+        }
+
+        StringBuilder sb = new StringBuilder();
+
+        for (int i = 0; i < text.length(); i++) {
+            char c = text.charAt(i);
+            if (c == '-') {
+                i++;
+                sb.append(Character.toUpperCase(text.charAt(i)));
+            } else {
+                sb.append(c);
+            }
+        }
+        return sb.toString();
+    }
+}
\ No newline at end of file
diff --git a/tooling/package-maven-plugin/src/main/java/org/apache/camel/quarkus/maven/PrepareCatalogQuarkusMojo.java b/tooling/package-maven-plugin/src/main/java/org/apache/camel/quarkus/maven/PrepareCatalogQuarkusMojo.java
index 0ca8459..0a07936 100644
--- a/tooling/package-maven-plugin/src/main/java/org/apache/camel/quarkus/maven/PrepareCatalogQuarkusMojo.java
+++ b/tooling/package-maven-plugin/src/main/java/org/apache/camel/quarkus/maven/PrepareCatalogQuarkusMojo.java
@@ -64,7 +64,7 @@ import com.google.gson.GsonBuilder;
 import com.google.gson.JsonObject;
 import com.google.gson.JsonParser;
 
-import static org.apache.camel.maven.packaging.PackageHelper.loadText;
+import static org.apache.camel.tooling.util.PackageHelper.loadText;
 
 /**
  * Prepares the Quarkus provider camel catalog to include component it supports
diff --git a/tooling/package-maven-plugin/src/main/java/org/apache/camel/quarkus/maven/UpdateDocExtensionsListMojo.java b/tooling/package-maven-plugin/src/main/java/org/apache/camel/quarkus/maven/UpdateDocExtensionsListMojo.java
index bb392f4..b5fac67 100644
--- a/tooling/package-maven-plugin/src/main/java/org/apache/camel/quarkus/maven/UpdateDocExtensionsListMojo.java
+++ b/tooling/package-maven-plugin/src/main/java/org/apache/camel/quarkus/maven/UpdateDocExtensionsListMojo.java
@@ -33,12 +33,11 @@ import java.util.TreeSet;
 
 import static java.util.stream.Collectors.toSet;
 
-import org.apache.camel.maven.packaging.JSonSchemaHelper;
-import org.apache.camel.maven.packaging.StringHelper;
-import org.apache.camel.maven.packaging.model.ComponentModel;
-import org.apache.camel.maven.packaging.model.DataFormatModel;
-import org.apache.camel.maven.packaging.model.LanguageModel;
-import org.apache.camel.maven.packaging.model.OtherModel;
+import org.apache.camel.util.StringHelper;
+import org.apache.camel.tooling.model.ComponentModel;
+import org.apache.camel.tooling.model.DataFormatModel;
+import org.apache.camel.tooling.model.LanguageModel;
+import org.apache.camel.tooling.model.OtherModel;
 import org.apache.maven.plugin.AbstractMojo;
 import org.apache.maven.plugin.MojoExecutionException;
 import org.apache.maven.plugin.MojoFailureException;
@@ -49,8 +48,8 @@ import org.apache.maven.project.MavenProject;
 import org.apache.maven.project.MavenProjectHelper;
 import org.mvel2.templates.TemplateRuntime;
 
-import static org.apache.camel.maven.packaging.PackageHelper.loadText;
-import static org.apache.camel.maven.packaging.PackageHelper.writeText;
+import static org.apache.camel.tooling.util.PackageHelper.loadText;
+import static org.apache.camel.tooling.util.PackageHelper.writeText;
 
 /**
  * Updates the documentation in:
@@ -183,7 +182,7 @@ public class UpdateDocExtensionsListMojo extends AbstractMojo {
 
             // how many deprecated
             long deprecated = components.stream()
-                    .filter(c -> "true".equals(c.getDeprecated()))
+                    .filter(ComponentModel::isDeprecated)
                     .count();
 
             // update the big readme file in the extensions dir
@@ -251,7 +250,7 @@ public class UpdateDocExtensionsListMojo extends AbstractMojo {
 
             // how many deprecated
             long deprecated = models.stream()
-                    .filter(m -> "true".equals(m.getDeprecated()))
+                    .filter(DataFormatModel::isDeprecated)
                     .count();
 
             // filter out camel-core
@@ -325,7 +324,7 @@ public class UpdateDocExtensionsListMojo extends AbstractMojo {
 
             // how many deprecated
             long deprecated = languages.stream()
-                    .filter(l -> "true".equals(l.getDeprecated()))
+                    .filter(LanguageModel::isDeprecated)
                     .count();
 
             // update the big readme file in the extensions dir
@@ -387,7 +386,7 @@ public class UpdateDocExtensionsListMojo extends AbstractMojo {
 
             // how many deprecated
             long deprecated = others.stream()
-                    .filter(o -> "true".equals(o.getDeprecated()))
+                    .filter(OtherModel::isDeprecated)
                     .count();
 
             // update the big readme file in the extensions dir
@@ -665,22 +664,22 @@ public class UpdateDocExtensionsListMojo extends AbstractMojo {
         List<Map<String, String>> rows = JSonSchemaHelper.parseJsonSchema("component", json, false);
 
         ComponentModel component = new ComponentModel();
-        component.setScheme(JSonSchemaHelper.getSafeValue("scheme", rows));
-        component.setSyntax(JSonSchemaHelper.getSafeValue("syntax", rows));
-        component.setAlternativeSyntax(JSonSchemaHelper.getSafeValue("alternativeSyntax", rows));
-        component.setAlternativeSchemes(JSonSchemaHelper.getSafeValue("alternativeSchemes", rows));
-        component.setTitle(JSonSchemaHelper.getSafeValue("title", rows));
-        component.setDescription(JSonSchemaHelper.getSafeValue("description", rows));
-        component.setFirstVersion(JSonSchemaHelper.getSafeValue("firstVersion", rows));
-        component.setLabel(JSonSchemaHelper.getSafeValue("label", rows));
-        component.setDeprecated(JSonSchemaHelper.getSafeValue("deprecated", rows));
-        component.setDeprecationNote(JSonSchemaHelper.getSafeValue("deprecationNote", rows));
-        component.setConsumerOnly(JSonSchemaHelper.getSafeValue("consumerOnly", rows));
-        component.setProducerOnly(JSonSchemaHelper.getSafeValue("producerOnly", rows));
-        component.setJavaType(JSonSchemaHelper.getSafeValue("javaType", rows));
-        component.setGroupId(JSonSchemaHelper.getSafeValue("groupId", rows));
-        component.setArtifactId(JSonSchemaHelper.getSafeValue("artifactId", rows));
-        component.setVersion(JSonSchemaHelper.getSafeValue("version", rows));
+        component.setScheme(getJSonValue("scheme", rows));
+        component.setSyntax(getJSonValue("syntax", rows));
+        component.setAlternativeSyntax(getJSonValue("alternativeSyntax", rows));
+        component.setAlternativeSchemes(getJSonValue("alternativeSchemes", rows));
+        component.setTitle(getJSonValue("title", rows));
+        component.setDescription(getJSonValue("description", rows));
+        component.setFirstVersion(getJSonValue("firstVersion", rows));
+        component.setLabel(getJSonValue("label", rows));
+        component.setDeprecated(Boolean.valueOf(getJSonValue("deprecated", rows)));
+        component.setDeprecationNote(getJSonValue("deprecationNote", rows));
+        component.setConsumerOnly(Boolean.valueOf(getJSonValue("consumerOnly", rows)));
+        component.setProducerOnly(Boolean.valueOf(getJSonValue("producerOnly", rows)));
+        component.setJavaType(getJSonValue("javaType", rows));
+        component.setGroupId(getJSonValue("groupId", rows));
+        component.setArtifactId(getJSonValue("artifactId", rows));
+        component.setVersion(getJSonValue("version", rows));
 
         return component;
     }
@@ -689,18 +688,18 @@ public class UpdateDocExtensionsListMojo extends AbstractMojo {
         List<Map<String, String>> rows = JSonSchemaHelper.parseJsonSchema("dataformat", json, false);
 
         DataFormatModel dataFormat = new DataFormatModel();
-        dataFormat.setName(JSonSchemaHelper.getSafeValue("name", rows));
-        dataFormat.setTitle(JSonSchemaHelper.getSafeValue("title", rows));
-        dataFormat.setModelName(JSonSchemaHelper.getSafeValue("modelName", rows));
-        dataFormat.setDescription(JSonSchemaHelper.getSafeValue("description", rows));
-        dataFormat.setFirstVersion(JSonSchemaHelper.getSafeValue("firstVersion", rows));
-        dataFormat.setLabel(JSonSchemaHelper.getSafeValue("label", rows));
-        dataFormat.setDeprecated(JSonSchemaHelper.getSafeValue("deprecated", rows));
-        dataFormat.setDeprecationNote(JSonSchemaHelper.getSafeValue("deprecationNote", rows));
-        dataFormat.setJavaType(JSonSchemaHelper.getSafeValue("javaType", rows));
-        dataFormat.setGroupId(JSonSchemaHelper.getSafeValue("groupId", rows));
-        dataFormat.setArtifactId(JSonSchemaHelper.getSafeValue("artifactId", rows));
-        dataFormat.setVersion(JSonSchemaHelper.getSafeValue("version", rows));
+        dataFormat.setName(getJSonValue("name", rows));
+        dataFormat.setTitle(getJSonValue("title", rows));
+        dataFormat.setModelName(getJSonValue("modelName", rows));
+        dataFormat.setDescription(getJSonValue("description", rows));
+        dataFormat.setFirstVersion(getJSonValue("firstVersion", rows));
+        dataFormat.setLabel(getJSonValue("label", rows));
+        dataFormat.setDeprecated(Boolean.valueOf(getJSonValue("deprecated", rows)));
+        dataFormat.setDeprecationNote(getJSonValue("deprecationNote", rows));
+        dataFormat.setJavaType(getJSonValue("javaType", rows));
+        dataFormat.setGroupId(getJSonValue("groupId", rows));
+        dataFormat.setArtifactId(getJSonValue("artifactId", rows));
+        dataFormat.setVersion(getJSonValue("version", rows));
 
         return dataFormat;
     }
@@ -709,18 +708,18 @@ public class UpdateDocExtensionsListMojo extends AbstractMojo {
         List<Map<String, String>> rows = JSonSchemaHelper.parseJsonSchema("language", json, false);
 
         LanguageModel language = new LanguageModel();
-        language.setTitle(JSonSchemaHelper.getSafeValue("title", rows));
-        language.setName(JSonSchemaHelper.getSafeValue("name", rows));
-        language.setModelName(JSonSchemaHelper.getSafeValue("modelName", rows));
-        language.setDescription(JSonSchemaHelper.getSafeValue("description", rows));
-        language.setFirstVersion(JSonSchemaHelper.getSafeValue("firstVersion", rows));
-        language.setLabel(JSonSchemaHelper.getSafeValue("label", rows));
-        language.setDeprecated(JSonSchemaHelper.getSafeValue("deprecated", rows));
-        language.setDeprecationNote(JSonSchemaHelper.getSafeValue("deprecationNote", rows));
-        language.setJavaType(JSonSchemaHelper.getSafeValue("javaType", rows));
-        language.setGroupId(JSonSchemaHelper.getSafeValue("groupId", rows));
-        language.setArtifactId(JSonSchemaHelper.getSafeValue("artifactId", rows));
-        language.setVersion(JSonSchemaHelper.getSafeValue("version", rows));
+        language.setTitle(getJSonValue("title", rows));
+        language.setName(getJSonValue("name", rows));
+        language.setModelName(getJSonValue("modelName", rows));
+        language.setDescription(getJSonValue("description", rows));
+        language.setFirstVersion(getJSonValue("firstVersion", rows));
+        language.setLabel(getJSonValue("label", rows));
+        language.setDeprecated(Boolean.valueOf(getJSonValue("deprecated", rows)));
+        language.setDeprecationNote(getJSonValue("deprecationNote", rows));
+        language.setJavaType(getJSonValue("javaType", rows));
+        language.setGroupId(getJSonValue("groupId", rows));
+        language.setArtifactId(getJSonValue("artifactId", rows));
+        language.setVersion(getJSonValue("version", rows));
 
         return language;
     }
@@ -729,20 +728,29 @@ public class UpdateDocExtensionsListMojo extends AbstractMojo {
         List<Map<String, String>> rows = JSonSchemaHelper.parseJsonSchema("other", json, false);
 
         OtherModel other = new OtherModel();
-        other.setName(JSonSchemaHelper.getSafeValue("name", rows));
-        other.setTitle(JSonSchemaHelper.getSafeValue("title", rows));
-        other.setDescription(JSonSchemaHelper.getSafeValue("description", rows));
-        other.setFirstVersion(JSonSchemaHelper.getSafeValue("firstVersion", rows));
-        other.setLabel(JSonSchemaHelper.getSafeValue("label", rows));
-        other.setDeprecated(JSonSchemaHelper.getSafeValue("deprecated", rows));
-        other.setDeprecationNote(JSonSchemaHelper.getSafeValue("deprecationNote", rows));
-        other.setGroupId(JSonSchemaHelper.getSafeValue("groupId", rows));
-        other.setArtifactId(JSonSchemaHelper.getSafeValue("artifactId", rows));
-        other.setVersion(JSonSchemaHelper.getSafeValue("version", rows));
+        other.setName(getJSonValue("name", rows));
+        other.setTitle(getJSonValue("title", rows));
+        other.setDescription(getJSonValue("description", rows));
+        other.setFirstVersion(getJSonValue("firstVersion", rows));
+        other.setLabel(getJSonValue("label", rows));
+        other.setDeprecated(Boolean.valueOf(getJSonValue("deprecated", rows)));
+        other.setDeprecationNote(getJSonValue("deprecationNote", rows));
+        other.setGroupId(getJSonValue("groupId", rows));
+        other.setArtifactId(getJSonValue("artifactId", rows));
+        other.setVersion(getJSonValue("version", rows));
 
         return other;
     }
 
+    private String getJSonValue(String key, List<Map<String, String>> rows) {
+        for (Map<String, String> row : rows) {
+            if (row.containsKey(key)) {
+                return row.get(key);
+            }
+        }
+        return "";
+    }
+
     private Path getExtensionsDocPath() {
         return Paths.get(websiteDocBaseDir.toString(), "extensions");
     }


[camel-quarkus] 01/02: Fix incompatibilities between Quarkus and Camel MongoDB dependencies

Posted by ja...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit bca04a493eee9e9f922a19541cd9fdb7bfe69930
Author: James Netherton <ja...@gmail.com>
AuthorDate: Thu Jan 23 15:11:07 2020 +0000

    Fix incompatibilities between Quarkus and Camel MongoDB dependencies
    
    fixes #544, #649
---
 .../mongodb/deployment/MongoDbProcessor.java       |  11 +-
 extensions/mongodb/runtime/pom.xml                 |   4 +-
 .../component/mongodb/CamelMongoClient.java        | 124 ---------------------
 .../mongodb/CamelMongoClientRecorder.java          |  29 -----
 .../graal/SubstituteMongoClientOptions.java        |  43 -------
 .../component/mongodb/it/MongoDbResource.java      |  10 --
 .../component/mongodb/it/MongoDbTestResource.java  |   4 +-
 pom.xml                                            |   8 ++
 poms/bom/pom.xml                                   |  25 +++++
 9 files changed, 39 insertions(+), 219 deletions(-)

diff --git a/extensions/mongodb/deployment/src/main/java/org/apache/camel/quarkus/component/mongodb/deployment/MongoDbProcessor.java b/extensions/mongodb/deployment/src/main/java/org/apache/camel/quarkus/component/mongodb/deployment/MongoDbProcessor.java
index f14c0c9..8f5a378 100644
--- a/extensions/mongodb/deployment/src/main/java/org/apache/camel/quarkus/component/mongodb/deployment/MongoDbProcessor.java
+++ b/extensions/mongodb/deployment/src/main/java/org/apache/camel/quarkus/component/mongodb/deployment/MongoDbProcessor.java
@@ -18,11 +18,8 @@ package org.apache.camel.quarkus.component.mongodb.deployment;
 
 import com.mongodb.MongoClient;
 import io.quarkus.deployment.annotations.BuildStep;
-import io.quarkus.deployment.annotations.ExecutionTime;
-import io.quarkus.deployment.annotations.Record;
 import io.quarkus.deployment.builditem.FeatureBuildItem;
 import io.quarkus.mongodb.deployment.MongoClientBuildItem;
-import org.apache.camel.quarkus.component.mongodb.CamelMongoClientRecorder;
 import org.apache.camel.quarkus.core.deployment.CamelRuntimeBeanBuildItem;
 
 class MongoDbProcessor {
@@ -35,11 +32,7 @@ class MongoDbProcessor {
     }
 
     @BuildStep
-    @Record(ExecutionTime.RUNTIME_INIT)
-    CamelRuntimeBeanBuildItem registerCamelMongoClientProducer(MongoClientBuildItem mongoClientBuildItem,
-            CamelMongoClientRecorder recorder) {
-
-        return new CamelRuntimeBeanBuildItem("camelMongoClient", MongoClient.class.getName(),
-                recorder.createCamelMongoClient(mongoClientBuildItem.getClient()));
+    CamelRuntimeBeanBuildItem registerCamelMongoClientProducer(MongoClientBuildItem mongoClientBuildItem) {
+        return new CamelRuntimeBeanBuildItem("camelMongoClient", MongoClient.class.getName(), mongoClientBuildItem.getClient());
     }
 }
diff --git a/extensions/mongodb/runtime/pom.xml b/extensions/mongodb/runtime/pom.xml
index 1216122..2517e80 100644
--- a/extensions/mongodb/runtime/pom.xml
+++ b/extensions/mongodb/runtime/pom.xml
@@ -63,8 +63,8 @@
             <artifactId>mongodb-driver-legacy</artifactId>
         </dependency>
         <dependency>
-            <groupId>com.oracle.substratevm</groupId>
-            <artifactId>svm</artifactId>
+            <groupId>org.mongodb</groupId>
+            <artifactId>mongodb-crypt</artifactId>
         </dependency>
     </dependencies>
 
diff --git a/extensions/mongodb/runtime/src/main/java/org/apache/camel/quarkus/component/mongodb/CamelMongoClient.java b/extensions/mongodb/runtime/src/main/java/org/apache/camel/quarkus/component/mongodb/CamelMongoClient.java
deleted file mode 100644
index a2f515f..0000000
--- a/extensions/mongodb/runtime/src/main/java/org/apache/camel/quarkus/component/mongodb/CamelMongoClient.java
+++ /dev/null
@@ -1,124 +0,0 @@
-/*
- * 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.mongodb;
-
-import java.util.List;
-
-import com.mongodb.ClientSessionOptions;
-import com.mongodb.client.ChangeStreamIterable;
-import com.mongodb.client.ClientSession;
-import com.mongodb.client.ListDatabasesIterable;
-import com.mongodb.client.MongoClient;
-import com.mongodb.client.MongoDatabase;
-import com.mongodb.client.MongoIterable;
-import org.bson.Document;
-import org.bson.conversions.Bson;
-
-/**
- * Bridges Mongo client types {@link com.mongodb.MongoClient} and {@link com.mongodb.client.MongoClient} used by the
- * Quarkus Mongo extension and the Camel MongoDB component, so that it can be looked up and used via the
- * connectionBean URI endpoint path parameter
- */
-public final class CamelMongoClient extends com.mongodb.MongoClient {
-
-    private final MongoClient delegate;
-
-    public CamelMongoClient(MongoClient delegate) {
-        this.delegate = delegate;
-    }
-
-    @Override
-    public MongoDatabase getDatabase(String databaseName) {
-        return delegate.getDatabase(databaseName);
-    }
-
-    @Override
-    public ClientSession startSession() {
-        return delegate.startSession();
-    }
-
-    @Override
-    public ClientSession startSession(ClientSessionOptions options) {
-        return delegate.startSession(options);
-    }
-
-    @Override
-    public void close() {
-        delegate.close();
-    }
-
-    @Override
-    public MongoIterable<String> listDatabaseNames() {
-        return delegate.listDatabaseNames();
-    }
-
-    @Override
-    public ListDatabasesIterable<Document> listDatabases(ClientSession clientSession) {
-        return delegate.listDatabases(clientSession);
-    }
-
-    @Override
-    public <T> ListDatabasesIterable<T> listDatabases(ClientSession clientSession, Class<T> clazz) {
-        return delegate.listDatabases(clientSession, clazz);
-    }
-
-    @Override
-    public <T> ListDatabasesIterable<T> listDatabases(Class<T> clazz) {
-        return delegate.listDatabases(clazz);
-    }
-
-    @Override
-    public ChangeStreamIterable<Document> watch() {
-        return delegate.watch();
-    }
-
-    @Override
-    public ChangeStreamIterable<Document> watch(List<? extends Bson> pipeline) {
-        return delegate.watch(pipeline);
-    }
-
-    @Override
-    public ChangeStreamIterable<Document> watch(ClientSession clientSession) {
-        return delegate.watch(clientSession);
-    }
-
-    @Override
-    public ChangeStreamIterable<Document> watch(ClientSession clientSession, List<? extends Bson> pipeline) {
-        return delegate.watch(clientSession, pipeline);
-    }
-
-    @Override
-    public <TResult> ChangeStreamIterable<TResult> watch(Class<TResult> resultClass) {
-        return delegate.watch(resultClass);
-    }
-
-    @Override
-    public <TResult> ChangeStreamIterable<TResult> watch(List<? extends Bson> pipeline, Class<TResult> resultClass) {
-        return delegate.watch(pipeline, resultClass);
-    }
-
-    @Override
-    public <TResult> ChangeStreamIterable<TResult> watch(ClientSession clientSession, Class<TResult> resultClass) {
-        return delegate.watch(clientSession, resultClass);
-    }
-
-    @Override
-    public <TResult> ChangeStreamIterable<TResult> watch(ClientSession clientSession, List<? extends Bson> pipeline,
-            Class<TResult> resultClass) {
-        return delegate.watch(clientSession, pipeline, resultClass);
-    }
-}
diff --git a/extensions/mongodb/runtime/src/main/java/org/apache/camel/quarkus/component/mongodb/CamelMongoClientRecorder.java b/extensions/mongodb/runtime/src/main/java/org/apache/camel/quarkus/component/mongodb/CamelMongoClientRecorder.java
deleted file mode 100644
index 371f72a..0000000
--- a/extensions/mongodb/runtime/src/main/java/org/apache/camel/quarkus/component/mongodb/CamelMongoClientRecorder.java
+++ /dev/null
@@ -1,29 +0,0 @@
-/*
- * 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.mongodb;
-
-import com.mongodb.client.MongoClient;
-import io.quarkus.runtime.RuntimeValue;
-import io.quarkus.runtime.annotations.Recorder;
-
-@Recorder
-public class CamelMongoClientRecorder {
-
-    public RuntimeValue<CamelMongoClient> createCamelMongoClient(RuntimeValue<MongoClient> client) {
-        return new RuntimeValue<>(new CamelMongoClient(client.getValue()));
-    }
-}
diff --git a/extensions/mongodb/runtime/src/main/java/org/apache/camel/quarkus/component/mongodb/graal/SubstituteMongoClientOptions.java b/extensions/mongodb/runtime/src/main/java/org/apache/camel/quarkus/component/mongodb/graal/SubstituteMongoClientOptions.java
deleted file mode 100644
index fbbc855..0000000
--- a/extensions/mongodb/runtime/src/main/java/org/apache/camel/quarkus/component/mongodb/graal/SubstituteMongoClientOptions.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
- * 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.mongodb.graal;
-
-import javax.net.SocketFactory;
-
-import com.mongodb.MongoClientOptions;
-import com.oracle.svm.core.annotate.Alias;
-import com.oracle.svm.core.annotate.Substitute;
-import com.oracle.svm.core.annotate.TargetClass;
-
-@TargetClass(MongoClientOptions.class)
-final class SubstituteMongoClientOptions {
-
-    @Alias
-    private SocketFactory socketFactory;
-
-    @Alias
-    private static SocketFactory DEFAULT_SOCKET_FACTORY;
-
-    @Substitute
-    public SocketFactory getSocketFactory() {
-        if (this.socketFactory != null) {
-            return this.socketFactory;
-        } else {
-            return DEFAULT_SOCKET_FACTORY;
-        }
-    }
-}
diff --git a/integration-tests/mongodb/src/main/java/org/apache/camel/quarkus/component/mongodb/it/MongoDbResource.java b/integration-tests/mongodb/src/main/java/org/apache/camel/quarkus/component/mongodb/it/MongoDbResource.java
index dbde877..c859969 100644
--- a/integration-tests/mongodb/src/main/java/org/apache/camel/quarkus/component/mongodb/it/MongoDbResource.java
+++ b/integration-tests/mongodb/src/main/java/org/apache/camel/quarkus/component/mongodb/it/MongoDbResource.java
@@ -21,7 +21,6 @@ import java.net.URISyntaxException;
 
 import javax.enterprise.context.ApplicationScoped;
 import javax.inject.Inject;
-import javax.inject.Named;
 import javax.json.Json;
 import javax.json.JsonArray;
 import javax.json.JsonArrayBuilder;
@@ -35,7 +34,6 @@ import javax.ws.rs.Produces;
 import javax.ws.rs.core.MediaType;
 import javax.ws.rs.core.Response;
 
-import com.mongodb.MongoClient;
 import com.mongodb.client.MongoCursor;
 import com.mongodb.client.MongoIterable;
 import org.apache.camel.ProducerTemplate;
@@ -84,12 +82,4 @@ public class MongoDbResource {
 
         return arrayBuilder.build();
     }
-
-    @javax.enterprise.inject.Produces
-    @Named("camelMongoClient")
-    public MongoClient camelMongoClient() {
-        return new MongoClient(
-                System.getProperty("camel.mongodb.test-host"),
-                Integer.getInteger("camel.mongodb.test-port"));
-    }
 }
diff --git a/integration-tests/mongodb/src/test/java/org/apache/camel/quarkus/component/mongodb/it/MongoDbTestResource.java b/integration-tests/mongodb/src/test/java/org/apache/camel/quarkus/component/mongodb/it/MongoDbTestResource.java
index b7a915f..cbbf45d 100644
--- a/integration-tests/mongodb/src/test/java/org/apache/camel/quarkus/component/mongodb/it/MongoDbTestResource.java
+++ b/integration-tests/mongodb/src/test/java/org/apache/camel/quarkus/component/mongodb/it/MongoDbTestResource.java
@@ -46,8 +46,8 @@ public class MongoDbTestResource implements ContainerResourceLifecycleManager {
             container.start();
 
             return CollectionHelper.mapOf(
-                    "camel.mongodb.test-port", container.getMappedPort(MONGODB_PORT).toString(),
-                    "camel.mongodb.test-host", container.getContainerIpAddress());
+                    "quarkus.mongodb.hosts",
+                    container.getContainerIpAddress() + ":" + container.getMappedPort(MONGODB_PORT).toString());
         } catch (Exception e) {
             throw new RuntimeException(e);
         }
diff --git a/pom.xml b/pom.xml
index 7a4d214..ab3a66f 100644
--- a/pom.xml
+++ b/pom.xml
@@ -54,6 +54,14 @@
         <retrofit.version>2.5.0</retrofit.version>
         <consul-client.version>1.3.3</consul-client.version>
 
+        <!-- These mongodb version properties should align with the Mongo client version used in Camel
+            TODO: Remove when Quarkus has upgraded its MongoDB client dependencies
+                - https://github.com/quarkusio/quarkus/issues/6418
+                - https://github.com/quarkusio/quarkus/pull/6347
+        -->
+        <mongodb.version>3.12.1</mongodb.version>
+        <mongodb-crypt.version>1.0.1</mongodb-crypt.version>
+
         <maven-compiler-plugin.version>3.8.0</maven-compiler-plugin.version>
         <maven.compiler.target>1.8</maven.compiler.target>
         <maven.compiler.source>1.8</maven.compiler.source>
diff --git a/poms/bom/pom.xml b/poms/bom/pom.xml
index 02f9fb0..d009459 100644
--- a/poms/bom/pom.xml
+++ b/poms/bom/pom.xml
@@ -997,6 +997,31 @@
                 <version>${kotlin.version}</version>
             </dependency>
             <dependency>
+                <groupId>org.mongodb</groupId>
+                <artifactId>mongodb-crypt</artifactId>
+                <version>${mongodb-crypt.version}</version>
+            </dependency>
+            <dependency>
+                <groupId>org.mongodb</groupId>
+                <artifactId>mongodb-driver-async</artifactId>
+                <version>${mongodb.version}</version>
+            </dependency>
+            <dependency>
+                <groupId>org.mongodb</groupId>
+                <artifactId>mongodb-driver-core</artifactId>
+                <version>${mongodb.version}</version>
+            </dependency>
+            <dependency>
+                <groupId>org.mongodb</groupId>
+                <artifactId>mongodb-driver-legacy</artifactId>
+                <version>${mongodb.version}</version>
+            </dependency>
+            <dependency>
+                <groupId>org.mongodb</groupId>
+                <artifactId>mongodb-driver-sync</artifactId>
+                <version>${mongodb.version}</version>
+            </dependency>
+            <dependency>
                 <groupId>org.springframework</groupId>
                 <artifactId>spring-core</artifactId>
                 <version>${spring.version}</version>