You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by pp...@apache.org on 2021/08/05 19:30:04 UTC

[camel-quarkus] branch main updated (e7b01ea -> 08615de)

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

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


    from e7b01ea  xchange: explicitly register the CurrencyNames bundle at build time #2983
     new 558e1a1  Upgrade Camel to 3.11.1
     new a3df3f5  Remove workaround for Vert.x Buffer conversion
     new 08615de  Remove CamelBoxNativeApplicationStartedNotifier

The 3 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:
 .../http/deployment/PlatformHttpProcessor.java     |  9 ---
 .../runtime/CamelQuarkusVertxBufferConverter.java  | 39 -------------
 .../http/runtime/PlatformHttpRecorder.java         |  5 --
 .../runtime/VertxByteBufferConverterLoader.java    | 64 ----------------------
 .../CamelBoxNativeApplicationStartedNotifier.java  | 40 --------------
 ....quarkus.test.common.NativeImageStartedNotifier |  1 -
 pom.xml                                            |  4 +-
 7 files changed, 2 insertions(+), 160 deletions(-)
 delete mode 100644 extensions/platform-http/runtime/src/main/java/org/apache/camel/quarkus/component/platform/http/runtime/CamelQuarkusVertxBufferConverter.java
 delete mode 100644 extensions/platform-http/runtime/src/main/java/org/apache/camel/quarkus/component/platform/http/runtime/VertxByteBufferConverterLoader.java
 delete mode 100644 integration-tests/box/src/test/java/org/apache/camel/quarkus/component/box/it/CamelBoxNativeApplicationStartedNotifier.java
 delete mode 100644 integration-tests/box/src/test/resources/META-INF/services/io.quarkus.test.common.NativeImageStartedNotifier

[camel-quarkus] 02/03: Remove workaround for Vert.x Buffer conversion

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

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

commit a3df3f58284ccb2ec316f231ee890ad4317707da
Author: James Netherton <ja...@gmail.com>
AuthorDate: Thu Aug 5 12:52:26 2021 +0100

    Remove workaround for Vert.x Buffer conversion
    
    Fixes #2838
---
 .../http/deployment/PlatformHttpProcessor.java     |  9 ---
 .../runtime/CamelQuarkusVertxBufferConverter.java  | 39 -------------
 .../http/runtime/PlatformHttpRecorder.java         |  5 --
 .../runtime/VertxByteBufferConverterLoader.java    | 64 ----------------------
 4 files changed, 117 deletions(-)

diff --git a/extensions/platform-http/deployment/src/main/java/org/apache/camel/quarkus/component/platform/http/deployment/PlatformHttpProcessor.java b/extensions/platform-http/deployment/src/main/java/org/apache/camel/quarkus/component/platform/http/deployment/PlatformHttpProcessor.java
index 6f4d0da..e504a38 100644
--- a/extensions/platform-http/deployment/src/main/java/org/apache/camel/quarkus/component/platform/http/deployment/PlatformHttpProcessor.java
+++ b/extensions/platform-http/deployment/src/main/java/org/apache/camel/quarkus/component/platform/http/deployment/PlatformHttpProcessor.java
@@ -32,7 +32,6 @@ import org.apache.camel.quarkus.component.platform.http.runtime.PlatformHttpReco
 import org.apache.camel.quarkus.core.deployment.spi.CamelRuntimeBeanBuildItem;
 import org.apache.camel.quarkus.core.deployment.spi.CamelServiceFilter;
 import org.apache.camel.quarkus.core.deployment.spi.CamelServiceFilterBuildItem;
-import org.apache.camel.quarkus.core.deployment.spi.CamelTypeConverterLoaderBuildItem;
 
 class PlatformHttpProcessor {
     private static final String FEATURE = "camel-platform-http";
@@ -86,12 +85,4 @@ class PlatformHttpProcessor {
                 PlatformHttpComponent.class.getName(),
                 recorder.createComponent(engine.getInstance()));
     }
-
-    // TODO: Remove this when the underlying issue is fixed in VertxPlatformHttpSupport.writeResponse
-    // https://github.com/apache/camel-quarkus/issues/2838
-    @Record(ExecutionTime.STATIC_INIT)
-    @BuildStep
-    CamelTypeConverterLoaderBuildItem vertxByteBufferConverterLoader(PlatformHttpRecorder recorder) {
-        return new CamelTypeConverterLoaderBuildItem(recorder.createVertxByteBufferConverterLoader());
-    }
 }
diff --git a/extensions/platform-http/runtime/src/main/java/org/apache/camel/quarkus/component/platform/http/runtime/CamelQuarkusVertxBufferConverter.java b/extensions/platform-http/runtime/src/main/java/org/apache/camel/quarkus/component/platform/http/runtime/CamelQuarkusVertxBufferConverter.java
deleted file mode 100644
index 6d4bc60..0000000
--- a/extensions/platform-http/runtime/src/main/java/org/apache/camel/quarkus/component/platform/http/runtime/CamelQuarkusVertxBufferConverter.java
+++ /dev/null
@@ -1,39 +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.platform.http.runtime;
-
-import java.nio.ByteBuffer;
-
-import io.vertx.core.buffer.Buffer;
-import org.apache.camel.Converter;
-
-/**
- * Supplementary converter methods to the existing {@link VertxByteBufferConverterLoader}.
- *
- * TODO: Remove this class - https://github.com/apache/camel-quarkus/issues/2838
- */
-@Converter(generateLoader = true)
-public final class CamelQuarkusVertxBufferConverter {
-
-    private CamelQuarkusVertxBufferConverter() {
-    }
-
-    @Converter
-    public static ByteBuffer toByteBuffer(Buffer buffer) {
-        return buffer.getByteBuf().nioBuffer();
-    }
-}
diff --git a/extensions/platform-http/runtime/src/main/java/org/apache/camel/quarkus/component/platform/http/runtime/PlatformHttpRecorder.java b/extensions/platform-http/runtime/src/main/java/org/apache/camel/quarkus/component/platform/http/runtime/PlatformHttpRecorder.java
index b1f5580..29b7351 100644
--- a/extensions/platform-http/runtime/src/main/java/org/apache/camel/quarkus/component/platform/http/runtime/PlatformHttpRecorder.java
+++ b/extensions/platform-http/runtime/src/main/java/org/apache/camel/quarkus/component/platform/http/runtime/PlatformHttpRecorder.java
@@ -26,7 +26,6 @@ import org.apache.camel.component.platform.http.PlatformHttpComponent;
 import org.apache.camel.component.platform.http.spi.PlatformHttpEngine;
 import org.apache.camel.component.platform.http.vertx.VertxPlatformHttpEngine;
 import org.apache.camel.component.platform.http.vertx.VertxPlatformHttpRouter;
-import org.apache.camel.spi.TypeConverterLoader;
 
 @Recorder
 public class PlatformHttpRecorder {
@@ -50,8 +49,4 @@ public class PlatformHttpRecorder {
         };
         return new RuntimeValue<>(vertxPlatformHttpRouter);
     }
-
-    public RuntimeValue<TypeConverterLoader> createVertxByteBufferConverterLoader() {
-        return new RuntimeValue<>(new VertxByteBufferConverterLoader());
-    }
 }
diff --git a/extensions/platform-http/runtime/src/main/java/org/apache/camel/quarkus/component/platform/http/runtime/VertxByteBufferConverterLoader.java b/extensions/platform-http/runtime/src/main/java/org/apache/camel/quarkus/component/platform/http/runtime/VertxByteBufferConverterLoader.java
deleted file mode 100644
index 2a1dd25..0000000
--- a/extensions/platform-http/runtime/src/main/java/org/apache/camel/quarkus/component/platform/http/runtime/VertxByteBufferConverterLoader.java
+++ /dev/null
@@ -1,64 +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.platform.http.runtime;
-
-import org.apache.camel.CamelContext;
-import org.apache.camel.CamelContextAware;
-import org.apache.camel.DeferredContextBinding;
-import org.apache.camel.TypeConverterLoaderException;
-import org.apache.camel.spi.TypeConverterLoader;
-import org.apache.camel.spi.TypeConverterRegistry;
-import org.apache.camel.support.SimpleTypeConverter;
-
-/**
- * TODO: Remove this class - https://github.com/apache/camel-quarkus/issues/2838
- */
-@SuppressWarnings("unchecked")
-@DeferredContextBinding
-public final class VertxByteBufferConverterLoader implements TypeConverterLoader, CamelContextAware {
-
-    private CamelContext camelContext;
-
-    public VertxByteBufferConverterLoader() {
-    }
-
-    @Override
-    public void setCamelContext(CamelContext camelContext) {
-        this.camelContext = camelContext;
-    }
-
-    @Override
-    public CamelContext getCamelContext() {
-        return camelContext;
-    }
-
-    @Override
-    public void load(TypeConverterRegistry registry) throws TypeConverterLoaderException {
-        registerConverters(registry);
-    }
-
-    private void registerConverters(TypeConverterRegistry registry) {
-        addTypeConverter(registry, java.nio.ByteBuffer.class, io.vertx.core.buffer.Buffer.class, false,
-                (type, exchange, value) -> CamelQuarkusVertxBufferConverter
-                        .toByteBuffer((io.vertx.core.buffer.Buffer) value));
-    }
-
-    private static void addTypeConverter(TypeConverterRegistry registry, Class<?> toType, Class<?> fromType, boolean allowNull,
-            SimpleTypeConverter.ConversionMethod method) {
-        registry.addTypeConverter(toType, fromType, new SimpleTypeConverter(allowNull, method));
-    }
-}

[camel-quarkus] 03/03: Remove CamelBoxNativeApplicationStartedNotifier

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

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

commit 08615de42a9641f7b159ce45ad5bea270a03c2db
Author: James Netherton <ja...@gmail.com>
AuthorDate: Thu Aug 5 13:06:01 2021 +0100

    Remove CamelBoxNativeApplicationStartedNotifier
    
    Fixes #2830
---
 .../CamelBoxNativeApplicationStartedNotifier.java  | 40 ----------------------
 ....quarkus.test.common.NativeImageStartedNotifier |  1 -
 2 files changed, 41 deletions(-)

diff --git a/integration-tests/box/src/test/java/org/apache/camel/quarkus/component/box/it/CamelBoxNativeApplicationStartedNotifier.java b/integration-tests/box/src/test/java/org/apache/camel/quarkus/component/box/it/CamelBoxNativeApplicationStartedNotifier.java
deleted file mode 100644
index 655b900..0000000
--- a/integration-tests/box/src/test/java/org/apache/camel/quarkus/component/box/it/CamelBoxNativeApplicationStartedNotifier.java
+++ /dev/null
@@ -1,40 +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.box.it;
-
-import java.nio.file.Paths;
-import java.util.concurrent.TimeUnit;
-
-import io.quarkus.bootstrap.util.IoUtils;
-import io.quarkus.test.common.NativeImageStartedNotifier;
-import org.awaitility.Awaitility;
-
-/**
- * TODO: Investigate why the native app takes so long to start and eventually remove this
- * https://github.com/apache/camel-quarkus/issues/2830
- */
-public class CamelBoxNativeApplicationStartedNotifier implements NativeImageStartedNotifier {
-
-    @Override
-    public boolean isNativeImageStarted() {
-        Awaitility.await().pollDelay(1, TimeUnit.SECONDS).timeout(30, TimeUnit.SECONDS).until(() -> {
-            String log = IoUtils.readFile(Paths.get("target/quarkus.log"));
-            return log.contains("Installed features");
-        });
-        return true;
-    }
-}
diff --git a/integration-tests/box/src/test/resources/META-INF/services/io.quarkus.test.common.NativeImageStartedNotifier b/integration-tests/box/src/test/resources/META-INF/services/io.quarkus.test.common.NativeImageStartedNotifier
deleted file mode 100644
index efacdf3..0000000
--- a/integration-tests/box/src/test/resources/META-INF/services/io.quarkus.test.common.NativeImageStartedNotifier
+++ /dev/null
@@ -1 +0,0 @@
-org.apache.camel.quarkus.component.box.it.CamelBoxNativeApplicationStartedNotifier
\ No newline at end of file

[camel-quarkus] 01/03: Upgrade Camel to 3.11.1

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

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

commit 558e1a1f42adf571d3081dc6409c532a999622d4
Author: James Netherton <ja...@gmail.com>
AuthorDate: Thu Aug 5 12:50:46 2021 +0100

    Upgrade Camel to 3.11.1
---
 pom.xml | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/pom.xml b/pom.xml
index ac4e32f..9ed7a5d 100644
--- a/pom.xml
+++ b/pom.xml
@@ -23,7 +23,7 @@
     <parent>
         <groupId>org.apache.camel</groupId>
         <artifactId>camel-dependencies</artifactId>
-        <version>3.11.0</version>
+        <version>3.11.1</version>
     </parent>
 
     <groupId>org.apache.camel.quarkus</groupId>
@@ -39,7 +39,7 @@
     <properties>
         <!-- Primary dependencies - maintained manually -->
         <camel.major.minor>3.11</camel.major.minor> <!-- run after each change: cd docs && mvnd validate -->
-        <camel.version>${camel.major.minor}.0</camel.version>
+        <camel.version>${camel.major.minor}.1</camel.version>
         <camel.docs.components.xref>${camel.major.minor}.x@components</camel.docs.components.xref><!-- the version in Camel's docs/components/antora.yml -->
         <camel.docs.branch>camel-${camel.major.minor}.x</camel.docs.branch><!-- The stable branch on which our Antora docs depends -->