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/05/21 11:47:08 UTC

[camel-quarkus] branch master updated (7d5d932 -> 16a2adb)

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

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


    from 7d5d932  Automatically cancel redundant workflow runs
     new f282a95  Register required AHC classes for runtime initialization
     new 14dbc8e  Fix CamelContextCustomizerTest compilation errors
     new f70e74f  Upgrade to Quarkus 1.5.0.CR1
     new 16a2adb  Fixup Debezium PostgresSQL Connector native support #1191

The 4 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:
 .../pages/list-of-camel-quarkus-extensions.adoc    |  2 +-
 .../deployment/CamelContextCustomizerTest.java     |  4 ++-
 extensions-jvm/grpc/integration-test/pom.xml       | 36 ++++++++++++++++++++++
 .../ahc/deployment/SupportAhcProcessor.java        | 15 +++++++++
 .../deployment/SupportMongoDBProcessor.java        |  4 +--
 .../ahc/ws/deployment/AhcWsProcessor.java          |  5 +++
 pom.xml                                            |  3 +-
 poms/bom-test/pom.xml                              |  8 +++++
 8 files changed, 71 insertions(+), 6 deletions(-)


[camel-quarkus] 01/04: Register required AHC classes for runtime initialization

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

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

commit f282a957361b25005af4879e15f4a9f47f8488bd
Author: James Netherton <ja...@gmail.com>
AuthorDate: Thu Apr 23 15:08:53 2020 +0100

    Register required AHC classes for runtime initialization
    
    Fixes #1126
---
 .../support/ahc/deployment/SupportAhcProcessor.java       | 15 +++++++++++++++
 .../component/ahc/ws/deployment/AhcWsProcessor.java       |  5 +++++
 2 files changed, 20 insertions(+)

diff --git a/extensions-support/ahc/deployment/src/main/java/org/apache/camel/quarkus/component/support/ahc/deployment/SupportAhcProcessor.java b/extensions-support/ahc/deployment/src/main/java/org/apache/camel/quarkus/component/support/ahc/deployment/SupportAhcProcessor.java
index 9ae0aa8..dc1c53f 100644
--- a/extensions-support/ahc/deployment/src/main/java/org/apache/camel/quarkus/component/support/ahc/deployment/SupportAhcProcessor.java
+++ b/extensions-support/ahc/deployment/src/main/java/org/apache/camel/quarkus/component/support/ahc/deployment/SupportAhcProcessor.java
@@ -16,14 +16,22 @@
  */
 package org.apache.camel.quarkus.component.support.ahc.deployment;
 
+import io.quarkus.deployment.annotations.BuildProducer;
 import io.quarkus.deployment.annotations.BuildStep;
 import io.quarkus.deployment.builditem.ExtensionSslNativeSupportBuildItem;
 import io.quarkus.deployment.builditem.FeatureBuildItem;
 import io.quarkus.deployment.builditem.nativeimage.NativeImageResourceBuildItem;
+import io.quarkus.deployment.builditem.nativeimage.RuntimeInitializedClassBuildItem;
 
 class SupportAhcProcessor {
 
     private static final String FEATURE = "camel-support-ahc";
+    private static final String[] RUNTIME_INITIALIZED_CLASSES = new String[] {
+            "org.asynchttpclient.netty.channel.ChannelManager",
+            "org.asynchttpclient.netty.request.NettyRequestSender",
+            "org.asynchttpclient.RequestBuilderBase",
+            "org.asynchttpclient.resolver.RequestHostnameResolver"
+    };
 
     @BuildStep
     FeatureBuildItem feature() {
@@ -42,4 +50,11 @@ class SupportAhcProcessor {
         return new ExtensionSslNativeSupportBuildItem(FEATURE);
     }
 
+    @BuildStep
+    void runtimeInitializedClasses(BuildProducer<RuntimeInitializedClassBuildItem> runtimeInitializedClass) {
+        for (String className : RUNTIME_INITIALIZED_CLASSES) {
+            runtimeInitializedClass
+                    .produce(new RuntimeInitializedClassBuildItem(className));
+        }
+    }
 }
diff --git a/extensions/ahc-ws/deployment/src/main/java/org/apache/camel/quarkus/component/ahc/ws/deployment/AhcWsProcessor.java b/extensions/ahc-ws/deployment/src/main/java/org/apache/camel/quarkus/component/ahc/ws/deployment/AhcWsProcessor.java
index 09d5671..5171ec1 100644
--- a/extensions/ahc-ws/deployment/src/main/java/org/apache/camel/quarkus/component/ahc/ws/deployment/AhcWsProcessor.java
+++ b/extensions/ahc-ws/deployment/src/main/java/org/apache/camel/quarkus/component/ahc/ws/deployment/AhcWsProcessor.java
@@ -18,6 +18,7 @@ package org.apache.camel.quarkus.component.ahc.ws.deployment;
 
 import io.quarkus.deployment.annotations.BuildStep;
 import io.quarkus.deployment.builditem.FeatureBuildItem;
+import io.quarkus.deployment.builditem.nativeimage.RuntimeInitializedClassBuildItem;
 
 class AhcWsProcessor {
 
@@ -28,4 +29,8 @@ class AhcWsProcessor {
         return new FeatureBuildItem(FEATURE);
     }
 
+    @BuildStep
+    RuntimeInitializedClassBuildItem runtimeInitializedClasses() {
+        return new RuntimeInitializedClassBuildItem("org.asynchttpclient.netty.ws.NettyWebSocket");
+    }
 }


[camel-quarkus] 03/04: Upgrade to Quarkus 1.5.0.CR1

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

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

commit f70e74f5601619bba2c2e59b76545590873339ad
Author: Peter Palaga <pp...@redhat.com>
AuthorDate: Thu May 21 09:57:07 2020 +0200

    Upgrade to Quarkus 1.5.0.CR1
---
 extensions-jvm/grpc/integration-test/pom.xml       | 36 ++++++++++++++++++++++
 .../deployment/SupportMongoDBProcessor.java        |  4 +--
 pom.xml                                            |  3 +-
 poms/bom-test/pom.xml                              |  8 +++++
 4 files changed, 47 insertions(+), 4 deletions(-)

diff --git a/extensions-jvm/grpc/integration-test/pom.xml b/extensions-jvm/grpc/integration-test/pom.xml
index 878552b..b73114f 100644
--- a/extensions-jvm/grpc/integration-test/pom.xml
+++ b/extensions-jvm/grpc/integration-test/pom.xml
@@ -87,6 +87,42 @@
                 </executions>
             </plugin>
             <plugin>
+                <groupId>org.codehaus.gmaven</groupId>
+                <artifactId>groovy-maven-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <!-- gRPC is managed in Quarkus BOM but we still need ${grpc.version} for the protobuf-maven-plugin bellow -->
+                        <!-- To solve that we parse the Quarkus BOM POM and set the grpc.version property dynamically -->
+                        <!-- instead of hardcoding it -->
+                        <id>set-grpc-version-property</id>
+                        <phase>generate-sources</phase>
+                        <goals>
+                            <goal>execute</goal>
+                        </goals>
+                        <configuration>
+                            <properties>
+                                <localRepository>${settings.localRepository}</localRepository>
+                                <quarkusVersion>${quarkus.version}</quarkusVersion>
+                            </properties>
+                            <source>
+                                import java.nio.file.Path
+                                import java.nio.file.Paths
+                                import java.nio.file.Files
+                                final Path localMavenRepoPath = Paths.get(properties['localRepository'])
+                                final Path quarkusBomPath = localMavenRepoPath.resolve('io/quarkus/quarkus-bom/' + properties['quarkusVersion'] + '/quarkus-bom-' + properties['quarkusVersion'] + '.pom')
+                                if (!Files.exists(quarkusBomPath)) {
+                                    throw new IllegalStateException(quarkusBomPath + ' should exist')
+                                }
+                                def pomProject = new XmlParser().parseText(quarkusBomPath.getText('UTF-8'))
+                                final String grpcVersion = pomProject.properties.'grpc.version'.text()
+                                println 'setting grpc.version = ' + grpcVersion + ' as found in Quarkus BOM'
+                                project.properties['grpc.version'] = grpcVersion
+                            </source>
+                        </configuration>
+                    </execution>
+                </executions>
+            </plugin>
+            <plugin>
                 <groupId>org.xolstice.maven.plugins</groupId>
                 <artifactId>protobuf-maven-plugin</artifactId>
                 <extensions>true</extensions>
diff --git a/extensions-support/mongodb/deployment/src/main/java/org/apache/camel/quarkus/support/mongodb/deployment/SupportMongoDBProcessor.java b/extensions-support/mongodb/deployment/src/main/java/org/apache/camel/quarkus/support/mongodb/deployment/SupportMongoDBProcessor.java
index 3935138..ada330c 100644
--- a/extensions-support/mongodb/deployment/src/main/java/org/apache/camel/quarkus/support/mongodb/deployment/SupportMongoDBProcessor.java
+++ b/extensions-support/mongodb/deployment/src/main/java/org/apache/camel/quarkus/support/mongodb/deployment/SupportMongoDBProcessor.java
@@ -22,7 +22,7 @@ import io.quarkus.deployment.annotations.BuildProducer;
 import io.quarkus.deployment.annotations.BuildStep;
 import io.quarkus.deployment.builditem.FeatureBuildItem;
 import io.quarkus.mongodb.deployment.MongoClientBuildItem;
-import io.quarkus.mongodb.runtime.MongoClientRecorder;
+import io.quarkus.mongodb.runtime.MongoClientBeanUtil;
 import org.apache.camel.quarkus.core.deployment.spi.CamelRuntimeBeanBuildItem;
 
 class SupportMongoDBProcessor {
@@ -42,7 +42,7 @@ class SupportMongoDBProcessor {
         for (MongoClientBuildItem mongoClient : mongoClients) {
             // If there is a default mongo client instance, then bind it to the camel registry
             // with the default mongo client name used by the camel-mongodb component
-            if (MongoClientRecorder.DEFAULT_MONGOCLIENT_NAME.equals(mongoClient.getName())) {
+            if (MongoClientBeanUtil.isDefault(mongoClient.getName())) {
                 runtimeBeans.produce(
                         new CamelRuntimeBeanBuildItem(
                                 "camelMongoClient",
diff --git a/pom.xml b/pom.xml
index a1c762a..44ebd61 100644
--- a/pom.xml
+++ b/pom.xml
@@ -53,7 +53,6 @@
         <github-api.version>1.111</github-api.version>
         <google-http-client.version>1.22.0</google-http-client.version>
         <guava.version>26.0-jre</guava.version>
-        <grpc.version>1.27.0</grpc.version>
         <gson.version>2.8.5</gson.version>
         <hapi.version>4.1.0</hapi.version>
         <httpclient.cache.version>4.5.5</httpclient.cache.version>
@@ -68,7 +67,7 @@
         <mongodb.version>4.0.1</mongodb.version>
         <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.4.2.Final</quarkus.version>
+        <quarkus.version>1.5.0.CR1</quarkus.version>
         <quarkus-qpid-jms.version>0.14.1</quarkus-qpid-jms.version>
         <protobuf.version>3.11.1</protobuf.version>
         <retrofit.version>2.5.0</retrofit.version>
diff --git a/poms/bom-test/pom.xml b/poms/bom-test/pom.xml
index 69d8674..58a15df 100644
--- a/poms/bom-test/pom.xml
+++ b/poms/bom-test/pom.xml
@@ -46,6 +46,14 @@
                 <scope>import</scope>
             </dependency>
             <dependency>
+                <groupId>io.quarkus</groupId>
+                <artifactId>quarkus-bom-test</artifactId>
+                <version>${quarkus.version}</version>
+                <type>pom</type>
+                <scope>import</scope>
+            </dependency>
+
+            <dependency>
                 <groupId>org.apache.camel.quarkus</groupId>
                 <artifactId>camel-quarkus-integration-test-support-custom-dataformat</artifactId>
                 <version>${camel-quarkus.version}</version>


[camel-quarkus] 04/04: Fixup Debezium PostgresSQL Connector native support #1191

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

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

commit 16a2adbda4808af3a04b7371456e533cf14468ed
Author: Peter Palaga <pp...@redhat.com>
AuthorDate: Thu May 21 10:53:38 2020 +0200

    Fixup Debezium PostgresSQL Connector native support #1191
---
 docs/modules/ROOT/pages/list-of-camel-quarkus-extensions.adoc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/docs/modules/ROOT/pages/list-of-camel-quarkus-extensions.adoc b/docs/modules/ROOT/pages/list-of-camel-quarkus-extensions.adoc
index 6bdc5aa..ea31b6b 100644
--- a/docs/modules/ROOT/pages/list-of-camel-quarkus-extensions.adoc
+++ b/docs/modules/ROOT/pages/list-of-camel-quarkus-extensions.adoc
@@ -225,7 +225,7 @@ Level | Since | Description
 `debezium-mysql:name` | JVM +
  Preview | 1.0.0-M6 | Capture changes from a MySQL database.
 
-| link:https://camel.apache.org/components/latest/debezium-postgres-component.html[Debezium PostgresSQL Connector] (camel-quarkus-debezium-postgres) +
+| xref:extensions/debezium-postgres.adoc[Debezium PostgresSQL Connector] (camel-quarkus-debezium-postgres) +
 `debezium-postgres:name` | Native +
  Stable | 1.0.0-M6 | Capture changes from a PostgresSQL database.
 


[camel-quarkus] 02/04: Fix CamelContextCustomizerTest compilation errors

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

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

commit 14dbc8e7992bc8cec57ca9412553a148e6067c8a
Author: James Netherton <ja...@gmail.com>
AuthorDate: Mon Apr 27 08:15:05 2020 +0100

    Fix CamelContextCustomizerTest compilation errors
---
 .../camel/quarkus/core/deployment/CamelContextCustomizerTest.java     | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/extensions-core/core/deployment/src/test/java/org/apache/camel/quarkus/core/deployment/CamelContextCustomizerTest.java b/extensions-core/core/deployment/src/test/java/org/apache/camel/quarkus/core/deployment/CamelContextCustomizerTest.java
index 9b88090..1860248 100644
--- a/extensions-core/core/deployment/src/test/java/org/apache/camel/quarkus/core/deployment/CamelContextCustomizerTest.java
+++ b/extensions-core/core/deployment/src/test/java/org/apache/camel/quarkus/core/deployment/CamelContextCustomizerTest.java
@@ -51,7 +51,9 @@ public class CamelContextCustomizerTest {
                 builder.addBuildStep(new BuildStep() {
                     @Override
                     public void execute(BuildContext context) {
-                        BytecodeRecorderImpl bri = new BytecodeRecorderImpl(true, getClass().getSimpleName(), "execute");
+                        String methodName = "execute";
+                        BytecodeRecorderImpl bri = new BytecodeRecorderImpl(true, getClass().getSimpleName(), methodName,
+                                Integer.toString(methodName.hashCode()));
                         RuntimeValue<CamelContextCustomizer> value = bri
                                 .newInstance(RestConfigurationCustomizer.class.getName());
                         context.produce(new CamelContextCustomizerBuildItem(value));