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/10/15 05:51:22 UTC

[camel-quarkus] branch camel-master updated (1fcf085 -> ed1eb3f)

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 1fcf085  Test Geocoder with Google maps mock API if GOOGLE_GEOCODER_API_KEY is not provided fixes #1860
 discard f38edfc  Shiro native support #1844
 discard 6c6e141  Upgrade to Camel 3.6.0
 discard 6dc1496  Remove createEndpoint method override in QuarkusVertxWebsocketComponent
 discard 8efdc55  Remove QuarkusVertxHttpBinding
     add 4517ace  Workaround AdviceWithRouteBuilder and MicroprofileMetrics conflict
     add 21339ca  pgevent: correct service name
     add 25a72bc  Upgrade Quarkus to 1.9.0.Final
     add dd6c3e7  Added nsq native support fixes #1722
     add 45c1d36  Updated CHANGELOG.md
     new 83d9c81  Remove QuarkusVertxHttpBinding
     new c52b178  Remove createEndpoint method override in QuarkusVertxWebsocketComponent
     new da775e6  Upgrade to Camel 3.6.0
     new 35110cf  Shiro native support #1844
     new ed1eb3f  Test Geocoder with Google maps mock API if GOOGLE_GEOCODER_API_KEY is not provided fixes #1860

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   (1fcf085)
            \
             N -- N -- N   refs/heads/camel-master (ed1eb3f)

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 5 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:
 CHANGELOG.md                                       |  11 +-
 .../ROOT/pages/reference/extensions/nsq.adoc       |   8 +-
 .../ROOT/partials/reference/components/nsq.adoc    |   6 +-
 .../component/nsq/deployment/NsqProcessor.java     |  46 --------
 extensions-jvm/nsq/integration-test/pom.xml        | 100 ----------------
 extensions-jvm/pom.xml                             |   1 -
 .../runtime/CamelMicroProfileMetricsRecorder.java  |   6 +-
 .../nsq/deployment/pom.xml                         |   0
 .../component/nsq/deployment/NsqProcessor.java}    |  18 ++-
 {extensions-jvm => extensions}/nsq/pom.xml         |   1 -
 {extensions-jvm => extensions}/nsq/runtime/pom.xml |  11 ++
 .../main/resources/META-INF/quarkus-extension.yaml |   3 +-
 .../pgevent/deployment/PgeventProcessor.java       |   8 +-
 extensions/pom.xml                                 |   1 +
 extensions/tika/deployment/pom.xml                 |   8 +-
 .../it/metrics/MicroProfileMetricsResource.java    |  14 +++
 .../metrics/MicroProfileMetricsRouteBuilder.java   |   3 +
 .../it/metrics/MicroProfileMetricsTest.java        |  13 ++-
 .../{univocity-parsers => nsq}/pom.xml             |  26 +++--
 .../camel/quarkus/component/nsq/it/NsqLogger.java  |  27 +++--
 .../quarkus/component/nsq/it/NsqResource.java      |  41 +++++--
 .../camel/quarkus/component/nsq/it/NsqRoute.java   |  80 +++++++++++++
 .../camel/quarkus/component/nsq/it/NsqIT.java}     |   4 +-
 .../camel/quarkus/component/nsq/it/NsqTest.java    | 129 +++++++++++++++++++++
 .../quarkus/component/nsq/it/NsqTestResource.java  | 110 ++++++++++++++++++
 integration-tests/pom.xml                          |   1 +
 integration-tests/tika/pom.xml                     |   8 +-
 pom.xml                                            |   2 +-
 tooling/scripts/test-categories.yaml               |   1 +
 29 files changed, 470 insertions(+), 217 deletions(-)
 delete mode 100644 extensions-jvm/nsq/deployment/src/main/java/org/apache/camel/quarkus/component/nsq/deployment/NsqProcessor.java
 delete mode 100644 extensions-jvm/nsq/integration-test/pom.xml
 rename {extensions-jvm => extensions}/nsq/deployment/pom.xml (100%)
 copy extensions/{nats/deployment/src/main/java/org/apache/camel/quarkus/component/nats/deployment/NatsProcessor.java => nsq/deployment/src/main/java/org/apache/camel/quarkus/component/nsq/deployment/NsqProcessor.java} (73%)
 rename {extensions-jvm => extensions}/nsq/pom.xml (97%)
 rename {extensions-jvm => extensions}/nsq/runtime/pom.xml (89%)
 rename {extensions-jvm => extensions}/nsq/runtime/src/main/resources/META-INF/quarkus-extension.yaml (97%)
 copy integration-tests/{univocity-parsers => nsq}/pom.xml (88%)
 rename extensions-jvm/nsq/integration-test/src/test/java/org/apache/camel/quarkus/component/nsq/it/NsqTest.java => integration-tests/nsq/src/main/java/org/apache/camel/quarkus/component/nsq/it/NsqLogger.java (59%)
 rename {extensions-jvm/nsq/integration-test => integration-tests/nsq}/src/main/java/org/apache/camel/quarkus/component/nsq/it/NsqResource.java (55%)
 create mode 100644 integration-tests/nsq/src/main/java/org/apache/camel/quarkus/component/nsq/it/NsqRoute.java
 copy integration-tests/{fop/src/test/java/org/apache/camel/quarkus/component/fop/it/FopIT.java => nsq/src/test/java/org/apache/camel/quarkus/component/nsq/it/NsqIT.java} (91%)
 create mode 100644 integration-tests/nsq/src/test/java/org/apache/camel/quarkus/component/nsq/it/NsqTest.java
 create mode 100644 integration-tests/nsq/src/test/java/org/apache/camel/quarkus/component/nsq/it/NsqTestResource.java


[camel-quarkus] 04/05: Shiro native support #1844

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 35110cfe432393dfb24dc31f81f5781807438605
Author: JiriOndrusek <on...@gmail.com>
AuthorDate: Wed Oct 7 08:46:23 2020 +0200

    Shiro native support #1844
---
 .../ROOT/pages/reference/extensions/shiro.adoc     |   8 +-
 .../ROOT/partials/reference/others/shiro.adoc      |   6 +-
 extensions-jvm/pom.xml                             |   1 -
 .../component/shiro/deployment/ShiroProcessor.java |  46 ---------
 .../quarkus/component/shiro/it/ShiroResource.java  |  48 ---------
 extensions/pom.xml                                 |   1 +
 .../shiro/deployment/pom.xml                       |   4 +
 .../component/shiro/deployment/ShiroProcessor.java |  75 ++++++++++++++
 {extensions-jvm => extensions}/shiro/pom.xml       |   1 -
 .../shiro/runtime/pom.xml                          |  20 ++++
 .../shiro/ReflectionBuilderSubstitute.java         |  24 ++---
 .../main/resources/META-INF/quarkus-extension.yaml |   3 +-
 integration-tests/pom.xml                          |   1 +
 .../shiro}/pom.xml                                 |  79 +++++++++++++-
 .../quarkus/component/shiro/it/ShiroResource.java  | 113 +++++++++++++++++++++
 .../component/shiro/it/ShiroRouteBuilder.java      |  71 +++++++++++++
 .../src/main/resources/application.properties      |  18 ++++
 .../src/main/resources/config/securityConfig.ini   |  29 +++---
 .../camel/quarkus/component/shiro/it/ShiroIT.java  |  16 +--
 .../quarkus/component/shiro/it/ShiroTest.java      |  96 +++++++++++++++++
 pom.xml                                            |   1 +
 tooling/scripts/test-categories.yaml               |   1 +
 22 files changed, 512 insertions(+), 150 deletions(-)

diff --git a/docs/modules/ROOT/pages/reference/extensions/shiro.adoc b/docs/modules/ROOT/pages/reference/extensions/shiro.adoc
index 386b160..3f336f7 100644
--- a/docs/modules/ROOT/pages/reference/extensions/shiro.adoc
+++ b/docs/modules/ROOT/pages/reference/extensions/shiro.adoc
@@ -2,15 +2,15 @@
 // This file was generated by camel-quarkus-maven-plugin:update-extension-doc-page
 = Shiro
 :cq-artifact-id: camel-quarkus-shiro
-:cq-native-supported: false
-:cq-status: Preview
+:cq-native-supported: true
+:cq-status: Stable
 :cq-description: Security using Shiro
 :cq-deprecated: false
 :cq-jvm-since: 1.2.0
-:cq-native-since: n/a
+:cq-native-since: 1.2.0
 
 [.badges]
-[.badge-key]##JVM since##[.badge-supported]##1.2.0## [.badge-key]##Native##[.badge-unsupported]##unsupported##
+[.badge-key]##JVM since##[.badge-supported]##1.2.0## [.badge-key]##Native since##[.badge-supported]##1.2.0##
 
 Security using Shiro
 
diff --git a/docs/modules/ROOT/partials/reference/others/shiro.adoc b/docs/modules/ROOT/partials/reference/others/shiro.adoc
index 730a8a1..c13328e 100644
--- a/docs/modules/ROOT/partials/reference/others/shiro.adoc
+++ b/docs/modules/ROOT/partials/reference/others/shiro.adoc
@@ -2,11 +2,11 @@
 // This file was generated by camel-quarkus-maven-plugin:update-extension-doc-page
 :cq-artifact-id: camel-quarkus-shiro
 :cq-artifact-id-base: shiro
-:cq-native-supported: false
-:cq-status: Preview
+:cq-native-supported: true
+:cq-status: Stable
 :cq-deprecated: false
 :cq-jvm-since: 1.2.0
-:cq-native-since: n/a
+:cq-native-since: 1.2.0
 :cq-camel-part-name: shiro
 :cq-camel-part-title: Shiro
 :cq-camel-part-description: Security using Shiro
diff --git a/extensions-jvm/pom.xml b/extensions-jvm/pom.xml
index 8e13181..51f07cf 100644
--- a/extensions-jvm/pom.xml
+++ b/extensions-jvm/pom.xml
@@ -125,7 +125,6 @@
         <module>saga</module>
         <module>saxon</module>
         <module>schematron</module>
-        <module>shiro</module>
         <module>sip</module>
         <module>smpp</module>
         <module>snmp</module>
diff --git a/extensions-jvm/shiro/deployment/src/main/java/org/apache/camel/quarkus/component/shiro/deployment/ShiroProcessor.java b/extensions-jvm/shiro/deployment/src/main/java/org/apache/camel/quarkus/component/shiro/deployment/ShiroProcessor.java
deleted file mode 100644
index 434e868..0000000
--- a/extensions-jvm/shiro/deployment/src/main/java/org/apache/camel/quarkus/component/shiro/deployment/ShiroProcessor.java
+++ /dev/null
@@ -1,46 +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.shiro.deployment;
-
-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.deployment.pkg.steps.NativeBuild;
-import org.apache.camel.quarkus.core.JvmOnlyRecorder;
-import org.jboss.logging.Logger;
-
-class ShiroProcessor {
-
-    private static final Logger LOG = Logger.getLogger(ShiroProcessor.class);
-    private static final String FEATURE = "camel-shiro";
-
-    @BuildStep
-    FeatureBuildItem feature() {
-        return new FeatureBuildItem(FEATURE);
-    }
-
-    /**
-     * Remove this once this extension starts supporting the native mode.
-     */
-    @BuildStep(onlyIf = NativeBuild.class)
-    @Record(value = ExecutionTime.RUNTIME_INIT)
-    void warnJvmInNative(JvmOnlyRecorder recorder) {
-        JvmOnlyRecorder.warnJvmInNative(LOG, FEATURE); // warn at build time
-        recorder.warnJvmInNative(FEATURE); // warn at runtime
-    }
-}
diff --git a/extensions-jvm/shiro/integration-test/src/main/java/org/apache/camel/quarkus/component/shiro/it/ShiroResource.java b/extensions-jvm/shiro/integration-test/src/main/java/org/apache/camel/quarkus/component/shiro/it/ShiroResource.java
deleted file mode 100644
index be8128c..0000000
--- a/extensions-jvm/shiro/integration-test/src/main/java/org/apache/camel/quarkus/component/shiro/it/ShiroResource.java
+++ /dev/null
@@ -1,48 +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.shiro.it;
-
-import javax.enterprise.context.ApplicationScoped;
-import javax.inject.Inject;
-import javax.ws.rs.GET;
-import javax.ws.rs.Path;
-import javax.ws.rs.Produces;
-import javax.ws.rs.core.MediaType;
-import javax.ws.rs.core.Response;
-
-import org.apache.camel.CamelContext;
-import org.jboss.logging.Logger;
-
-@Path("/shiro")
-@ApplicationScoped
-public class ShiroResource {
-
-    private static final Logger LOG = Logger.getLogger(ShiroResource.class);
-
-    private static final String OTHER_SHIRO = "shiro";
-    @Inject
-    CamelContext context;
-
-    @Path("/load/other/shiro")
-    @GET
-    @Produces(MediaType.TEXT_PLAIN)
-    public Response loadOtherShiro() throws Exception {
-        /* This is an autogenerated test */
-        /* No way to test a Camel artifact of kind "other" */
-        return Response.ok().build();
-    }
-}
diff --git a/extensions/pom.xml b/extensions/pom.xml
index 7f32cc9..e25da0f 100644
--- a/extensions/pom.xml
+++ b/extensions/pom.xml
@@ -176,6 +176,7 @@
         <module>seda</module>
         <module>servicenow</module>
         <module>servlet</module>
+        <module>shiro</module>
         <module>sjms</module>
         <module>sjms2</module>
         <module>slack</module>
diff --git a/extensions-jvm/shiro/deployment/pom.xml b/extensions/shiro/deployment/pom.xml
similarity index 93%
rename from extensions-jvm/shiro/deployment/pom.xml
rename to extensions/shiro/deployment/pom.xml
index 9bc2e07..d68ea16 100644
--- a/extensions-jvm/shiro/deployment/pom.xml
+++ b/extensions/shiro/deployment/pom.xml
@@ -38,6 +38,10 @@
         </dependency>
         <dependency>
             <groupId>org.apache.camel.quarkus</groupId>
+            <artifactId>camel-quarkus-support-commons-logging-deployment</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.camel.quarkus</groupId>
             <artifactId>camel-quarkus-shiro</artifactId>
         </dependency>
     </dependencies>
diff --git a/extensions/shiro/deployment/src/main/java/org/apache/camel/quarkus/component/shiro/deployment/ShiroProcessor.java b/extensions/shiro/deployment/src/main/java/org/apache/camel/quarkus/component/shiro/deployment/ShiroProcessor.java
new file mode 100644
index 0000000..f7afa46
--- /dev/null
+++ b/extensions/shiro/deployment/src/main/java/org/apache/camel/quarkus/component/shiro/deployment/ShiroProcessor.java
@@ -0,0 +1,75 @@
+/*
+ * 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.shiro.deployment;
+
+import java.sql.Time;
+import java.sql.Timestamp;
+import java.util.Calendar;
+import java.util.List;
+import java.util.stream.Collectors;
+
+import io.quarkus.deployment.annotations.BuildStep;
+import io.quarkus.deployment.builditem.CombinedIndexBuildItem;
+import io.quarkus.deployment.builditem.EnableAllSecurityServicesBuildItem;
+import io.quarkus.deployment.builditem.FeatureBuildItem;
+import io.quarkus.deployment.builditem.IndexDependencyBuildItem;
+import io.quarkus.deployment.builditem.nativeimage.ReflectiveClassBuildItem;
+import org.apache.camel.CamelAuthorizationException;
+import org.apache.shiro.ShiroException;
+import org.jboss.jandex.DotName;
+
+class ShiroProcessor {
+
+    private static final String FEATURE = "camel-shiro";
+
+    private static final DotName SHIRO_EXCEPTION_NAME = DotName.createSimple(ShiroException.class.getName());
+
+    @BuildStep
+    FeatureBuildItem feature() {
+        return new FeatureBuildItem(FEATURE);
+    }
+
+    @BuildStep
+    EnableAllSecurityServicesBuildItem enableAllSecurity() {
+        return new EnableAllSecurityServicesBuildItem();
+    }
+
+    @BuildStep
+    ReflectiveClassBuildItem registerForReflection(CombinedIndexBuildItem combinedIndex) {
+        List<String> dtos = combinedIndex.getIndex()
+                .getAllKnownSubclasses(SHIRO_EXCEPTION_NAME)
+                .stream()
+                .map(c -> c.name().toString())
+                .filter(n -> n.startsWith("org.apache.shiro.auth"))
+                .collect(Collectors.toList());
+
+        dtos.add(CamelAuthorizationException.class.getName());
+        dtos.add(Float[].class.getName());
+        dtos.add(java.util.Date[].class.getName());
+        dtos.add(Calendar[].class.getName());
+        dtos.add(java.sql.Date[].class.getName());
+        dtos.add(Time[].class.getName());
+        dtos.add(Timestamp[].class.getName());
+
+        return new ReflectiveClassBuildItem(false, false, dtos.toArray(new String[dtos.size()]));
+    }
+
+    @BuildStep
+    IndexDependencyBuildItem registerDependencyForIndex() {
+        return new IndexDependencyBuildItem("org.apache.shiro", "shiro-core");
+    }
+}
diff --git a/extensions-jvm/shiro/pom.xml b/extensions/shiro/pom.xml
similarity index 97%
rename from extensions-jvm/shiro/pom.xml
rename to extensions/shiro/pom.xml
index f3bb2d3..687d54f 100644
--- a/extensions-jvm/shiro/pom.xml
+++ b/extensions/shiro/pom.xml
@@ -35,6 +35,5 @@
     <modules>
         <module>deployment</module>
         <module>runtime</module>
-        <module>integration-test</module>
     </modules>
 </project>
diff --git a/extensions-jvm/shiro/runtime/pom.xml b/extensions/shiro/runtime/pom.xml
similarity index 82%
rename from extensions-jvm/shiro/runtime/pom.xml
rename to extensions/shiro/runtime/pom.xml
index 6e3f15c..3e56fdc 100644
--- a/extensions-jvm/shiro/runtime/pom.xml
+++ b/extensions/shiro/runtime/pom.xml
@@ -34,6 +34,7 @@
 
     <properties>
         <camel.quarkus.jvmSince>1.2.0</camel.quarkus.jvmSince>
+        <camel.quarkus.nativeSince>1.2.0</camel.quarkus.nativeSince>
     </properties>
 
     <dependencyManagement>
@@ -57,6 +58,25 @@
             <groupId>org.apache.camel</groupId>
             <artifactId>camel-shiro</artifactId>
         </dependency>
+        <dependency>
+            <groupId>org.apache.camel.quarkus</groupId>
+            <artifactId>camel-quarkus-support-commons-logging</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>commons-beanutils</groupId>
+            <artifactId>commons-beanutils</artifactId>
+            <exclusions>
+                <exclusion>
+                    <groupId>commons-logging</groupId>
+                    <artifactId>commons-logging</artifactId>
+                </exclusion>
+            </exclusions>
+        </dependency>
+        <dependency>
+            <groupId>org.graalvm.nativeimage</groupId>
+            <artifactId>svm</artifactId>
+            <scope>provided</scope>
+        </dependency>
     </dependencies>
 
     <build>
diff --git a/extensions-jvm/shiro/integration-test/src/test/java/org/apache/camel/quarkus/component/shiro/it/ShiroTest.java b/extensions/shiro/runtime/src/main/java/org/apache/camel/quarkus/component/shiro/ReflectionBuilderSubstitute.java
similarity index 62%
copy from extensions-jvm/shiro/integration-test/src/test/java/org/apache/camel/quarkus/component/shiro/it/ShiroTest.java
copy to extensions/shiro/runtime/src/main/java/org/apache/camel/quarkus/component/shiro/ReflectionBuilderSubstitute.java
index b2dd9f8..10c7342 100644
--- a/extensions-jvm/shiro/integration-test/src/test/java/org/apache/camel/quarkus/component/shiro/it/ShiroTest.java
+++ b/extensions/shiro/runtime/src/main/java/org/apache/camel/quarkus/component/shiro/ReflectionBuilderSubstitute.java
@@ -14,21 +14,19 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.camel.quarkus.component.shiro.it;
+package org.apache.camel.quarkus.component.shiro;
 
-import io.quarkus.test.junit.QuarkusTest;
-import io.restassured.RestAssured;
-import org.junit.jupiter.api.Test;
+import com.oracle.svm.core.annotate.Substitute;
+import com.oracle.svm.core.annotate.TargetClass;
+import org.apache.shiro.config.DefaultInterpolator;
+import org.apache.shiro.config.Interpolator;
+import org.apache.shiro.config.ReflectionBuilder;
 
-@QuarkusTest
-class ShiroTest {
+@TargetClass(value = ReflectionBuilder.class)
+final class ReflectionBuilderSubstitute {
 
-    @Test
-    public void loadOtherShiro() {
-        /* A simple autogenerated test */
-        RestAssured.get("/shiro/load/other/shiro")
-                .then()
-                .statusCode(200);
+    @Substitute
+    private Interpolator createInterpolator() {
+        return new DefaultInterpolator();
     }
-
 }
diff --git a/extensions-jvm/shiro/runtime/src/main/resources/META-INF/quarkus-extension.yaml b/extensions/shiro/runtime/src/main/resources/META-INF/quarkus-extension.yaml
similarity index 97%
copy from extensions-jvm/shiro/runtime/src/main/resources/META-INF/quarkus-extension.yaml
copy to extensions/shiro/runtime/src/main/resources/META-INF/quarkus-extension.yaml
index 474ba52..cd43d12 100644
--- a/extensions-jvm/shiro/runtime/src/main/resources/META-INF/quarkus-extension.yaml
+++ b/extensions/shiro/runtime/src/main/resources/META-INF/quarkus-extension.yaml
@@ -24,9 +24,8 @@
 name: "Camel Shiro"
 description: "Security using Shiro"
 metadata:
-  unlisted: true
   guide: "https://camel.apache.org/camel-quarkus/latest/reference/extensions/shiro.html"
   categories:
   - "integration"
   status:
-  - "preview"
+  - "stable"
diff --git a/integration-tests/pom.xml b/integration-tests/pom.xml
index b135a0c..aa180d8 100644
--- a/integration-tests/pom.xml
+++ b/integration-tests/pom.xml
@@ -148,6 +148,7 @@
         <module>send-dynamic-http</module>
         <module>servicenow</module>
         <module>servlet</module>
+        <module>shiro</module>
         <module>slack</module>
         <module>smallrye-reactive-messaging</module>
         <module>soap</module>
diff --git a/extensions-jvm/shiro/integration-test/pom.xml b/integration-tests/shiro/pom.xml
similarity index 55%
rename from extensions-jvm/shiro/integration-test/pom.xml
rename to integration-tests/shiro/pom.xml
index c73bcea..1e4af45 100644
--- a/extensions-jvm/shiro/integration-test/pom.xml
+++ b/integration-tests/shiro/pom.xml
@@ -23,13 +23,13 @@
     <modelVersion>4.0.0</modelVersion>
     <parent>
         <groupId>org.apache.camel.quarkus</groupId>
-        <artifactId>camel-quarkus-build-parent-it</artifactId>
+        <artifactId>camel-quarkus-integration-tests</artifactId>
         <version>1.2.0-SNAPSHOT</version>
-        <relativePath>../../../poms/build-parent-it/pom.xml</relativePath>
+        <relativePath>../pom.xml</relativePath>
     </parent>
 
-    <artifactId>camel-quarkus-shiro-integration-test</artifactId>
-    <name>Camel Quarkus :: Shiro :: Integration Test</name>
+    <artifactId>camel-quarkus-integration-test-shiro</artifactId>
+    <name>Camel Quarkus :: Integration Tests :: Shiro</name>
     <description>Integration tests for Camel Quarkus Shiro extension</description>
 
     <dependencyManagement>
@@ -53,6 +53,18 @@
             <groupId>io.quarkus</groupId>
             <artifactId>quarkus-resteasy</artifactId>
         </dependency>
+        <dependency>
+            <groupId>io.quarkus</groupId>
+            <artifactId>quarkus-resteasy-jackson</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.camel.quarkus</groupId>
+            <artifactId>camel-quarkus-direct</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.camel.quarkus</groupId>
+            <artifactId>camel-quarkus-mock</artifactId>
+        </dependency>
 
         <!-- test dependencies -->
         <dependency>
@@ -69,6 +81,34 @@
         <!-- The following dependencies guarantee that this module is built after them. You can update them by running `mvn process-resources -Pformat -N` from the source tree root directory -->
         <dependency>
             <groupId>org.apache.camel.quarkus</groupId>
+            <artifactId>camel-quarkus-direct-deployment</artifactId>
+            <version>${project.version}</version>
+            <type>pom</type>
+            <scope>test</scope>
+            <exclusions>
+                <exclusion>
+                    <groupId>*</groupId>
+                    <artifactId>*</artifactId>
+                </exclusion>
+            </exclusions>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.camel.quarkus</groupId>
+            <artifactId>camel-quarkus-mock-deployment</artifactId>
+            <version>${project.version}</version>
+            <type>pom</type>
+            <scope>test</scope>
+            <exclusions>
+                <exclusion>
+                    <groupId>*</groupId>
+                    <artifactId>*</artifactId>
+                </exclusion>
+            </exclusions>
+        </dependency>
+
+        <!-- The following dependencies guarantee that this module is built after them. You can update them by running `mvn process-resources -Pformat -N` from the source tree root directory -->
+        <dependency>
+            <groupId>org.apache.camel.quarkus</groupId>
             <artifactId>camel-quarkus-shiro-deployment</artifactId>
             <version>${project.version}</version>
             <type>pom</type>
@@ -97,4 +137,35 @@
             </plugin>
         </plugins>
     </build>
+
+    <profiles>
+        <profile>
+            <id>native</id>
+            <activation>
+                <property>
+                    <name>native</name>
+                </property>
+            </activation>
+            <properties>
+                <quarkus.package.type>native</quarkus.package.type>
+            </properties>
+            <build>
+                <plugins>
+                    <plugin>
+                        <groupId>org.apache.maven.plugins</groupId>
+                        <artifactId>maven-failsafe-plugin</artifactId>
+                        <executions>
+                            <execution>
+                                <goals>
+                                    <goal>integration-test</goal>
+                                    <goal>verify</goal>
+                                </goals>
+                            </execution>
+                        </executions>
+                    </plugin>
+                </plugins>
+            </build>
+        </profile>
+    </profiles>
+
 </project>
diff --git a/integration-tests/shiro/src/main/java/org/apache/camel/quarkus/component/shiro/it/ShiroResource.java b/integration-tests/shiro/src/main/java/org/apache/camel/quarkus/component/shiro/it/ShiroResource.java
new file mode 100644
index 0000000..e875523
--- /dev/null
+++ b/integration-tests/shiro/src/main/java/org/apache/camel/quarkus/component/shiro/it/ShiroResource.java
@@ -0,0 +1,113 @@
+/*
+ * 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.shiro.it;
+
+import javax.enterprise.context.ApplicationScoped;
+import javax.inject.Inject;
+import javax.ws.rs.Consumes;
+import javax.ws.rs.POST;
+import javax.ws.rs.Path;
+import javax.ws.rs.QueryParam;
+import javax.ws.rs.core.MediaType;
+
+import org.apache.camel.CamelContext;
+import org.apache.camel.Processor;
+import org.apache.camel.ProducerTemplate;
+import org.apache.camel.component.mock.MockEndpoint;
+import org.apache.camel.component.shiro.security.ShiroSecurityConstants;
+import org.apache.camel.component.shiro.security.ShiroSecurityToken;
+import org.apache.camel.component.shiro.security.ShiroSecurityTokenInjector;
+import org.jboss.logging.Logger;
+
+@Path("/shiro")
+@ApplicationScoped
+public class ShiroResource {
+
+    private static final Logger LOG = Logger.getLogger(ShiroResource.class);
+
+    public static byte[] passPhrase = {
+            (byte) 0x08, (byte) 0x09, (byte) 0x0A, (byte) 0x0B,
+            (byte) 0x0C, (byte) 0x0D, (byte) 0x0E, (byte) 0x0F,
+            (byte) 0x10, (byte) 0x11, (byte) 0x12, (byte) 0x13,
+            (byte) 0x14, (byte) 0x15, (byte) 0x16, (byte) 0x17 };
+
+    @Inject
+    ProducerTemplate producerTemplate;
+
+    @Inject
+    CamelContext context;
+
+    @Path("/headers")
+    @POST
+    @Consumes(MediaType.APPLICATION_JSON)
+    public void headers(ShiroSecurityToken shiroSecurityToken, @QueryParam("expectSuccess") boolean expectSuccess,
+            @QueryParam("path") String path)
+            throws Exception {
+        verifyMock(path, expectSuccess, exchange -> {
+            exchange.getIn().setHeader(ShiroSecurityConstants.SHIRO_SECURITY_USERNAME, shiroSecurityToken.getUsername());
+            exchange.getIn().setHeader(ShiroSecurityConstants.SHIRO_SECURITY_PASSWORD, shiroSecurityToken.getPassword());
+        });
+    }
+
+    @Path("/token")
+    @POST
+    @Consumes(MediaType.APPLICATION_JSON)
+    public void token(ShiroSecurityToken shiroSecurityToken, @QueryParam("expectSuccess") boolean expectSuccess,
+            @QueryParam("path") String path)
+            throws Exception {
+
+        verifyMock(path, expectSuccess,
+                exchange -> exchange.getIn().setHeader(ShiroSecurityConstants.SHIRO_SECURITY_TOKEN, shiroSecurityToken));
+    }
+
+    @Path("/base64")
+    @POST
+    @Consumes(MediaType.APPLICATION_JSON)
+    public void base64(ShiroSecurityToken shiroSecurityToken, @QueryParam("expectSuccess") boolean expectSuccess,
+            @QueryParam("path") String path)
+            throws Exception {
+        ShiroSecurityTokenInjector shiroSecurityTokenInjector = new ShiroSecurityTokenInjector(shiroSecurityToken,
+                passPhrase);
+        shiroSecurityTokenInjector.setBase64(true);
+
+        verifyMock(path, expectSuccess, shiroSecurityTokenInjector);
+    }
+
+    public void verifyMock(String path, boolean expectSuccess, Processor processor) throws Exception {
+
+        MockEndpoint mockEndpointSuccess = context.getEndpoint("mock:success", MockEndpoint.class);
+        MockEndpoint mockEndpointFailure = context.getEndpoint("mock:authenticationException", MockEndpoint.class);
+
+        mockEndpointSuccess.reset();
+        mockEndpointFailure.reset();
+
+        mockEndpointSuccess.expectedMessageCount(expectSuccess ? 1 : 0);
+        mockEndpointFailure.expectedMessageCount(expectSuccess ? 0 : 1);
+
+        try {
+            producerTemplate.send(path, processor);
+        } catch (Exception e) {
+            if (expectSuccess) {
+                throw e;
+            }
+        }
+
+        mockEndpointSuccess.assertIsSatisfied();
+        mockEndpointFailure.assertIsSatisfied();
+    }
+
+}
diff --git a/integration-tests/shiro/src/main/java/org/apache/camel/quarkus/component/shiro/it/ShiroRouteBuilder.java b/integration-tests/shiro/src/main/java/org/apache/camel/quarkus/component/shiro/it/ShiroRouteBuilder.java
new file mode 100644
index 0000000..f28abf7
--- /dev/null
+++ b/integration-tests/shiro/src/main/java/org/apache/camel/quarkus/component/shiro/it/ShiroRouteBuilder.java
@@ -0,0 +1,71 @@
+/*
+ * 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.shiro.it;
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+
+import org.apache.camel.CamelAuthorizationException;
+import org.apache.camel.builder.RouteBuilder;
+import org.apache.camel.component.shiro.security.ShiroSecurityPolicy;
+import org.apache.shiro.authc.AuthenticationException;
+import org.apache.shiro.authc.IncorrectCredentialsException;
+import org.apache.shiro.authc.LockedAccountException;
+import org.apache.shiro.authc.UnknownAccountException;
+import org.apache.shiro.authz.Permission;
+import org.apache.shiro.authz.permission.WildcardPermission;
+
+public class ShiroRouteBuilder extends RouteBuilder {
+    public static final String DIRECT_SECURE_ENDPOINT = "direct:secureEndpoint";
+    public static final String DIRECT_SECURE_WITH_ROLES = "direct:secureWithRoles";
+    public static final String DIRECT_SECURE_WITH_PERMISSIONS = "direct:secureWithPermissions";
+
+    @Override
+    public void configure() throws Exception {
+        String securityConfig = "classpath:config/securityConfig.ini";
+
+        onException(CamelAuthorizationException.class, UnknownAccountException.class, IncorrectCredentialsException.class,
+                LockedAccountException.class, AuthenticationException.class).to("mock:authenticationException");
+        //policy ignores roles or permissions
+        final ShiroSecurityPolicy securityPolicy = new ShiroSecurityPolicy(securityConfig, ShiroResource.passPhrase);
+        securityPolicy.setBase64(true);
+
+        from(DIRECT_SECURE_ENDPOINT).policy(securityPolicy).to("mock:success");
+
+        //policy respects roles
+        List<String> rolesList = new ArrayList<>();
+        rolesList.add("sec-level2");
+        rolesList.add("sec-level3");
+
+        final ShiroSecurityPolicy securityPolicyWithRoles = new ShiroSecurityPolicy(securityConfig,
+                ShiroResource.passPhrase,
+                true);
+        securityPolicyWithRoles.setRolesList(rolesList);
+
+        from(DIRECT_SECURE_WITH_ROLES).policy(securityPolicyWithRoles).to("mock:success");
+
+        //policy respects permissions
+        List<Permission> permissionsList = Collections.singletonList(new WildcardPermission("earth1:writeonly:*"));
+
+        final ShiroSecurityPolicy securityPolicyWithPermissions = new ShiroSecurityPolicy(securityConfig,
+                ShiroResource.passPhrase, true, permissionsList);
+
+        from(DIRECT_SECURE_WITH_PERMISSIONS).policy(securityPolicyWithPermissions).to("mock:success");
+
+    }
+}
diff --git a/integration-tests/shiro/src/main/resources/application.properties b/integration-tests/shiro/src/main/resources/application.properties
new file mode 100644
index 0000000..a2f7d33
--- /dev/null
+++ b/integration-tests/shiro/src/main/resources/application.properties
@@ -0,0 +1,18 @@
+## ---------------------------------------------------------------------------
+## 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.
+## ---------------------------------------------------------------------------
+
+quarkus.camel.native.resources.include-patterns = config/*
diff --git a/extensions-jvm/shiro/runtime/src/main/resources/META-INF/quarkus-extension.yaml b/integration-tests/shiro/src/main/resources/config/securityConfig.ini
similarity index 66%
rename from extensions-jvm/shiro/runtime/src/main/resources/META-INF/quarkus-extension.yaml
rename to integration-tests/shiro/src/main/resources/config/securityConfig.ini
index 474ba52..70d181d 100644
--- a/extensions-jvm/shiro/runtime/src/main/resources/META-INF/quarkus-extension.yaml
+++ b/integration-tests/shiro/src/main/resources/config/securityConfig.ini
@@ -15,18 +15,17 @@
 # limitations under the License.
 #
 
-# This is a generated file. Do not edit directly!
-# To re-generate, run the following command from the top level directory:
-#
-#   mvn -N cq:update-quarkus-metadata
-#
----
-name: "Camel Shiro"
-description: "Security using Shiro"
-metadata:
-  unlisted: true
-  guide: "https://camel.apache.org/camel-quarkus/latest/reference/extensions/shiro.html"
-  categories:
-  - "integration"
-  status:
-  - "preview"
+[users]
+sheldon = earth2, sec-level1
+irma = password, sec-level2
+fred = fred, sec-level3
+
+[roles]
+# 'sec-level3' role has all permissions, indicated by the wildcard '*'
+sec-level3 = *
+
+# The 'sec-level2' role can do anything with access of permission readonly (*) to help
+sec-level2 = earth1:*
+
+# The 'sec-level1' role can do anything with access of permission readonly
+sec-level1 = earth1:readonly:*
\ No newline at end of file
diff --git a/extensions-jvm/shiro/integration-test/src/test/java/org/apache/camel/quarkus/component/shiro/it/ShiroTest.java b/integration-tests/shiro/src/test/java/org/apache/camel/quarkus/component/shiro/it/ShiroIT.java
similarity index 71%
rename from extensions-jvm/shiro/integration-test/src/test/java/org/apache/camel/quarkus/component/shiro/it/ShiroTest.java
rename to integration-tests/shiro/src/test/java/org/apache/camel/quarkus/component/shiro/it/ShiroIT.java
index b2dd9f8..613c45b 100644
--- a/extensions-jvm/shiro/integration-test/src/test/java/org/apache/camel/quarkus/component/shiro/it/ShiroTest.java
+++ b/integration-tests/shiro/src/test/java/org/apache/camel/quarkus/component/shiro/it/ShiroIT.java
@@ -16,19 +16,9 @@
  */
 package org.apache.camel.quarkus.component.shiro.it;
 
-import io.quarkus.test.junit.QuarkusTest;
-import io.restassured.RestAssured;
-import org.junit.jupiter.api.Test;
+import io.quarkus.test.junit.NativeImageTest;
 
-@QuarkusTest
-class ShiroTest {
-
-    @Test
-    public void loadOtherShiro() {
-        /* A simple autogenerated test */
-        RestAssured.get("/shiro/load/other/shiro")
-                .then()
-                .statusCode(200);
-    }
+@NativeImageTest
+class ShiroIT extends ShiroTest {
 
 }
diff --git a/integration-tests/shiro/src/test/java/org/apache/camel/quarkus/component/shiro/it/ShiroTest.java b/integration-tests/shiro/src/test/java/org/apache/camel/quarkus/component/shiro/it/ShiroTest.java
new file mode 100644
index 0000000..a88ac31
--- /dev/null
+++ b/integration-tests/shiro/src/test/java/org/apache/camel/quarkus/component/shiro/it/ShiroTest.java
@@ -0,0 +1,96 @@
+/*
+ * 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.shiro.it;
+
+import io.quarkus.test.junit.QuarkusTest;
+import io.restassured.RestAssured;
+import io.restassured.http.ContentType;
+import org.apache.camel.component.shiro.security.ShiroSecurityToken;
+import org.junit.jupiter.api.Test;
+
+@QuarkusTest
+class ShiroTest {
+
+    enum AUTHORIZATION {
+        none(ShiroRouteBuilder.DIRECT_SECURE_ENDPOINT),
+        roles(ShiroRouteBuilder.DIRECT_SECURE_WITH_ROLES),
+        permissions(ShiroRouteBuilder.DIRECT_SECURE_WITH_PERMISSIONS);
+
+        private String path;
+
+        AUTHORIZATION(String path) {
+            this.path = path;
+        }
+
+        public String getPath() {
+            return path;
+        }
+    }
+
+    static ShiroSecurityToken SHELDON_TOKEN = new ShiroSecurityToken("sheldon", "earth2");
+    private static ShiroSecurityToken IRMA_TOKEN = new ShiroSecurityToken("irma", "password");
+    private static ShiroSecurityToken FRED_TOKEN = new ShiroSecurityToken("fred", "fred");
+    private static ShiroSecurityToken SEC_LEVEL1 = SHELDON_TOKEN;
+    private static ShiroSecurityToken SEC_LEVEL2 = IRMA_TOKEN;
+    private static ShiroSecurityToken SEC_LEVEL3 = FRED_TOKEN;
+    private static ShiroSecurityToken WRONG_TOKEN = new ShiroSecurityToken("sheldon", "wrong");
+
+    @Test
+    public void testHeaders() {
+        test("headers", SHELDON_TOKEN, AUTHORIZATION.none, true);
+        test("headers", WRONG_TOKEN, AUTHORIZATION.none, false);
+    }
+
+    @Test
+    public void testToken() {
+        test("token", IRMA_TOKEN, AUTHORIZATION.none, true);
+        test("token", WRONG_TOKEN, AUTHORIZATION.none, false);
+    }
+
+    @Test
+    public void testBase64() {
+        test("base64", FRED_TOKEN, AUTHORIZATION.none, true);
+        test("base64", WRONG_TOKEN, AUTHORIZATION.none, false);
+    }
+
+    @Test
+    public void testTokenWithRoles() {
+        test("headers", SEC_LEVEL1, AUTHORIZATION.roles, false);
+        test("token", SEC_LEVEL2, AUTHORIZATION.roles, true);
+        test("token", SEC_LEVEL3, AUTHORIZATION.roles, true);
+    }
+
+    @Test
+    public void testTokenWithPermissions() {
+        test("token", SEC_LEVEL1, AUTHORIZATION.permissions, false);
+        test("headers", SEC_LEVEL2, AUTHORIZATION.permissions, true);
+        test("headers", SEC_LEVEL3, AUTHORIZATION.permissions, true);
+    }
+
+    void test(String path, ShiroSecurityToken token, AUTHORIZATION authorization, boolean expectSuccess) {
+
+        RestAssured.given()
+                .queryParam("expectSuccess", expectSuccess)
+                .queryParam("path", authorization.getPath())
+                .contentType(ContentType.JSON)
+                .body(token)
+                .post("/shiro/" + path)
+                .then()
+                .statusCode(204);
+    }
+
+}
diff --git a/pom.xml b/pom.xml
index ba64057..6506b60 100644
--- a/pom.xml
+++ b/pom.xml
@@ -442,6 +442,7 @@
                             <Jenkinsfile.quarkus>SLASHSTAR_STYLE</Jenkinsfile.quarkus>
                             <properties>CAMEL_PROPERTIES_STYLE</properties>
                             <rnc>SCRIPT_STYLE</rnc>
+                            <ini>SCRIPT_STYLE</ini>
                             <rng>XML_STYLE</rng>
                             <spring.factories>CAMEL_PROPERTIES_STYLE</spring.factories>
                             <spring.provides>CAMEL_PROPERTIES_STYLE</spring.provides>
diff --git a/tooling/scripts/test-categories.yaml b/tooling/scripts/test-categories.yaml
index f171e5e..8634b29 100644
--- a/tooling/scripts/test-categories.yaml
+++ b/tooling/scripts/test-categories.yaml
@@ -106,6 +106,7 @@ misc:
   - mustache
   - pdf
   - qute
+  - shiro
   - stringtemplate
   - tika
   - velocity


[camel-quarkus] 02/05: Remove createEndpoint method override in QuarkusVertxWebsocketComponent

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 c52b1782a18aaf084b7f0dcfc35a962304211b42
Author: James Netherton <ja...@gmail.com>
AuthorDate: Wed Sep 9 07:39:50 2020 +0100

    Remove createEndpoint method override in QuarkusVertxWebsocketComponent
    
    Fixes #1737
---
 .../vertx/websocket/VertxWebsocketRecorder.java       | 19 ++-----------------
 1 file changed, 2 insertions(+), 17 deletions(-)

diff --git a/extensions/vertx-websocket/runtime/src/main/java/org/apache/camel/quarkus/component/vertx/websocket/VertxWebsocketRecorder.java b/extensions/vertx-websocket/runtime/src/main/java/org/apache/camel/quarkus/component/vertx/websocket/VertxWebsocketRecorder.java
index fc40cc3..b93011b 100644
--- a/extensions/vertx-websocket/runtime/src/main/java/org/apache/camel/quarkus/component/vertx/websocket/VertxWebsocketRecorder.java
+++ b/extensions/vertx-websocket/runtime/src/main/java/org/apache/camel/quarkus/component/vertx/websocket/VertxWebsocketRecorder.java
@@ -16,16 +16,13 @@
  */
 package org.apache.camel.quarkus.component.vertx.websocket;
 
-import java.util.Map;
 import java.util.concurrent.ExecutionException;
 
 import io.quarkus.runtime.RuntimeValue;
 import io.quarkus.runtime.annotations.Recorder;
 import io.vertx.core.Vertx;
 import io.vertx.ext.web.Router;
-import org.apache.camel.Endpoint;
 import org.apache.camel.component.vertx.websocket.VertxWebsocketComponent;
-import org.apache.camel.component.vertx.websocket.VertxWebsocketEndpoint;
 import org.apache.camel.component.vertx.websocket.VertxWebsocketHost;
 import org.apache.camel.component.vertx.websocket.VertxWebsocketHostConfiguration;
 import org.apache.camel.component.vertx.websocket.VertxWebsocketHostKey;
@@ -35,25 +32,13 @@ public class VertxWebsocketRecorder {
 
     public RuntimeValue<VertxWebsocketComponent> createVertxWebsocketComponent(RuntimeValue<Vertx> vertx,
             RuntimeValue<Router> router) {
-        QuarkusVertxWebsocketComponent component = new QuarkusVertxWebsocketComponent(router.getValue());
+        QuarkusVertxWebsocketComponent component = new QuarkusVertxWebsocketComponent();
         component.setVertx(vertx.getValue());
+        component.setRouter(router.getValue());
         return new RuntimeValue<>(component);
     }
 
     static final class QuarkusVertxWebsocketComponent extends VertxWebsocketComponent {
-        private final Router router;
-
-        public QuarkusVertxWebsocketComponent(Router router) {
-            this.router = router;
-        }
-
-        @Override
-        protected Endpoint createEndpoint(String uri, String remaining, Map<String, Object> parameters) throws Exception {
-            VertxWebsocketEndpoint endpoint = (VertxWebsocketEndpoint) super.createEndpoint(uri, remaining, parameters);
-            endpoint.getConfiguration().setRouter(router);
-            return endpoint;
-        }
-
         @Override
         protected VertxWebsocketHost createVertxWebsocketHost(VertxWebsocketHostConfiguration hostConfiguration,
                 VertxWebsocketHostKey hostKey) {


[camel-quarkus] 03/05: Upgrade to Camel 3.6.0

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 da775e610e2db62b9f927c66a9fde00db19c06dc
Author: James Netherton <ja...@gmail.com>
AuthorDate: Mon Sep 7 09:30:51 2020 +0100

    Upgrade to Camel 3.6.0
---
 .../reference/extensions/azure-storage-blob.adoc   |  2 +-
 .../reference/extensions/azure-storage-queue.adoc  |  2 +-
 .../ROOT/pages/reference/extensions/bindy.adoc     |  4 +-
 .../ROOT/pages/reference/extensions/snakeyaml.adoc |  4 +-
 .../ROOT/partials/reference/components/atmos.adoc  |  2 +-
 .../reference/components/aws2-eventbridge.adoc     |  1 +
 .../partials/reference/components/vertx-http.adoc  |  2 +-
 .../reference/components/vertx-websocket.adoc      |  2 +-
 .../ROOT/partials/reference/dataformats/bindy.adoc |  2 +-
 .../reference/dataformats/json-fastjson.adoc       |  2 +-
 .../partials/reference/dataformats/json-gson.adoc  |  2 +-
 .../reference/dataformats/json-jackson.adoc        |  2 +-
 .../reference/dataformats/json-johnzon.adoc        |  2 +-
 .../reference/dataformats/json-xstream.adoc        |  2 +-
 .../reference/dataformats/yaml-snakeyaml.adoc      |  2 +-
 .../quarkus/core/deployment/CamelProcessor.java    |  3 +-
 .../org/apache/camel/quarkus/core/BaseModel.java   |  6 ++
 .../camel/quarkus/core/FastCamelContext.java       | 12 ++++
 extensions-jvm/hbase/integration-test/pom.xml      |  7 +++
 extensions-jvm/jbpm/deployment/pom.xml             |  4 ++
 extensions-jvm/jbpm/runtime/pom.xml                | 12 ++--
 extensions-jvm/workday/runtime/pom.xml             | 11 ++++
 .../main/resources/META-INF/quarkus-extension.yaml |  2 +-
 extensions/jaxb/runtime/pom.xml                    |  6 ++
 .../component/qute/QuteComponentConfigurer.java    | 17 ++++--
 .../component/qute/QuteEndpointConfigurer.java     | 24 +++++---
 .../component/qute/QuteEndpointUriFactory.java     | 68 ++++++++++++++++++++++
 .../org/apache/camel/urifactory/qute-endpoint      |  2 +
 .../org/apache/camel/component/qute/qute.json      | 13 +++--
 .../main/resources/META-INF/quarkus-extension.yaml |  2 +-
 .../component/caffeine/it/CaffeineResource.java    | 13 +----
 .../stringtemplate/it/StringtemplateTest.java      |  1 -
 pom.xml                                            |  8 ++-
 poms/bom/pom.xml                                   | 10 ++++
 34 files changed, 195 insertions(+), 59 deletions(-)

diff --git a/docs/modules/ROOT/pages/reference/extensions/azure-storage-blob.adoc b/docs/modules/ROOT/pages/reference/extensions/azure-storage-blob.adoc
index d91c34b..fef480e 100644
--- a/docs/modules/ROOT/pages/reference/extensions/azure-storage-blob.adoc
+++ b/docs/modules/ROOT/pages/reference/extensions/azure-storage-blob.adoc
@@ -16,7 +16,7 @@ Store and retrieve blobs from Azure Storage Blob Service using SDK v12.
 
 == What's inside
 
-* https://camel.apache.org/components/latest/azure-storage-blob-component.html[Azure Storage Blob Service component], URI syntax: `azure-storage-blob:containerName`
+* https://camel.apache.org/components/latest/azure-storage-blob-component.html[Azure Storage Blob Service component], URI syntax: `azure-storage-blob:accountName/containerName`
 
 Please refer to the above link for usage and configuration details.
 
diff --git a/docs/modules/ROOT/pages/reference/extensions/azure-storage-queue.adoc b/docs/modules/ROOT/pages/reference/extensions/azure-storage-queue.adoc
index 01fd0bf..a8a88b5 100644
--- a/docs/modules/ROOT/pages/reference/extensions/azure-storage-queue.adoc
+++ b/docs/modules/ROOT/pages/reference/extensions/azure-storage-queue.adoc
@@ -16,7 +16,7 @@ The azure-storage-queue component is used for storing and retrieving the message
 
 == What's inside
 
-* https://camel.apache.org/components/latest/azure-storage-queue-component.html[Azure Storage Queue Service component], URI syntax: `azure-storage-queue:queueName`
+* https://camel.apache.org/components/latest/azure-storage-queue-component.html[Azure Storage Queue Service component], URI syntax: `azure-storage-queue:accountName/queueName`
 
 Please refer to the above link for usage and configuration details.
 
diff --git a/docs/modules/ROOT/pages/reference/extensions/bindy.adoc b/docs/modules/ROOT/pages/reference/extensions/bindy.adoc
index a8fef69..dd3a7b5 100644
--- a/docs/modules/ROOT/pages/reference/extensions/bindy.adoc
+++ b/docs/modules/ROOT/pages/reference/extensions/bindy.adoc
@@ -5,7 +5,7 @@
 :cq-artifact-id: camel-quarkus-bindy
 :cq-native-supported: true
 :cq-status: Stable
-:cq-description: Marshal and unmarshal Java beans from and to flat payloads (such as CSV, delimited, fixed length formats, or FIX messages).
+:cq-description: Marshal and unmarshal between POJOs and Comma separated values (CSV) format using Camel Bindy Marshal and unmarshal between POJOs and fixed field length format using Camel Bindy Marshal and unmarshal between POJOs and key-value pair (KVP) format using Camel Bindy
 :cq-deprecated: false
 :cq-jvm-since: 1.0.0
 :cq-native-since: 1.0.0
@@ -13,7 +13,7 @@
 [.badges]
 [.badge-key]##JVM since##[.badge-supported]##1.0.0## [.badge-key]##Native since##[.badge-supported]##1.0.0##
 
-Marshal and unmarshal Java beans from and to flat payloads (such as CSV, delimited, fixed length formats, or FIX messages).
+Marshal and unmarshal between POJOs and Comma separated values (CSV) format using Camel Bindy Marshal and unmarshal between POJOs and fixed field length format using Camel Bindy Marshal and unmarshal between POJOs and key-value pair (KVP) format using Camel Bindy
 
 == What's inside
 
diff --git a/docs/modules/ROOT/pages/reference/extensions/snakeyaml.adoc b/docs/modules/ROOT/pages/reference/extensions/snakeyaml.adoc
index deafe1e..f465e47 100644
--- a/docs/modules/ROOT/pages/reference/extensions/snakeyaml.adoc
+++ b/docs/modules/ROOT/pages/reference/extensions/snakeyaml.adoc
@@ -5,7 +5,7 @@
 :cq-artifact-id: camel-quarkus-snakeyaml
 :cq-native-supported: true
 :cq-status: Stable
-:cq-description: Marshal and unmarshal Java objects to and from YAML.
+:cq-description: Marshal and unmarshal Java objects to and from YAML using SnakeYAML
 :cq-deprecated: false
 :cq-jvm-since: 0.4.0
 :cq-native-since: 0.4.0
@@ -13,7 +13,7 @@
 [.badges]
 [.badge-key]##JVM since##[.badge-supported]##0.4.0## [.badge-key]##Native since##[.badge-supported]##0.4.0##
 
-Marshal and unmarshal Java objects to and from YAML.
+Marshal and unmarshal Java objects to and from YAML using SnakeYAML
 
 == What's inside
 
diff --git a/docs/modules/ROOT/partials/reference/components/atmos.adoc b/docs/modules/ROOT/partials/reference/components/atmos.adoc
index 0fece9b..8031c1f 100644
--- a/docs/modules/ROOT/partials/reference/components/atmos.adoc
+++ b/docs/modules/ROOT/partials/reference/components/atmos.adoc
@@ -9,5 +9,5 @@
 :cq-native-since: n/a
 :cq-camel-part-name: atmos
 :cq-camel-part-title: Atmos
-:cq-camel-part-description: Integract with EMC's ViPR object data services using the Atmos Client.
+:cq-camel-part-description: Integrate with EMC's ViPR object data services using the Atmos Client.
 :cq-extension-page-title: Atmos
diff --git a/docs/modules/ROOT/partials/reference/components/aws2-eventbridge.adoc b/docs/modules/ROOT/partials/reference/components/aws2-eventbridge.adoc
new file mode 100644
index 0000000..a509c1d
--- /dev/null
+++ b/docs/modules/ROOT/partials/reference/components/aws2-eventbridge.adoc
@@ -0,0 +1 @@
+// Empty partial for a Camel bit unsupported by Camel Quarkus to avoid warnings when this file is included from a Camel page
diff --git a/docs/modules/ROOT/partials/reference/components/vertx-http.adoc b/docs/modules/ROOT/partials/reference/components/vertx-http.adoc
index 7d893ac..d0ed9a6 100644
--- a/docs/modules/ROOT/partials/reference/components/vertx-http.adoc
+++ b/docs/modules/ROOT/partials/reference/components/vertx-http.adoc
@@ -9,5 +9,5 @@
 :cq-native-since: 1.1.0
 :cq-camel-part-name: vertx-http
 :cq-camel-part-title: Vert.x HTTP Client
-:cq-camel-part-description: Camel HTTP client support with Vert.x
+:cq-camel-part-description: Send requests to external HTTP servers using Vert.x
 :cq-extension-page-title: Vert.x HTTP Client
diff --git a/docs/modules/ROOT/partials/reference/components/vertx-websocket.adoc b/docs/modules/ROOT/partials/reference/components/vertx-websocket.adoc
index 90416db..0703586 100644
--- a/docs/modules/ROOT/partials/reference/components/vertx-websocket.adoc
+++ b/docs/modules/ROOT/partials/reference/components/vertx-websocket.adoc
@@ -9,5 +9,5 @@
 :cq-native-since: 1.1.0
 :cq-camel-part-name: vertx-websocket
 :cq-camel-part-title: Vert.x WebSocket
-:cq-camel-part-description: Camel WebSocket support with Vert.x
+:cq-camel-part-description: Expose WebSocket endpoints and connect to remote WebSocket servers using Vert.x
 :cq-extension-page-title: Vert.x WebSocket
diff --git a/docs/modules/ROOT/partials/reference/dataformats/bindy.adoc b/docs/modules/ROOT/partials/reference/dataformats/bindy.adoc
index fd7c3a2..fdd6714 100644
--- a/docs/modules/ROOT/partials/reference/dataformats/bindy.adoc
+++ b/docs/modules/ROOT/partials/reference/dataformats/bindy.adoc
@@ -9,5 +9,5 @@
 :cq-native-since: 1.0.0
 :cq-camel-part-name: bindy-kvp
 :cq-camel-part-title: Bindy Key Value Pair
-:cq-camel-part-description: Marshal and unmarshal Java beans from and to flat payloads (such as CSV, delimited, fixed length formats, or FIX messages).
+:cq-camel-part-description: Marshal and unmarshal between POJOs and key-value pair (KVP) format using Camel Bindy
 :cq-extension-page-title: Bindy
diff --git a/docs/modules/ROOT/partials/reference/dataformats/json-fastjson.adoc b/docs/modules/ROOT/partials/reference/dataformats/json-fastjson.adoc
index 40fb920..0bd8ede 100644
--- a/docs/modules/ROOT/partials/reference/dataformats/json-fastjson.adoc
+++ b/docs/modules/ROOT/partials/reference/dataformats/json-fastjson.adoc
@@ -9,5 +9,5 @@
 :cq-native-since: n/a
 :cq-camel-part-name: json-fastjson
 :cq-camel-part-title: JSON Fastjson
-:cq-camel-part-description: Marshal POJOs to JSON and back.
+:cq-camel-part-description: Marshal POJOs to JSON and back using Fastjson
 :cq-extension-page-title: JSON Fastjson
diff --git a/docs/modules/ROOT/partials/reference/dataformats/json-gson.adoc b/docs/modules/ROOT/partials/reference/dataformats/json-gson.adoc
index f915f4c..f598331 100644
--- a/docs/modules/ROOT/partials/reference/dataformats/json-gson.adoc
+++ b/docs/modules/ROOT/partials/reference/dataformats/json-gson.adoc
@@ -9,5 +9,5 @@
 :cq-native-since: 1.0.0
 :cq-camel-part-name: json-gson
 :cq-camel-part-title: JSON Gson
-:cq-camel-part-description: Marshal POJOs to JSON and back.
+:cq-camel-part-description: Marshal POJOs to JSON and back using Gson
 :cq-extension-page-title: Gson
diff --git a/docs/modules/ROOT/partials/reference/dataformats/json-jackson.adoc b/docs/modules/ROOT/partials/reference/dataformats/json-jackson.adoc
index 017c5e4..4d68616 100644
--- a/docs/modules/ROOT/partials/reference/dataformats/json-jackson.adoc
+++ b/docs/modules/ROOT/partials/reference/dataformats/json-jackson.adoc
@@ -9,5 +9,5 @@
 :cq-native-since: 0.3.0
 :cq-camel-part-name: json-jackson
 :cq-camel-part-title: JSON Jackson
-:cq-camel-part-description: Marshal POJOs to JSON and back.
+:cq-camel-part-description: Marshal POJOs to JSON and back using Jackson
 :cq-extension-page-title: Jackson
diff --git a/docs/modules/ROOT/partials/reference/dataformats/json-johnzon.adoc b/docs/modules/ROOT/partials/reference/dataformats/json-johnzon.adoc
index f9c3464..37396fc 100644
--- a/docs/modules/ROOT/partials/reference/dataformats/json-johnzon.adoc
+++ b/docs/modules/ROOT/partials/reference/dataformats/json-johnzon.adoc
@@ -9,5 +9,5 @@
 :cq-native-since: 1.0.0
 :cq-camel-part-name: json-johnzon
 :cq-camel-part-title: JSON Johnzon
-:cq-camel-part-description: Marshal POJOs to JSON and back.
+:cq-camel-part-description: Marshal POJOs to JSON and back using Johnzon
 :cq-extension-page-title: Johnzon
diff --git a/docs/modules/ROOT/partials/reference/dataformats/json-xstream.adoc b/docs/modules/ROOT/partials/reference/dataformats/json-xstream.adoc
index f9b01be..369a16f 100644
--- a/docs/modules/ROOT/partials/reference/dataformats/json-xstream.adoc
+++ b/docs/modules/ROOT/partials/reference/dataformats/json-xstream.adoc
@@ -9,5 +9,5 @@
 :cq-native-since: 1.0.0
 :cq-camel-part-name: json-xstream
 :cq-camel-part-title: JSON XStream
-:cq-camel-part-description: Marshal POJOs to JSON and back.
+:cq-camel-part-description: Marshal POJOs to JSON and back using XStream
 :cq-extension-page-title: XStream
diff --git a/docs/modules/ROOT/partials/reference/dataformats/yaml-snakeyaml.adoc b/docs/modules/ROOT/partials/reference/dataformats/yaml-snakeyaml.adoc
index 45d4761..559f6ef 100644
--- a/docs/modules/ROOT/partials/reference/dataformats/yaml-snakeyaml.adoc
+++ b/docs/modules/ROOT/partials/reference/dataformats/yaml-snakeyaml.adoc
@@ -9,5 +9,5 @@
 :cq-native-since: 0.4.0
 :cq-camel-part-name: yaml-snakeyaml
 :cq-camel-part-title: YAML SnakeYAML
-:cq-camel-part-description: Marshal and unmarshal Java objects to and from YAML.
+:cq-camel-part-description: Marshal and unmarshal Java objects to and from YAML using SnakeYAML
 :cq-extension-page-title: SnakeYAML
diff --git a/extensions-core/core/deployment/src/main/java/org/apache/camel/quarkus/core/deployment/CamelProcessor.java b/extensions-core/core/deployment/src/main/java/org/apache/camel/quarkus/core/deployment/CamelProcessor.java
index 1c0524f..4b542c9 100644
--- a/extensions-core/core/deployment/src/main/java/org/apache/camel/quarkus/core/deployment/CamelProcessor.java
+++ b/extensions-core/core/deployment/src/main/java/org/apache/camel/quarkus/core/deployment/CamelProcessor.java
@@ -154,7 +154,8 @@ class CamelProcessor {
                 "META-INF/services/org/apache/camel/configurer/*",
                 "META-INF/services/org/apache/camel/language/*",
                 "META-INF/services/org/apache/camel/dataformat/*",
-                "META-INF/services/org/apache/camel/send-dynamic/*"));
+                "META-INF/services/org/apache/camel/send-dynamic/*",
+                "META-INF/services/org/apache/camel/urifactory/*"));
     }
 
     @BuildStep
diff --git a/extensions-core/core/runtime/src/main/java/org/apache/camel/quarkus/core/BaseModel.java b/extensions-core/core/runtime/src/main/java/org/apache/camel/quarkus/core/BaseModel.java
index 636f6cc..3facae2 100644
--- a/extensions-core/core/runtime/src/main/java/org/apache/camel/quarkus/core/BaseModel.java
+++ b/extensions-core/core/runtime/src/main/java/org/apache/camel/quarkus/core/BaseModel.java
@@ -37,6 +37,7 @@ public abstract class BaseModel implements Model {
     private final List<RouteDefinition> routeDefinitions = new ArrayList<>();
     private final List<RouteTemplateDefinition> routeTemplateDefinitions = new ArrayList<>();
     private final List<RestDefinition> restDefinitions = new ArrayList<>();
+    private final Map<String, RouteTemplateDefinition.Converter> routeTemplateConverters = new ConcurrentHashMap<>();
     private Map<String, DataFormatDefinition> dataFormats = new HashMap<>();
     private List<TransformerDefinition> transformers = new ArrayList<>();
     private List<ValidatorDefinition> validators = new ArrayList<>();
@@ -154,6 +155,11 @@ public abstract class BaseModel implements Model {
     }
 
     @Override
+    public void addRouteTemplateDefinitionConverter(String templateIdPattern, RouteTemplateDefinition.Converter converter) {
+        routeTemplateConverters.put(templateIdPattern, converter);
+    }
+
+    @Override
     public String addRouteFromTemplate(String routeId, String routeTemplateId, Map<String, Object> parameters)
             throws Exception {
         RouteTemplateDefinition target = null;
diff --git a/extensions-core/core/runtime/src/main/java/org/apache/camel/quarkus/core/FastCamelContext.java b/extensions-core/core/runtime/src/main/java/org/apache/camel/quarkus/core/FastCamelContext.java
index 4292ad0..4ca613e 100644
--- a/extensions-core/core/runtime/src/main/java/org/apache/camel/quarkus/core/FastCamelContext.java
+++ b/extensions-core/core/runtime/src/main/java/org/apache/camel/quarkus/core/FastCamelContext.java
@@ -69,6 +69,7 @@ import org.apache.camel.impl.engine.DefaultStreamCachingStrategy;
 import org.apache.camel.impl.engine.DefaultTracer;
 import org.apache.camel.impl.engine.DefaultTransformerRegistry;
 import org.apache.camel.impl.engine.DefaultUnitOfWorkFactory;
+import org.apache.camel.impl.engine.DefaultUriFactoryResolver;
 import org.apache.camel.impl.engine.DefaultValidatorRegistry;
 import org.apache.camel.impl.engine.EndpointKey;
 import org.apache.camel.impl.engine.RouteService;
@@ -138,6 +139,7 @@ import org.apache.camel.spi.Transformer;
 import org.apache.camel.spi.TransformerRegistry;
 import org.apache.camel.spi.TypeConverterRegistry;
 import org.apache.camel.spi.UnitOfWorkFactory;
+import org.apache.camel.spi.UriFactoryResolver;
 import org.apache.camel.spi.UuidGenerator;
 import org.apache.camel.spi.Validator;
 import org.apache.camel.spi.ValidatorRegistry;
@@ -436,6 +438,11 @@ public class FastCamelContext extends AbstractCamelContext implements CatalogCam
     }
 
     @Override
+    protected UriFactoryResolver createUriFactoryResolver() {
+        return new DefaultUriFactoryResolver();
+    }
+
+    @Override
     protected HealthCheckRegistry createHealthCheckRegistry() {
         return new BaseServiceResolver<>(HealthCheckRegistry.FACTORY, HealthCheckRegistry.class)
                 .resolve(getCamelContextReference()).orElse(null);
@@ -642,6 +649,11 @@ public class FastCamelContext extends AbstractCamelContext implements CatalogCam
     }
 
     @Override
+    public void addRouteTemplateDefinitionConverter(String templateIdPattern, RouteTemplateDefinition.Converter converter) {
+        model.addRouteTemplateDefinitionConverter(templateIdPattern, converter);
+    }
+
+    @Override
     public List<RestDefinition> getRestDefinitions() {
         return model.getRestDefinitions();
     }
diff --git a/extensions-jvm/hbase/integration-test/pom.xml b/extensions-jvm/hbase/integration-test/pom.xml
index 63f7e35..8503d2b 100644
--- a/extensions-jvm/hbase/integration-test/pom.xml
+++ b/extensions-jvm/hbase/integration-test/pom.xml
@@ -121,6 +121,13 @@
     <build>
         <plugins>
             <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-surefire-plugin</artifactId>
+                <configuration>
+                    <skip>true</skip>
+                </configuration>
+            </plugin>
+            <plugin>
                 <groupId>io.quarkus</groupId>
                 <artifactId>quarkus-maven-plugin</artifactId>
                 <executions>
diff --git a/extensions-jvm/jbpm/deployment/pom.xml b/extensions-jvm/jbpm/deployment/pom.xml
index 84a74e5..3ed5e90 100644
--- a/extensions-jvm/jbpm/deployment/pom.xml
+++ b/extensions-jvm/jbpm/deployment/pom.xml
@@ -38,6 +38,10 @@
         </dependency>
         <dependency>
             <groupId>org.apache.camel.quarkus</groupId>
+            <artifactId>camel-quarkus-jaxb-deployment</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.camel.quarkus</groupId>
             <artifactId>camel-quarkus-jbpm</artifactId>
         </dependency>
     </dependencies>
diff --git a/extensions-jvm/jbpm/runtime/pom.xml b/extensions-jvm/jbpm/runtime/pom.xml
index b39f904..00c749e 100644
--- a/extensions-jvm/jbpm/runtime/pom.xml
+++ b/extensions-jvm/jbpm/runtime/pom.xml
@@ -54,19 +54,23 @@
             <artifactId>camel-quarkus-core</artifactId>
         </dependency>
         <dependency>
+            <groupId>org.apache.camel.quarkus</groupId>
+            <artifactId>camel-quarkus-jaxb</artifactId>
+        </dependency>
+        <dependency>
             <groupId>org.apache.camel</groupId>
             <artifactId>camel-jbpm</artifactId>
             <exclusions>
                 <exclusion>
+                    <groupId>com.sun.xml.bind</groupId>
+                    <artifactId>jaxb-impl</artifactId>
+                </exclusion>
+                <exclusion>
                     <groupId>jakarta.xml.bind</groupId>
                     <artifactId>jakarta.xml.bind-api</artifactId>
                 </exclusion>
             </exclusions>
         </dependency>
-        <dependency>
-            <groupId>org.jboss.spec.javax.xml.bind</groupId>
-            <artifactId>jboss-jaxb-api_2.3_spec</artifactId>
-        </dependency>
     </dependencies>
 
     <build>
diff --git a/extensions-jvm/workday/runtime/pom.xml b/extensions-jvm/workday/runtime/pom.xml
index 7830c49..4e9ae5b 100644
--- a/extensions-jvm/workday/runtime/pom.xml
+++ b/extensions-jvm/workday/runtime/pom.xml
@@ -56,7 +56,18 @@
         <dependency>
             <groupId>org.apache.camel</groupId>
             <artifactId>camel-workday</artifactId>
+            <exclusions>
+                <exclusion>
+                    <groupId>jakarta.xml.bind</groupId>
+                    <artifactId>jakarta.xml.bind-api</artifactId>
+                </exclusion>
+            </exclusions>
         </dependency>
+        <dependency>
+            <groupId>org.jboss.spec.javax.xml.bind</groupId>
+            <artifactId>jboss-jaxb-api_2.3_spec</artifactId>
+        </dependency>
+
     </dependencies>
 
     <build>
diff --git a/extensions/bindy/runtime/src/main/resources/META-INF/quarkus-extension.yaml b/extensions/bindy/runtime/src/main/resources/META-INF/quarkus-extension.yaml
index 8e386a2..061dc47 100644
--- a/extensions/bindy/runtime/src/main/resources/META-INF/quarkus-extension.yaml
+++ b/extensions/bindy/runtime/src/main/resources/META-INF/quarkus-extension.yaml
@@ -22,7 +22,7 @@
 #
 ---
 name: "Camel Bindy"
-description: "Marshal and unmarshal Java beans from and to flat payloads (such as CSV, delimited, fixed length formats, or FIX messages)"
+description: "Marshal and unmarshal between POJOs and Comma separated values (CSV) format using Camel Bindy Marshal and unmarshal between POJOs and fixed field length format using Camel Bindy Marshal and unmarshal between POJOs and key-value pair (KVP) format using Camel Bindy"
 metadata:
   guide: "https://camel.apache.org/camel-quarkus/latest/reference/extensions/bindy.html"
   categories:
diff --git a/extensions/jaxb/runtime/pom.xml b/extensions/jaxb/runtime/pom.xml
index fa3afc8..dce4b14 100644
--- a/extensions/jaxb/runtime/pom.xml
+++ b/extensions/jaxb/runtime/pom.xml
@@ -54,6 +54,12 @@
         <dependency>
             <groupId>org.apache.camel</groupId>
             <artifactId>camel-jaxb</artifactId>
+            <exclusions>
+                <exclusion>
+                    <groupId>jakarta.xml.bind</groupId>
+                    <artifactId>jakarta.xml.bind-api</artifactId>
+                </exclusion>
+            </exclusions>
         </dependency>
         <dependency>
             <groupId>io.quarkus</groupId>
diff --git a/extensions/qute/component/src/generated/java/org/apache/camel/component/qute/QuteComponentConfigurer.java b/extensions/qute/component/src/generated/java/org/apache/camel/component/qute/QuteComponentConfigurer.java
index 8ecaf3e..95e6cc2 100644
--- a/extensions/qute/component/src/generated/java/org/apache/camel/component/qute/QuteComponentConfigurer.java
+++ b/extensions/qute/component/src/generated/java/org/apache/camel/component/qute/QuteComponentConfigurer.java
@@ -15,6 +15,16 @@ import org.apache.camel.support.component.PropertyConfigurerSupport;
 @SuppressWarnings("unchecked")
 public class QuteComponentConfigurer extends PropertyConfigurerSupport implements GeneratedPropertyConfigurer, PropertyConfigurerGetter {
 
+    private static final Map<String, Object> ALL_OPTIONS;
+    static {
+        Map<String, Object> map = new CaseInsensitiveMap();
+        map.put("allowTemplateFromHeader", boolean.class);
+        map.put("lazyStartProducer", boolean.class);
+        map.put("basicPropertyBinding", boolean.class);
+        map.put("quteEngine", io.quarkus.qute.Engine.class);
+        ALL_OPTIONS = map;
+    }
+
     @Override
     public boolean configure(CamelContext camelContext, Object obj, String name, Object value, boolean ignoreCase) {
         QuteComponent target = (QuteComponent) obj;
@@ -33,12 +43,7 @@ public class QuteComponentConfigurer extends PropertyConfigurerSupport implement
 
     @Override
     public Map<String, Object> getAllOptions(Object target) {
-        Map<String, Object> answer = new CaseInsensitiveMap();
-        answer.put("allowTemplateFromHeader", boolean.class);
-        answer.put("basicPropertyBinding", boolean.class);
-        answer.put("lazyStartProducer", boolean.class);
-        answer.put("quteEngine", io.quarkus.qute.Engine.class);
-        return answer;
+        return ALL_OPTIONS;
     }
 
     @Override
diff --git a/extensions/qute/component/src/generated/java/org/apache/camel/component/qute/QuteEndpointConfigurer.java b/extensions/qute/component/src/generated/java/org/apache/camel/component/qute/QuteEndpointConfigurer.java
index 22e72c7..983fa1c 100644
--- a/extensions/qute/component/src/generated/java/org/apache/camel/component/qute/QuteEndpointConfigurer.java
+++ b/extensions/qute/component/src/generated/java/org/apache/camel/component/qute/QuteEndpointConfigurer.java
@@ -15,6 +15,20 @@ import org.apache.camel.support.component.PropertyConfigurerSupport;
 @SuppressWarnings("unchecked")
 public class QuteEndpointConfigurer extends PropertyConfigurerSupport implements GeneratedPropertyConfigurer, PropertyConfigurerGetter {
 
+    private static final Map<String, Object> ALL_OPTIONS;
+    static {
+        Map<String, Object> map = new CaseInsensitiveMap();
+        map.put("resourceUri", java.lang.String.class);
+        map.put("allowContextMapAll", boolean.class);
+        map.put("allowTemplateFromHeader", boolean.class);
+        map.put("contentCache", boolean.class);
+        map.put("encoding", java.lang.String.class);
+        map.put("lazyStartProducer", boolean.class);
+        map.put("basicPropertyBinding", boolean.class);
+        map.put("synchronous", boolean.class);
+        ALL_OPTIONS = map;
+    }
+
     @Override
     public boolean configure(CamelContext camelContext, Object obj, String name, Object value, boolean ignoreCase) {
         QuteEndpoint target = (QuteEndpoint) obj;
@@ -37,15 +51,7 @@ public class QuteEndpointConfigurer extends PropertyConfigurerSupport implements
 
     @Override
     public Map<String, Object> getAllOptions(Object target) {
-        Map<String, Object> answer = new CaseInsensitiveMap();
-        answer.put("allowContextMapAll", boolean.class);
-        answer.put("allowTemplateFromHeader", boolean.class);
-        answer.put("basicPropertyBinding", boolean.class);
-        answer.put("contentCache", boolean.class);
-        answer.put("encoding", java.lang.String.class);
-        answer.put("lazyStartProducer", boolean.class);
-        answer.put("synchronous", boolean.class);
-        return answer;
+        return ALL_OPTIONS;
     }
 
     @Override
diff --git a/extensions/qute/component/src/generated/java/org/apache/camel/component/qute/QuteEndpointUriFactory.java b/extensions/qute/component/src/generated/java/org/apache/camel/component/qute/QuteEndpointUriFactory.java
new file mode 100644
index 0000000..f24c41f
--- /dev/null
+++ b/extensions/qute/component/src/generated/java/org/apache/camel/component/qute/QuteEndpointUriFactory.java
@@ -0,0 +1,68 @@
+/* Generated by camel build tools - do NOT edit this file! */
+package org.apache.camel.component.qute;
+
+import java.net.URISyntaxException;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.Map;
+import java.util.Set;
+
+import org.apache.camel.spi.EndpointUriFactory;
+
+/**
+ * Generated by camel build tools - do NOT edit this file!
+ */
+public class QuteEndpointUriFactory extends org.apache.camel.support.component.EndpointUriFactorySupport implements EndpointUriFactory {
+
+    private static final String BASE = ":resourceUri";
+
+    private static final Set<String> PROPERTY_NAMES;
+    private static final Set<String> SECRET_PROPERTY_NAMES;
+    static {
+        Set<String> props = new HashSet<>(8);
+        props.add("basicPropertyBinding");
+        props.add("allowTemplateFromHeader");
+        props.add("lazyStartProducer");
+        props.add("synchronous");
+        props.add("contentCache");
+        props.add("allowContextMapAll");
+        props.add("resourceUri");
+        props.add("encoding");
+        PROPERTY_NAMES = Collections.unmodifiableSet(props);
+        SECRET_PROPERTY_NAMES = Collections.emptySet();
+    }
+
+    @Override
+    public boolean isEnabled(String scheme) {
+        return "qute".equals(scheme);
+    }
+
+    @Override
+    public String buildUri(String scheme, Map<String, Object> properties) throws URISyntaxException {
+        String syntax = scheme + BASE;
+        String uri = syntax;
+
+        Map<String, Object> copy = new HashMap<>(properties);
+
+        uri = buildPathParameter(syntax, uri, "resourceUri", null, true, copy);
+        uri = buildQueryParameters(uri, copy);
+        return uri;
+    }
+
+    @Override
+    public Set<String> propertyNames() {
+        return PROPERTY_NAMES;
+    }
+
+    @Override
+    public Set<String> secretPropertyNames() {
+        return SECRET_PROPERTY_NAMES;
+    }
+
+    @Override
+    public boolean isLenientProperties() {
+        return false;
+    }
+}
+
diff --git a/extensions/qute/component/src/generated/resources/META-INF/services/org/apache/camel/urifactory/qute-endpoint b/extensions/qute/component/src/generated/resources/META-INF/services/org/apache/camel/urifactory/qute-endpoint
new file mode 100644
index 0000000..2d208ea
--- /dev/null
+++ b/extensions/qute/component/src/generated/resources/META-INF/services/org/apache/camel/urifactory/qute-endpoint
@@ -0,0 +1,2 @@
+# Generated by camel build tools - do NOT edit this file!
+class=org.apache.camel.component.qute.QuteEndpointUriFactory
diff --git a/extensions/qute/component/src/generated/resources/org/apache/camel/component/qute/qute.json b/extensions/qute/component/src/generated/resources/org/apache/camel/component/qute/qute.json
index c39fc40..f5ec785 100644
--- a/extensions/qute/component/src/generated/resources/org/apache/camel/component/qute/qute.json
+++ b/extensions/qute/component/src/generated/resources/org/apache/camel/component/qute/qute.json
@@ -16,24 +16,25 @@
     "extendsScheme": "",
     "syntax": "qute:resourceUri",
     "async": false,
+    "api": false,
     "consumerOnly": false,
     "producerOnly": true,
     "lenientProperties": false
   },
   "componentProperties": {
-    "allowTemplateFromHeader": { "kind": "property", "displayName": "Allow Template From Header", "group": "producer", "label": "", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "secret": false, "defaultValue": "false", "description": "Whether to allow to use resource template from header or not (default false). Enabling this allows to specify dynamic templates via message header. However this can be seen as a potential security vulnerability if the he [...]
+    "allowTemplateFromHeader": { "kind": "property", "displayName": "Allow Template From Header", "group": "producer", "label": "", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "secret": false, "defaultValue": false, "description": "Whether to allow to use resource template from header or not (default false). Enabling this allows to specify dynamic templates via message header. However this can be seen as a potential security vulnerability if the head [...]
     "lazyStartProducer": { "kind": "property", "displayName": "Lazy Start Producer", "group": "producer", "label": "producer", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "secret": false, "defaultValue": false, "description": "Whether the producer should be started lazy (on the first message). By starting lazy you can use this to allow CamelContext and routes to startup in situations where a producer may otherwise fail during starting and cause the r [...]
-    "basicPropertyBinding": { "kind": "property", "displayName": "Basic Property Binding", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "secret": false, "defaultValue": false, "description": "Whether the component should use basic property binding (Camel 2.x) or the newer property binding with additional capabilities" },
+    "basicPropertyBinding": { "kind": "property", "displayName": "Basic Property Binding", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": true, "secret": false, "defaultValue": false, "description": "Whether the component should use basic property binding (Camel 2.x) or the newer property binding with additional capabilities" },
     "quteEngine": { "kind": "property", "displayName": "Qute Engine", "group": "advanced", "label": "advanced", "required": false, "type": "object", "javaType": "io.quarkus.qute.Engine", "deprecated": false, "secret": false, "description": "To use the Engine otherwise a new engine is created" }
   },
   "properties": {
     "resourceUri": { "kind": "path", "displayName": "Resource Uri", "group": "producer", "label": "", "required": true, "type": "string", "javaType": "java.lang.String", "deprecated": false, "deprecationNote": "", "secret": false, "description": "Path to the resource. You can prefix with: classpath, file, http, ref, or bean. classpath, file and http loads the resource using these protocols (classpath is default). ref will lookup the resource in the registry. bean will call a method on a  [...]
-    "allowContextMapAll": { "kind": "parameter", "displayName": "Allow Context Map All", "group": "producer", "label": "", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "secret": false, "defaultValue": "false", "description": "Sets whether the context map should allow access to all details. By default only the message body and headers can be accessed. This option can be enabled for full access to the current Exchange and CamelContext. Doing so impose a [...]
-    "allowTemplateFromHeader": { "kind": "parameter", "displayName": "Allow Template From Header", "group": "producer", "label": "", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "secret": false, "defaultValue": "false", "description": "Whether to allow to use resource template from header or not (default false). Enabling this allows to specify dynamic templates via message header. However this can be seen as a potential security vulnerability if the h [...]
-    "contentCache": { "kind": "parameter", "displayName": "Content Cache", "group": "producer", "label": "", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "secret": false, "defaultValue": "false", "description": "Sets whether to use resource content cache or not" },
+    "allowContextMapAll": { "kind": "parameter", "displayName": "Allow Context Map All", "group": "producer", "label": "", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "secret": false, "defaultValue": false, "description": "Sets whether the context map should allow access to all details. By default only the message body and headers can be accessed. This option can be enabled for full access to the current Exchange and CamelContext. Doing so impose a p [...]
+    "allowTemplateFromHeader": { "kind": "parameter", "displayName": "Allow Template From Header", "group": "producer", "label": "", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "secret": false, "defaultValue": false, "description": "Whether to allow to use resource template from header or not (default false). Enabling this allows to specify dynamic templates via message header. However this can be seen as a potential security vulnerability if the hea [...]
+    "contentCache": { "kind": "parameter", "displayName": "Content Cache", "group": "producer", "label": "", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "secret": false, "defaultValue": false, "description": "Sets whether to use resource content cache or not" },
     "encoding": { "kind": "parameter", "displayName": "Encoding", "group": "producer", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "secret": false, "description": "Character encoding of the resource content." },
     "lazyStartProducer": { "kind": "parameter", "displayName": "Lazy Start Producer", "group": "producer", "label": "producer", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "secret": false, "defaultValue": false, "description": "Whether the producer should be started lazy (on the first message). By starting lazy you can use this to allow CamelContext and routes to startup in situations where a producer may otherwise fail during starting and cause the  [...]
     "basicPropertyBinding": { "kind": "parameter", "displayName": "Basic Property Binding", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "secret": false, "defaultValue": false, "description": "Whether the endpoint should use basic property binding (Camel 2.x) or the newer property binding with additional capabilities" },
-    "synchronous": { "kind": "parameter", "displayName": "Synchronous", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "secret": false, "defaultValue": "false", "description": "Sets whether synchronous processing should be strictly used, or Camel is allowed to use asynchronous processing (if supported)." }
+    "synchronous": { "kind": "parameter", "displayName": "Synchronous", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "secret": false, "defaultValue": false, "description": "Sets whether synchronous processing should be strictly used, or Camel is allowed to use asynchronous processing (if supported)." }
   }
 }
diff --git a/extensions/snakeyaml/runtime/src/main/resources/META-INF/quarkus-extension.yaml b/extensions/snakeyaml/runtime/src/main/resources/META-INF/quarkus-extension.yaml
index 5164680..a22e829 100644
--- a/extensions/snakeyaml/runtime/src/main/resources/META-INF/quarkus-extension.yaml
+++ b/extensions/snakeyaml/runtime/src/main/resources/META-INF/quarkus-extension.yaml
@@ -22,7 +22,7 @@
 #
 ---
 name: "Camel SnakeYAML"
-description: "Marshal and unmarshal Java objects to and from YAML"
+description: "Marshal and unmarshal Java objects to and from YAML using SnakeYAML"
 metadata:
   guide: "https://camel.apache.org/camel-quarkus/latest/reference/extensions/snakeyaml.html"
   categories:
diff --git a/integration-tests/caffeine/src/main/java/org/apache/camel/quarkus/component/caffeine/it/CaffeineResource.java b/integration-tests/caffeine/src/main/java/org/apache/camel/quarkus/component/caffeine/it/CaffeineResource.java
index 889e345..27e7e95 100644
--- a/integration-tests/caffeine/src/main/java/org/apache/camel/quarkus/component/caffeine/it/CaffeineResource.java
+++ b/integration-tests/caffeine/src/main/java/org/apache/camel/quarkus/component/caffeine/it/CaffeineResource.java
@@ -27,7 +27,6 @@ import javax.ws.rs.Produces;
 import javax.ws.rs.core.MediaType;
 import javax.ws.rs.core.Response;
 
-import com.github.benmanes.caffeine.cache.Cache;
 import org.apache.camel.CamelContext;
 import org.apache.camel.FluentProducerTemplate;
 import org.apache.camel.component.caffeine.CaffeineConstants;
@@ -59,11 +58,7 @@ public class CaffeineResource {
             @PathParam("key") String key,
             String value) {
 
-        // This won't be needed after https://issues.apache.org/jira/browse/CAMEL-15524
-        FluentProducerTemplate t = context.getRegistry().lookupByNameAndType(cacheName, Cache.class) != null
-                ? template.toF("%s://%s?cache=#%s", componentName, cacheName, cacheName)
-                : template.toF("%s://%s", componentName, cacheName);
-
+        FluentProducerTemplate t = template.toF("%s://%s", componentName, cacheName);
         t.withHeader(CaffeineConstants.ACTION, CaffeineConstants.ACTION_PUT);
         t.withHeader(CaffeineConstants.KEY, key);
         t.withBody(value);
@@ -79,11 +74,7 @@ public class CaffeineResource {
             @PathParam("cacheName") String cacheName,
             @PathParam("key") String key) {
 
-        // This won't be needed after https://issues.apache.org/jira/browse/CAMEL-15524
-        FluentProducerTemplate t = context.getRegistry().lookupByNameAndType(cacheName, Cache.class) != null
-                ? template.toF("%s://%s?cache=#%s", componentName, cacheName, cacheName)
-                : template.toF("%s://%s", componentName, cacheName);
-
+        FluentProducerTemplate t = template.toF("%s://%s", componentName, cacheName);
         t.withHeader(CaffeineConstants.ACTION, CaffeineConstants.ACTION_GET);
         t.withHeader(CaffeineConstants.KEY, key);
 
diff --git a/integration-tests/stringtemplate/src/test/java/org/apache/camel/quarkus/component/stringtemplate/it/StringtemplateTest.java b/integration-tests/stringtemplate/src/test/java/org/apache/camel/quarkus/component/stringtemplate/it/StringtemplateTest.java
index 976b4b6..4b3b371 100644
--- a/integration-tests/stringtemplate/src/test/java/org/apache/camel/quarkus/component/stringtemplate/it/StringtemplateTest.java
+++ b/integration-tests/stringtemplate/src/test/java/org/apache/camel/quarkus/component/stringtemplate/it/StringtemplateTest.java
@@ -71,7 +71,6 @@ class StringtemplateTest {
                 put("name", "Sheldon");
                 put("item", "7");
                 put(StringTemplateConstants.STRINGTEMPLATE_VARIABLE_MAP, variableMap);
-                put(StringTemplateConstants.STRINGTEMPLATE_RESOURCE_URI, variableMap);
             }
         };
         //`allowTemplateFromHeader` is need to be set to true because of https://issues.apache.org/jira/browse/CAMEL-15577
diff --git a/pom.xml b/pom.xml
index d82676c..ba64057 100644
--- a/pom.xml
+++ b/pom.xml
@@ -44,7 +44,7 @@
         <awssdk1-swf-libs.version>1.11.22</awssdk1-swf-libs.version>
         <awssdk2.version>2.14.3</awssdk2.version>
         <bouncycastle.version>1.66</bouncycastle.version>
-        <camel.version>3.5.0</camel.version>
+        <camel.version>3.6.0-SNAPSHOT</camel.version>
         <commons-beanutils.version>1.9.4</commons-beanutils.version><!-- keep in sync with Camel -->
         <commons-cli.version>1.4</commons-cli.version><!-- keep in sync with Quarkus, via quarkus-bootstrap-core -->
         <commons-collections.version>3.2.2</commons-collections.version><!-- used by hbase, should be pretty stable as commons-collections are not developed actively anymore -->
@@ -55,10 +55,11 @@
         <fommil.netlib.core.version>1.1.2</fommil.netlib.core.version><!-- Mess in Weka transitive deps -->
         <github-api.version>1.111</github-api.version>
         <google-http-client.version>1.34.0</google-http-client.version>
+        <google-api-common.version>1.9.0</google-api-common.version><!-- Mess in pubsub transitive deps vs google cloud deps -->
         <guava.version>29.0-jre</guava.version>
         <gson.version>2.8.5</gson.version>
         <hapi.version>4.1.0</hapi.version>
-        <hbase.version>2.2.3</hbase.version><!-- Keep in sync with Camel -->
+        <hbase.version>2.3.1</hbase.version><!-- Keep in sync with Camel -->
         <htrace.version>4.2.0-incubating</htrace.version><!-- Mess in hbase transitive deps -->
         <influxdb.version>2.20</influxdb.version>
         <jackson.version>2.10.5</jackson.version>
@@ -75,13 +76,14 @@
         <okhttp.version>3.14.6</okhttp.version><!-- keep in sync with okio -->
         <okio.version>1.17.2</okio.version><!-- keep in sync with okhttp -->
         <quarkus.version>1.9.0.Final</quarkus.version>
+        <opencensus-api.version>0.26.0</opencensus-api.version><!-- Mess in pubsub transitive deps vs google cloud deps -->
         <quarkus-qpid-jms.version>0.18.0</quarkus-qpid-jms.version>
         <protobuf.version>3.11.1</protobuf.version>
         <retrofit.version>2.5.0</retrofit.version>
         <smallrye.reactive.messaging.camel.version>2.4.0</smallrye.reactive.messaging.camel.version>
         <soap-api.version>1.4.0</soap-api.version><!-- keep in sync with Camel -->
         <!-- Keep spring.version aligned with the version used by Camel -->
-        <spring.version>5.2.8.RELEASE</spring.version>
+        <spring.version>5.2.9.RELEASE</spring.version>
         <snakeyaml.version>1.26</snakeyaml.version>
         <threetenbp.version>1.4.0</threetenbp.version>
         <xalan.version>2.7.2</xalan.version>
diff --git a/poms/bom/pom.xml b/poms/bom/pom.xml
index ac22461..1c8064e 100644
--- a/poms/bom/pom.xml
+++ b/poms/bom/pom.xml
@@ -5248,6 +5248,11 @@
                 </exclusions>
             </dependency>
             <dependency>
+                <groupId>com.google.api</groupId>
+                <artifactId>api-common</artifactId>
+                <version>${google-api-common.version}</version>
+            </dependency>
+            <dependency>
                 <groupId>com.google.api.grpc</groupId>
                 <artifactId>proto-google-common-protos</artifactId>
                 <version>${proto-google-common-protos.version}</version>
@@ -5400,6 +5405,11 @@
                 <version>${debezium.version}</version>
             </dependency>
             <dependency>
+                <groupId>io.opencensus</groupId>
+                <artifactId>opencensus-api</artifactId>
+                <version>${opencensus-api.version}</version>
+            </dependency>
+            <dependency>
                 <groupId>io.smallrye.reactive</groupId>
                 <artifactId>smallrye-reactive-messaging-camel</artifactId>
                 <version>${smallrye.reactive.messaging.camel.version}</version>


[camel-quarkus] 01/05: Remove QuarkusVertxHttpBinding

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 83d9c81c43bf65c3740dc996c48a9bde2bd1a70a
Author: James Netherton <ja...@gmail.com>
AuthorDate: Wed Sep 9 07:39:13 2020 +0100

    Remove QuarkusVertxHttpBinding
    
    Fixes #1675
---
 .../vertx/http/CamelVertxHttpRecorder.java          | 21 ---------------------
 1 file changed, 21 deletions(-)

diff --git a/extensions/vertx-http/runtime/src/main/java/org/apache/camel/quarkus/component/vertx/http/CamelVertxHttpRecorder.java b/extensions/vertx-http/runtime/src/main/java/org/apache/camel/quarkus/component/vertx/http/CamelVertxHttpRecorder.java
index 9e99c0f..2315134 100644
--- a/extensions/vertx-http/runtime/src/main/java/org/apache/camel/quarkus/component/vertx/http/CamelVertxHttpRecorder.java
+++ b/extensions/vertx-http/runtime/src/main/java/org/apache/camel/quarkus/component/vertx/http/CamelVertxHttpRecorder.java
@@ -19,14 +19,7 @@ package org.apache.camel.quarkus.component.vertx.http;
 import io.quarkus.runtime.RuntimeValue;
 import io.quarkus.runtime.annotations.Recorder;
 import io.vertx.core.Vertx;
-import io.vertx.core.buffer.Buffer;
-import io.vertx.ext.web.client.HttpRequest;
-import org.apache.camel.Exchange;
-import org.apache.camel.component.vertx.http.DefaultVertxHttpBinding;
 import org.apache.camel.component.vertx.http.VertxHttpComponent;
-import org.apache.camel.spi.HeaderFilterStrategy;
-import org.apache.camel.support.ExchangeHelper;
-import org.apache.camel.util.ObjectHelper;
 
 @Recorder
 public class CamelVertxHttpRecorder {
@@ -34,20 +27,6 @@ public class CamelVertxHttpRecorder {
     public RuntimeValue<?> createVertxHttpComponent(RuntimeValue<Vertx> vertx) {
         VertxHttpComponent component = new VertxHttpComponent();
         component.setVertx(vertx.getValue());
-        component.setVertxHttpBinding(new QuarkusVertxHttpBinding());
         return new RuntimeValue<>(component);
     }
-
-    // TODO: Remove when https://issues.apache.org/jira/browse/CAMEL-15495 is resolved see https://github.com/apache/camel-quarkus/issues/1675
-    static class QuarkusVertxHttpBinding extends DefaultVertxHttpBinding {
-        @Override
-        public void populateRequestHeaders(Exchange exchange, HttpRequest<Buffer> request, HeaderFilterStrategy strategy) {
-            super.populateRequestHeaders(exchange, request, strategy);
-
-            String contentType = ExchangeHelper.getContentType(exchange);
-            if (ObjectHelper.isNotEmpty(contentType)) {
-                request.putHeader(Exchange.CONTENT_TYPE, contentType);
-            }
-        }
-    }
 }


[camel-quarkus] 05/05: Test Geocoder with Google maps mock API if GOOGLE_GEOCODER_API_KEY is not provided fixes #1860

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 ed1eb3f1a1a90685d1656bd22acc8fc12c1b7ef7
Author: Zineb Bendhiba <be...@gmail.com>
AuthorDate: Wed Oct 7 16:38:15 2020 +0200

    Test Geocoder with Google maps mock API if GOOGLE_GEOCODER_API_KEY is not provided fixes #1860
---
 integration-tests/geocoder/pom.xml                 |  23 ++++
 .../geocoder/it/GeocoderGoogleResource.java        |  14 +--
 .../component/geocoder/it/MockApiService.java      |  54 +++++++++
 .../quarkus/component/geocoder/it/Routes.java      | 129 +++++++++++++++++++++
 .../src/main/resources/application.properties      |  11 +-
 .../component/geocoder/it/GeocoderGoogleIT.java    |   3 -
 .../component/geocoder/it/GeocoderGoogleTest.java  |   2 -
 7 files changed, 222 insertions(+), 14 deletions(-)

diff --git a/integration-tests/geocoder/pom.xml b/integration-tests/geocoder/pom.xml
index a649903..74267dc 100644
--- a/integration-tests/geocoder/pom.xml
+++ b/integration-tests/geocoder/pom.xml
@@ -57,6 +57,16 @@
             <artifactId>quarkus-resteasy-jsonb</artifactId>
         </dependency>
 
+        <!-- dependencies needed to mock Google maps API -->
+        <dependency>
+            <groupId>org.apache.camel.quarkus</groupId>
+            <artifactId>camel-quarkus-platform-http</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.camel.quarkus</groupId>
+            <artifactId>camel-quarkus-integration-test-support-mock-backend</artifactId>
+        </dependency>
+
 
         <!-- test dependencies -->
         <dependency>
@@ -84,6 +94,19 @@
                 </exclusion>
             </exclusions>
         </dependency>
+        <dependency>
+            <groupId>org.apache.camel.quarkus</groupId>
+            <artifactId>camel-quarkus-platform-http-deployment</artifactId>
+            <version>${project.version}</version>
+            <type>pom</type>
+            <scope>test</scope>
+            <exclusions>
+                <exclusion>
+                    <groupId>*</groupId>
+                    <artifactId>*</artifactId>
+                </exclusion>
+            </exclusions>
+        </dependency>
     </dependencies>
 
     <build>
diff --git a/integration-tests/geocoder/src/main/java/org/apache/camel/quarkus/component/geocoder/it/GeocoderGoogleResource.java b/integration-tests/geocoder/src/main/java/org/apache/camel/quarkus/component/geocoder/it/GeocoderGoogleResource.java
index 0bd2e2b..36c0a47 100644
--- a/integration-tests/geocoder/src/main/java/org/apache/camel/quarkus/component/geocoder/it/GeocoderGoogleResource.java
+++ b/integration-tests/geocoder/src/main/java/org/apache/camel/quarkus/component/geocoder/it/GeocoderGoogleResource.java
@@ -31,21 +31,21 @@ import org.jboss.logging.Logger;
 
 @Path("/google")
 @ApplicationScoped
+@Produces(MediaType.APPLICATION_JSON)
 public class GeocoderGoogleResource {
     private static final Logger LOG = Logger.getLogger(GeocoderGoogleResource.class);
 
     @Inject
     ProducerTemplate producerTemplate;
 
-    @ConfigProperty(name = "google.api.key")
-    String apiKey;
+    @ConfigProperty(name = "google.api.key", defaultValue = "AIzaFakeKey")
+    String googleApiKey;
 
     @GET
-    @Produces(MediaType.APPLICATION_JSON)
     public GeocodingResult[] getByCurrentLocation() {
         LOG.infof("Retrieve info from current location");
         final GeocodingResult[] response = producerTemplate.requestBody(
-                "geocoder:address:current?headersOnly=false&apiKey=" + apiKey,
+                String.format("geocoder:address:current?apiKey=%s", googleApiKey),
                 "Hello World", GeocodingResult[].class);
         LOG.infof("Response : %s", response);
         return response;
@@ -53,11 +53,10 @@ public class GeocoderGoogleResource {
 
     @Path("address/{address}")
     @GET
-    @Produces(MediaType.APPLICATION_JSON)
     public GeocodingResult[] getByAddress(@PathParam("address") String address) {
         LOG.infof("Retrieve info from address : %s", address);
         final GeocodingResult[] response = producerTemplate.requestBody(
-                "geocoder:address:" + address + "?apiKey=" + apiKey,
+                String.format("geocoder:address:%s?apiKey=%s", address, googleApiKey),
                 "Hello World", GeocodingResult[].class);
         LOG.infof("Response: %s", response);
         return response;
@@ -65,11 +64,10 @@ public class GeocoderGoogleResource {
 
     @Path("lat/{lat}/lon/{lon}")
     @GET
-    @Produces(MediaType.APPLICATION_JSON)
     public GeocodingResult[] getByCoordinate(@PathParam("lat") String latitude, @PathParam("lon") String longitude) {
         LOG.infof("Retrieve  info from georgraphic coordinates latitude : %s, longitude %s", latitude, longitude);
         final GeocodingResult[] response = producerTemplate.requestBody(
-                "geocoder:latlng:" + latitude + "," + longitude + "?apiKey=" + apiKey,
+                String.format("geocoder:latlng:%s,%s?apiKey=%s", latitude, longitude, googleApiKey),
                 "Hello World", GeocodingResult[].class);
         LOG.infof("Response : %s", response);
         return response;
diff --git a/integration-tests/geocoder/src/main/java/org/apache/camel/quarkus/component/geocoder/it/MockApiService.java b/integration-tests/geocoder/src/main/java/org/apache/camel/quarkus/component/geocoder/it/MockApiService.java
new file mode 100644
index 0000000..d86a7a7
--- /dev/null
+++ b/integration-tests/geocoder/src/main/java/org/apache/camel/quarkus/component/geocoder/it/MockApiService.java
@@ -0,0 +1,54 @@
+/*
+ * 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.geocoder.it;
+
+import java.lang.reflect.Field;
+
+import javax.enterprise.context.ApplicationScoped;
+
+import com.google.maps.GeoApiContext;
+
+@ApplicationScoped
+public class MockApiService {
+
+    public GeoApiContext createGeoApiContext(String baseUri, String apiKey)
+            throws IllegalAccessException, InstantiationException, NoSuchFieldException {
+        GeoApiContext.Builder builder = createGeoApiContext(baseUri);
+        builder.apiKey(apiKey);
+        return builder.build();
+    }
+
+    /**
+     * Creates a Builder and sets a new baseUrl for mock with reflection, because it is impossible to set it differently!
+     *
+     * @param  baseUrl
+     * @return
+     * @throws IllegalAccessException
+     * @throws InstantiationException
+     * @throws NoSuchFieldException
+     */
+    public GeoApiContext.Builder createGeoApiContext(String baseUrl)
+            throws IllegalAccessException, InstantiationException, NoSuchFieldException {
+        Class<?> clazz = GeoApiContext.Builder.class;
+        Object builder = clazz.newInstance();
+
+        Field f1 = builder.getClass().getDeclaredField("baseUrlOverride");
+        f1.setAccessible(true);
+        f1.set(builder, baseUrl);
+        return (GeoApiContext.Builder) builder;
+    }
+}
diff --git a/integration-tests/geocoder/src/main/java/org/apache/camel/quarkus/component/geocoder/it/Routes.java b/integration-tests/geocoder/src/main/java/org/apache/camel/quarkus/component/geocoder/it/Routes.java
new file mode 100644
index 0000000..3d96cde
--- /dev/null
+++ b/integration-tests/geocoder/src/main/java/org/apache/camel/quarkus/component/geocoder/it/Routes.java
@@ -0,0 +1,129 @@
+/*
+ * 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.geocoder.it;
+
+import javax.enterprise.context.ApplicationScoped;
+import javax.enterprise.inject.Produces;
+import javax.inject.Inject;
+import javax.inject.Named;
+
+import io.quarkus.arc.Unremovable;
+import org.apache.camel.Exchange;
+import org.apache.camel.builder.RouteBuilder;
+import org.apache.camel.component.geocoder.GeoCoderComponent;
+import org.apache.camel.quarkus.test.mock.backend.MockBackendUtils;
+import org.eclipse.microprofile.config.inject.ConfigProperty;
+
+@ApplicationScoped
+public class Routes extends RouteBuilder {
+
+    @ConfigProperty(name = "google.api.key")
+    String googleApiKey;
+    @ConfigProperty(name = "quarkus.http.test-port")
+    int httpTestPort;
+    @ConfigProperty(name = "quarkus.http.port")
+    int httpPort;
+    @Inject
+    MockApiService mockApiService;
+
+    private String getBaseUri() {
+        final boolean isNativeMode = "executable".equals(System.getProperty("org.graalvm.nativeimage.kind"));
+        return "AIzaFakeKey".equals(googleApiKey)
+                ? "http://localhost:" + (isNativeMode ? httpPort : httpTestPort)
+                : "https://maps.googleapis.com";
+    }
+
+    /**
+     * We need to implement some conditional configuration of the {@link GeoCoderComponent} thus we create it
+     * programmatically and publish via CDI.
+     *
+     * @return a configured {@link GeoCoderComponent}
+     */
+    @Produces
+    @ApplicationScoped
+    @Unremovable
+    @Named("geocoder")
+    GeoCoderComponent geocoderComponent() throws IllegalAccessException, NoSuchFieldException, InstantiationException {
+        final GeoCoderComponent result = new GeoCoderComponent();
+        result.setCamelContext(getContext());
+        result.setGeoApiContext(mockApiService.createGeoApiContext(getBaseUri(), googleApiKey));
+        return result;
+    }
+
+    @Override
+    public void configure() throws Exception {
+        if (MockBackendUtils.startMockBackend(true)) {
+            from("platform-http:///maps/api/geocode/json?httpMethodRestrict=GET")
+                    .process(e -> load(createMockGeocodeResponse(), e));
+            from("platform-http:///geolocation/v1/geolocate?httpMethodRestrict=POST")
+                    .process(e -> load(createMockGeolocateResponse(), e));
+        }
+    }
+
+    private String createMockGeolocateResponse() {
+        return "{\n" +
+                "  \"location\": {\n" +
+                "    \"lat\": 71.5388001,\n" +
+                "    \"lng\": -66.885417\n" +
+                "  },\n" +
+                "  \"accuracy\": 578963\n" +
+                "} ";
+    }
+
+    private String createMockGeocodeResponse() {
+        return "{\n"
+                + "   \"results\" : [\n"
+                + "      {\n"
+                + "         \"address_components\" : [\n"
+                + "            {\n"
+                + "               \"long_name\" : \"1600\",\n"
+                + "               \"short_name\" : \"1600\",\n"
+                + "               \"types\" : [ \"street_number\" ]\n"
+                + "            }\n"
+                + "         ],\n"
+                + "         \"formatted_address\" : \"1600 Amphitheatre Parkway, Mountain View, "
+                + "CA 94043, USA\",\n"
+                + "         \"geometry\" : {\n"
+                + "            \"location\" : {\n"
+                + "               \"lat\" : 37.4220033,\n"
+                + "               \"lng\" : -122.0839778\n"
+                + "            },\n"
+                + "            \"location_type\" : \"ROOFTOP\",\n"
+                + "            \"viewport\" : {\n"
+                + "               \"northeast\" : {\n"
+                + "                  \"lat\" : 37.4233522802915,\n"
+                + "                  \"lng\" : -122.0826288197085\n"
+                + "               },\n"
+                + "               \"southwest\" : {\n"
+                + "                  \"lat\" : 37.4206543197085,\n"
+                + "                  \"lng\" : -122.0853267802915\n"
+                + "               }\n"
+                + "            }\n"
+                + "         },\n"
+                + "         \"types\" : [ \"street_address\" ]\n"
+                + "      }\n"
+                + "   ],\n"
+                + "   \"status\" : \"OK\"\n"
+                + "}";
+
+    }
+
+    private void load(String response, Exchange exchange) {
+        exchange.getMessage().setBody(response);
+    }
+
+}
diff --git a/integration-tests/geocoder/src/main/resources/application.properties b/integration-tests/geocoder/src/main/resources/application.properties
index e30c662..8668957 100644
--- a/integration-tests/geocoder/src/main/resources/application.properties
+++ b/integration-tests/geocoder/src/main/resources/application.properties
@@ -19,6 +19,15 @@
 ################################
 #### properties for Google maps services
 # add your API KEY to run the examples
-google.api.key={{env.GOOGLE_API_KEY}}
+google.api.key=${GOOGLE_API_KEY:AIzaFakeKey}
+
+# You may want to export CAMEL_QUARKUS_START_MOCK_BACKEND=false to avoid starting he the mock Google Maps API
+# to make sure that you test against the real remote Google Maps API
+camel.quarkus.start-mock-backend=true
+
+# this configuration is needed only to mock Google Maps API
+quarkus.index-dependency.gmaps.group-id=com.google.maps
+quarkus.index-dependency.gmaps.artifact-id=google-maps-services
+quarkus.camel.native.reflection.include-patterns=com.google.maps.GeoApiContext$Builder
 
 
diff --git a/integration-tests/geocoder/src/test/java/org/apache/camel/quarkus/component/geocoder/it/GeocoderGoogleIT.java b/integration-tests/geocoder/src/test/java/org/apache/camel/quarkus/component/geocoder/it/GeocoderGoogleIT.java
index 1104d79..ed78c6e 100644
--- a/integration-tests/geocoder/src/test/java/org/apache/camel/quarkus/component/geocoder/it/GeocoderGoogleIT.java
+++ b/integration-tests/geocoder/src/test/java/org/apache/camel/quarkus/component/geocoder/it/GeocoderGoogleIT.java
@@ -17,10 +17,7 @@
 package org.apache.camel.quarkus.component.geocoder.it;
 
 import io.quarkus.test.junit.NativeImageTest;
-import org.junit.jupiter.api.condition.EnabledIfEnvironmentVariable;
 
 @NativeImageTest
-@EnabledIfEnvironmentVariable(named = "GOOGLE_API_KEY", matches = ".+")
 class GeocoderGoogleIT extends GeocoderGoogleTest {
-
 }
diff --git a/integration-tests/geocoder/src/test/java/org/apache/camel/quarkus/component/geocoder/it/GeocoderGoogleTest.java b/integration-tests/geocoder/src/test/java/org/apache/camel/quarkus/component/geocoder/it/GeocoderGoogleTest.java
index dbd8fb6..673002b 100644
--- a/integration-tests/geocoder/src/test/java/org/apache/camel/quarkus/component/geocoder/it/GeocoderGoogleTest.java
+++ b/integration-tests/geocoder/src/test/java/org/apache/camel/quarkus/component/geocoder/it/GeocoderGoogleTest.java
@@ -20,13 +20,11 @@ import io.quarkus.test.common.http.TestHTTPEndpoint;
 import io.quarkus.test.junit.QuarkusTest;
 import io.restassured.RestAssured;
 import org.junit.jupiter.api.Test;
-import org.junit.jupiter.api.condition.EnabledIfEnvironmentVariable;
 
 import static org.hamcrest.Matchers.hasKey;
 
 @QuarkusTest
 @TestHTTPEndpoint(GeocoderGoogleResource.class)
-@EnabledIfEnvironmentVariable(named = "GOOGLE_API_KEY", matches = ".+")
 class GeocoderGoogleTest {
 
     @Test