This is an automated email from the ASF dual-hosted git repository. ppalaga pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/camel-quarkus.git
commit 301f3c9e0e0bd99fe10e64d3802d672ac9c40b77 Author: Peter Palaga <ppal...@redhat.com> AuthorDate: Mon Feb 15 10:21:29 2021 +0100 AWS 2 Kinesis native support #1571 --- .../pages/reference/extensions/aws2-kinesis.adoc | 14 ++-- .../components/aws2-kinesis-firehose.adoc | 6 +- .../reference/components/aws2-kinesis.adoc | 6 +- .../aws2-kinesis/integration-test/pom.xml | 83 ---------------------- .../aws2/kinesis/it/Aws2KinesisResource.java | 64 ----------------- .../component/aws2/kinesis/it/Aws2KinesisTest.java | 42 ----------- extensions-jvm/pom.xml | 1 - extensions-support/aws2/deployment/pom.xml | 4 ++ extensions-support/aws2/runtime/pom.xml | 4 ++ .../aws2-kinesis/deployment/pom.xml | 4 ++ .../kinesis/deployment/Aws2KinesisProcessor.java | 14 ---- .../aws2-kinesis/pom.xml | 1 - .../aws2-kinesis/runtime/pom.xml | 6 ++ .../main/resources/META-INF/quarkus-extension.yaml | 5 +- extensions/pom.xml | 1 + 15 files changed, 38 insertions(+), 217 deletions(-) diff --git a/docs/modules/ROOT/pages/reference/extensions/aws2-kinesis.adoc b/docs/modules/ROOT/pages/reference/extensions/aws2-kinesis.adoc index f1399b5..d24cafb 100644 --- a/docs/modules/ROOT/pages/reference/extensions/aws2-kinesis.adoc +++ b/docs/modules/ROOT/pages/reference/extensions/aws2-kinesis.adoc @@ -2,15 +2,15 @@ // This file was generated by camel-quarkus-maven-plugin:update-extension-doc-page = AWS 2 Kinesis :cq-artifact-id: camel-quarkus-aws2-kinesis -:cq-native-supported: false -:cq-status: Preview +:cq-native-supported: true +:cq-status: Stable :cq-description: Consume and produce records from AWS Kinesis Streams using AWS SDK version 2.x. :cq-deprecated: false :cq-jvm-since: 1.1.0 -:cq-native-since: n/a +:cq-native-since: 1.7.0 [.badges] -[.badge-key]##JVM since##[.badge-supported]##1.1.0## [.badge-key]##Native##[.badge-unsupported]##unsupported## +[.badge-key]##JVM since##[.badge-supported]##1.1.0## [.badge-key]##Native since##[.badge-supported]##1.7.0## Consume and produce records from AWS Kinesis Streams using AWS SDK version 2.x. @@ -32,3 +32,9 @@ Please refer to the above links for usage and configuration details. ---- Check the xref:user-guide/index.adoc[User guide] for more information about writing Camel Quarkus applications. + +== SSL in native mode + +This extension auto-enables SSL support in native mode. Hence you do not need to add +`quarkus.ssl.native=true` to your `application.properties` yourself. See also +https://quarkus.io/guides/native-and-ssl[Quarkus SSL guide]. diff --git a/docs/modules/ROOT/partials/reference/components/aws2-kinesis-firehose.adoc b/docs/modules/ROOT/partials/reference/components/aws2-kinesis-firehose.adoc index 0b33997..d577299 100644 --- a/docs/modules/ROOT/partials/reference/components/aws2-kinesis-firehose.adoc +++ b/docs/modules/ROOT/partials/reference/components/aws2-kinesis-firehose.adoc @@ -2,11 +2,11 @@ // This file was generated by camel-quarkus-maven-plugin:update-extension-doc-page :cq-artifact-id: camel-quarkus-aws2-kinesis :cq-artifact-id-base: aws2-kinesis -:cq-native-supported: false -:cq-status: Preview +:cq-native-supported: true +:cq-status: Stable :cq-deprecated: false :cq-jvm-since: 1.1.0 -:cq-native-since: n/a +:cq-native-since: 1.7.0 :cq-camel-part-name: aws2-kinesis-firehose :cq-camel-part-title: AWS 2 Kinesis Firehose :cq-camel-part-description: Produce data to AWS Kinesis Firehose streams using AWS SDK version 2.x. diff --git a/docs/modules/ROOT/partials/reference/components/aws2-kinesis.adoc b/docs/modules/ROOT/partials/reference/components/aws2-kinesis.adoc index 5ea7f1e..7c0f6e2 100644 --- a/docs/modules/ROOT/partials/reference/components/aws2-kinesis.adoc +++ b/docs/modules/ROOT/partials/reference/components/aws2-kinesis.adoc @@ -2,11 +2,11 @@ // This file was generated by camel-quarkus-maven-plugin:update-extension-doc-page :cq-artifact-id: camel-quarkus-aws2-kinesis :cq-artifact-id-base: aws2-kinesis -:cq-native-supported: false -:cq-status: Preview +:cq-native-supported: true +:cq-status: Stable :cq-deprecated: false :cq-jvm-since: 1.1.0 -:cq-native-since: n/a +:cq-native-since: 1.7.0 :cq-camel-part-name: aws2-kinesis :cq-camel-part-title: AWS 2 Kinesis :cq-camel-part-description: Consume and produce records from and to AWS Kinesis Streams using AWS SDK version 2.x. diff --git a/extensions-jvm/aws2-kinesis/integration-test/pom.xml b/extensions-jvm/aws2-kinesis/integration-test/pom.xml deleted file mode 100644 index be1bf18..0000000 --- a/extensions-jvm/aws2-kinesis/integration-test/pom.xml +++ /dev/null @@ -1,83 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - - 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. - ---> -<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> - <modelVersion>4.0.0</modelVersion> - <parent> - <groupId>org.apache.camel.quarkus</groupId> - <artifactId>camel-quarkus-build-parent-it</artifactId> - <version>1.7.0-SNAPSHOT</version> - <relativePath>../../../poms/build-parent-it/pom.xml</relativePath> - </parent> - - <artifactId>camel-quarkus-aws2-kinesis-integration-test</artifactId> - <name>Camel Quarkus :: AWS 2 Kinesis :: Integration Test</name> - <description>Integration tests for Camel Quarkus AWS 2 Kinesis extension</description> - - <dependencyManagement> - <dependencies> - <dependency> - <groupId>org.apache.camel.quarkus</groupId> - <artifactId>camel-quarkus-bom-test</artifactId> - <version>${project.version}</version> - <type>pom</type> - <scope>import</scope> - </dependency> - </dependencies> - </dependencyManagement> - - <dependencies> - <dependency> - <groupId>org.apache.camel.quarkus</groupId> - <artifactId>camel-quarkus-aws2-kinesis</artifactId> - </dependency> - <dependency> - <groupId>io.quarkus</groupId> - <artifactId>quarkus-resteasy</artifactId> - </dependency> - - <!-- test dependencies --> - <dependency> - <groupId>io.quarkus</groupId> - <artifactId>quarkus-junit5</artifactId> - <scope>test</scope> - </dependency> - <dependency> - <groupId>io.rest-assured</groupId> - <artifactId>rest-assured</artifactId> - <scope>test</scope> - </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-aws2-kinesis-deployment</artifactId> - <version>${project.version}</version> - <type>pom</type> - <scope>test</scope> - <exclusions> - <exclusion> - <groupId>*</groupId> - <artifactId>*</artifactId> - </exclusion> - </exclusions> - </dependency> - </dependencies> - -</project> diff --git a/extensions-jvm/aws2-kinesis/integration-test/src/main/java/org/apache/camel/quarkus/component/aws2/kinesis/it/Aws2KinesisResource.java b/extensions-jvm/aws2-kinesis/integration-test/src/main/java/org/apache/camel/quarkus/component/aws2/kinesis/it/Aws2KinesisResource.java deleted file mode 100644 index 850f485..0000000 --- a/extensions-jvm/aws2-kinesis/integration-test/src/main/java/org/apache/camel/quarkus/component/aws2/kinesis/it/Aws2KinesisResource.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.aws2.kinesis.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("/aws2-kinesis") -@ApplicationScoped -public class Aws2KinesisResource { - - private static final Logger LOG = Logger.getLogger(Aws2KinesisResource.class); - - private static final String COMPONENT_AWS2_KINESIS = "aws2-kinesis"; - private static final String COMPONENT_AWS2_KINESIS_FIREHOSE = "aws2-kinesis-firehose"; - @Inject - CamelContext context; - - @Path("/load/component/aws2-kinesis") - @GET - @Produces(MediaType.TEXT_PLAIN) - public Response loadComponentAws2Kinesis() throws Exception { - /* This is an autogenerated test */ - if (context.getComponent(COMPONENT_AWS2_KINESIS) != null) { - return Response.ok().build(); - } - LOG.warnf("Could not load [%s] from the Camel context", COMPONENT_AWS2_KINESIS); - return Response.status(500, COMPONENT_AWS2_KINESIS + " could not be loaded from the Camel context").build(); - } - - @Path("/load/component/aws2-kinesis-firehose") - @GET - @Produces(MediaType.TEXT_PLAIN) - public Response loadComponentAws2KinesisFirehose() throws Exception { - /* This is an autogenerated test */ - if (context.getComponent(COMPONENT_AWS2_KINESIS_FIREHOSE) != null) { - return Response.ok().build(); - } - LOG.warnf("Could not load [%s] from the Camel context", COMPONENT_AWS2_KINESIS_FIREHOSE); - return Response.status(500, COMPONENT_AWS2_KINESIS_FIREHOSE + " could not be loaded from the Camel context").build(); - } -} diff --git a/extensions-jvm/aws2-kinesis/integration-test/src/test/java/org/apache/camel/quarkus/component/aws2/kinesis/it/Aws2KinesisTest.java b/extensions-jvm/aws2-kinesis/integration-test/src/test/java/org/apache/camel/quarkus/component/aws2/kinesis/it/Aws2KinesisTest.java deleted file mode 100644 index 050bac2..0000000 --- a/extensions-jvm/aws2-kinesis/integration-test/src/test/java/org/apache/camel/quarkus/component/aws2/kinesis/it/Aws2KinesisTest.java +++ /dev/null @@ -1,42 +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.aws2.kinesis.it; - -import io.quarkus.test.junit.QuarkusTest; -import io.restassured.RestAssured; -import org.junit.jupiter.api.Test; - -@QuarkusTest -class Aws2KinesisTest { - - @Test - public void loadComponentAws2Kinesis() { - /* A simple autogenerated test */ - RestAssured.get("/aws2-kinesis/load/component/aws2-kinesis") - .then() - .statusCode(200); - } - - @Test - public void loadComponentAws2KinesisFirehose() { - /* A simple autogenerated test */ - RestAssured.get("/aws2-kinesis/load/component/aws2-kinesis-firehose") - .then() - .statusCode(200); - } - -} diff --git a/extensions-jvm/pom.xml b/extensions-jvm/pom.xml index 723eda3..41c2b3b 100644 --- a/extensions-jvm/pom.xml +++ b/extensions-jvm/pom.xml @@ -40,7 +40,6 @@ <module>atmos</module> <module>atomix</module> <module>aws-xray</module> - <module>aws2-kinesis</module> <module>barcode</module> <module>beanio</module> <module>beanstalk</module> diff --git a/extensions-support/aws2/deployment/pom.xml b/extensions-support/aws2/deployment/pom.xml index 949801c..805f47a 100644 --- a/extensions-support/aws2/deployment/pom.xml +++ b/extensions-support/aws2/deployment/pom.xml @@ -35,6 +35,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-support-aws2</artifactId> </dependency> </dependencies> diff --git a/extensions-support/aws2/runtime/pom.xml b/extensions-support/aws2/runtime/pom.xml index ad1f539..559eaa4 100644 --- a/extensions-support/aws2/runtime/pom.xml +++ b/extensions-support/aws2/runtime/pom.xml @@ -51,6 +51,10 @@ <artifactId>camel-quarkus-core</artifactId> </dependency> <dependency> + <groupId>org.apache.camel.quarkus</groupId> + <artifactId>camel-quarkus-support-commons-logging</artifactId> + </dependency> + <dependency> <groupId>software.amazon.awssdk</groupId> <artifactId>apache-client</artifactId> </dependency> diff --git a/extensions-jvm/aws2-kinesis/deployment/pom.xml b/extensions/aws2-kinesis/deployment/pom.xml similarity index 93% rename from extensions-jvm/aws2-kinesis/deployment/pom.xml rename to extensions/aws2-kinesis/deployment/pom.xml index e73178e..36100b3 100644 --- a/extensions-jvm/aws2-kinesis/deployment/pom.xml +++ b/extensions/aws2-kinesis/deployment/pom.xml @@ -36,6 +36,10 @@ </dependency> <dependency> <groupId>org.apache.camel.quarkus</groupId> + <artifactId>camel-quarkus-support-aws2-deployment</artifactId> + </dependency> + <dependency> + <groupId>org.apache.camel.quarkus</groupId> <artifactId>camel-quarkus-aws2-kinesis</artifactId> </dependency> </dependencies> diff --git a/extensions-jvm/aws2-kinesis/deployment/src/main/java/org/apache/camel/quarkus/component/aws2/kinesis/deployment/Aws2KinesisProcessor.java b/extensions/aws2-kinesis/deployment/src/main/java/org/apache/camel/quarkus/component/aws2/kinesis/deployment/Aws2KinesisProcessor.java similarity index 68% rename from extensions-jvm/aws2-kinesis/deployment/src/main/java/org/apache/camel/quarkus/component/aws2/kinesis/deployment/Aws2KinesisProcessor.java rename to extensions/aws2-kinesis/deployment/src/main/java/org/apache/camel/quarkus/component/aws2/kinesis/deployment/Aws2KinesisProcessor.java index b81708d..7a55071 100644 --- a/extensions-jvm/aws2-kinesis/deployment/src/main/java/org/apache/camel/quarkus/component/aws2/kinesis/deployment/Aws2KinesisProcessor.java +++ b/extensions/aws2-kinesis/deployment/src/main/java/org/apache/camel/quarkus/component/aws2/kinesis/deployment/Aws2KinesisProcessor.java @@ -17,11 +17,7 @@ package org.apache.camel.quarkus.component.aws2.kinesis.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 Aws2KinesisProcessor { @@ -33,14 +29,4 @@ class Aws2KinesisProcessor { 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/aws2-kinesis/pom.xml b/extensions/aws2-kinesis/pom.xml similarity index 97% rename from extensions-jvm/aws2-kinesis/pom.xml rename to extensions/aws2-kinesis/pom.xml index 011f4ef..7c969f1 100644 --- a/extensions-jvm/aws2-kinesis/pom.xml +++ b/extensions/aws2-kinesis/pom.xml @@ -33,6 +33,5 @@ <modules> <module>deployment</module> <module>runtime</module> - <module>integration-test</module> </modules> </project> diff --git a/extensions-jvm/aws2-kinesis/runtime/pom.xml b/extensions/aws2-kinesis/runtime/pom.xml similarity index 93% rename from extensions-jvm/aws2-kinesis/runtime/pom.xml rename to extensions/aws2-kinesis/runtime/pom.xml index 4cbb7e9..e83b112 100644 --- a/extensions-jvm/aws2-kinesis/runtime/pom.xml +++ b/extensions/aws2-kinesis/runtime/pom.xml @@ -32,6 +32,8 @@ <properties> <camel.quarkus.jvmSince>1.1.0</camel.quarkus.jvmSince> + <camel.quarkus.nativeSince>1.7.0</camel.quarkus.nativeSince> + <quarkus.metadata.keywords>Amazon</quarkus.metadata.keywords> </properties> <dependencyManagement> @@ -55,6 +57,10 @@ <groupId>org.apache.camel</groupId> <artifactId>camel-aws2-kinesis</artifactId> </dependency> + <dependency> + <groupId>org.apache.camel.quarkus</groupId> + <artifactId>camel-quarkus-support-aws2</artifactId> + </dependency> </dependencies> <build> diff --git a/extensions-jvm/aws2-kinesis/runtime/src/main/resources/META-INF/quarkus-extension.yaml b/extensions/aws2-kinesis/runtime/src/main/resources/META-INF/quarkus-extension.yaml similarity index 96% rename from extensions-jvm/aws2-kinesis/runtime/src/main/resources/META-INF/quarkus-extension.yaml rename to extensions/aws2-kinesis/runtime/src/main/resources/META-INF/quarkus-extension.yaml index 7877047..010e72f 100644 --- a/extensions-jvm/aws2-kinesis/runtime/src/main/resources/META-INF/quarkus-extension.yaml +++ b/extensions/aws2-kinesis/runtime/src/main/resources/META-INF/quarkus-extension.yaml @@ -24,9 +24,10 @@ name: "Camel AWS 2 Kinesis" description: "Consume and produce records from AWS Kinesis Streams using AWS SDK version 2.x" metadata: - unlisted: true + keywords: + - "Amazon" guide: "https://camel.apache.org/camel-quarkus/latest/reference/extensions/aws2-kinesis.html" categories: - "integration" status: - - "preview" + - "stable" diff --git a/extensions/pom.xml b/extensions/pom.xml index 0081742..0c845f0 100644 --- a/extensions/pom.xml +++ b/extensions/pom.xml @@ -65,6 +65,7 @@ <module>aws2-eks</module> <module>aws2-eventbridge</module> <module>aws2-iam</module> + <module>aws2-kinesis</module> <module>aws2-kms</module> <module>aws2-lambda</module> <module>aws2-mq</module>