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 f82014cb4efc1e72ce47028f5f503a50403a466e Author: James Netherton <[email protected]> AuthorDate: Wed Jun 10 11:15:07 2020 +0100 Add vertx component extension Fixes #1322 --- .github/test-categories.yaml | 1 + docs/modules/ROOT/pages/extensions/vertx.adoc | 28 +++++ .../pages/list-of-camel-quarkus-extensions.adoc | 4 +- extensions/pom.xml | 1 + extensions/vertx/deployment/pom.xml | 79 +++++++++++++ .../component/vertx/deployment/VertxProcessor.java | 38 ++++++ extensions/vertx/pom.xml | 39 +++++++ extensions/vertx/runtime/pom.xml | 98 ++++++++++++++++ .../main/resources/META-INF/quarkus-extension.yaml | 29 +++++ integration-tests/pom.xml | 1 + integration-tests/vertx/pom.xml | 130 +++++++++++++++++++++ .../quarkus/component/vertx/it/VertxResource.java | 45 +++++++ .../quarkus/component/vertx/it/VertxRoutes.java | 31 +++++ .../camel/quarkus/component/vertx/it/VertxIT.java | 24 ++++ .../quarkus/component/vertx/it/VertxTest.java | 40 +++++++ poms/bom-deployment/pom.xml | 5 + poms/bom/pom.xml | 10 ++ 17 files changed, 602 insertions(+), 1 deletion(-) diff --git a/.github/test-categories.yaml b/.github/test-categories.yaml index dd4a937..a875168 100644 --- a/.github/test-categories.yaml +++ b/.github/test-categories.yaml @@ -84,6 +84,7 @@ misc: - qute - stream - tarfile + - vertx networking: - ftp - http diff --git a/docs/modules/ROOT/pages/extensions/vertx.adoc b/docs/modules/ROOT/pages/extensions/vertx.adoc new file mode 100644 index 0000000..30750a7 --- /dev/null +++ b/docs/modules/ROOT/pages/extensions/vertx.adoc @@ -0,0 +1,28 @@ +// Do not edit directly! +// This file was generated by camel-quarkus-package-maven-plugin:update-extension-doc-page + +[[vertx]] += Vert.x + +[.badges] +[.badge-key]##Since Camel Quarkus##[.badge-version]##1.0.0-CR2## [.badge-key]##JVM##[.badge-supported]##supported## [.badge-key]##Native##[.badge-supported]##supported## + +Send and receive messages to/from Vert.x Event Bus. + +== What's inside + +* https://camel.apache.org/components/latest/vertx-component.html[Vert.x component], URI syntax: `vertx:address` + +Please refer to the above link for usage and configuration details. + +== Maven coordinates + +[source,xml] +---- +<dependency> + <groupId>org.apache.camel.quarkus</groupId> + <artifactId>camel-quarkus-vertx</artifactId> +</dependency> +---- + +Check the xref:user-guide/index.adoc[User guide] for more information about writing Camel Quarkus applications. 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 39bc55f..66e1083 100644 --- a/docs/modules/ROOT/pages/list-of-camel-quarkus-extensions.adoc +++ b/docs/modules/ROOT/pages/list-of-camel-quarkus-extensions.adoc @@ -18,7 +18,7 @@ In case you are missing some Camel feature in the list: == Camel Components // components: START -Number of Camel components: 148 in 113 JAR artifacts (0 deprecated) +Number of Camel components: 149 in 114 JAR artifacts (0 deprecated) [width="100%",cols="4,1,1,1,5",options="header"] |=== @@ -316,6 +316,8 @@ Number of Camel components: 148 in 113 JAR artifacts (0 deprecated) | xref:extensions/validator.adoc[Validator] | camel-quarkus-validator | Native + Stable | 0.4.0 | Validate the payload using XML Schema and JAXP Validation. +| xref:extensions/vertx.adoc[Vert.x] | camel-quarkus-vertx | Native + Stable | 1.0.0-CR2 | Send and receive messages to/from Vert.x Event Bus. + | xref:extensions/vm.adoc[VM] | camel-quarkus-vm | Native + Stable | 0.3.0 | Call another endpoint in the same CamelContext asynchronously. | xref:extensions/xslt.adoc[XSLT] | camel-quarkus-xslt | Native + Stable | 0.4.0 | Transforms XML payload using an XSLT template. diff --git a/extensions/pom.xml b/extensions/pom.xml index ca2c659..cc8032e 100644 --- a/extensions/pom.xml +++ b/extensions/pom.xml @@ -150,6 +150,7 @@ <module>timer</module> <module>twitter</module> <module>validator</module> + <module>vertx</module> <module>vm</module> <module>websocket-jsr356</module> <module>xpath</module> diff --git a/extensions/vertx/deployment/pom.xml b/extensions/vertx/deployment/pom.xml new file mode 100644 index 0000000..baa18c6 --- /dev/null +++ b/extensions/vertx/deployment/pom.xml @@ -0,0 +1,79 @@ +<?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-vertx-parent</artifactId> + <version>1.1.0-SNAPSHOT</version> + <relativePath>../pom.xml</relativePath> + </parent> + + <artifactId>camel-quarkus-vertx-deployment</artifactId> + <name>Camel Quarkus :: Vert.x :: Deployment</name> + + <dependencyManagement> + <dependencies> + <dependency> + <groupId>org.apache.camel.quarkus</groupId> + <artifactId>camel-quarkus-bom-deployment</artifactId> + <version>${project.version}</version> + <type>pom</type> + <scope>import</scope> + </dependency> + </dependencies> + </dependencyManagement> + + <dependencies> + <dependency> + <groupId>io.quarkus</groupId> + <artifactId>quarkus-vertx-deployment</artifactId> + </dependency> + <dependency> + <groupId>org.apache.camel.quarkus</groupId> + <artifactId>camel-quarkus-core-deployment</artifactId> + </dependency> + <dependency> + <groupId>org.apache.camel.quarkus</groupId> + <artifactId>camel-quarkus-vertx</artifactId> + </dependency> + </dependencies> + + <build> + <plugins> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-compiler-plugin</artifactId> + <configuration> + <annotationProcessorPaths> + <path> + <groupId>io.quarkus</groupId> + <artifactId>quarkus-extension-processor</artifactId> + <version>${quarkus.version}</version> + </path> + </annotationProcessorPaths> + </configuration> + </plugin> + </plugins> + </build> + +</project> diff --git a/extensions/vertx/deployment/src/main/java/org/apache/camel/quarkus/component/vertx/deployment/VertxProcessor.java b/extensions/vertx/deployment/src/main/java/org/apache/camel/quarkus/component/vertx/deployment/VertxProcessor.java new file mode 100644 index 0000000..ef8971f --- /dev/null +++ b/extensions/vertx/deployment/src/main/java/org/apache/camel/quarkus/component/vertx/deployment/VertxProcessor.java @@ -0,0 +1,38 @@ +/* + * 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.vertx.deployment; + +import io.quarkus.deployment.annotations.BuildStep; +import io.quarkus.deployment.builditem.FeatureBuildItem; +import io.quarkus.vertx.deployment.VertxBuildItem; +import io.vertx.core.Vertx; +import org.apache.camel.quarkus.core.deployment.spi.CamelRuntimeBeanBuildItem; + +class VertxProcessor { + + private static final String FEATURE = "camel-vertx"; + + @BuildStep + FeatureBuildItem feature() { + return new FeatureBuildItem(FEATURE); + } + + @BuildStep + CamelRuntimeBeanBuildItem configureVertxRegistryBean(VertxBuildItem vertx) { + return new CamelRuntimeBeanBuildItem("vertx", Vertx.class.getName(), vertx.getVertx()); + } +} diff --git a/extensions/vertx/pom.xml b/extensions/vertx/pom.xml new file mode 100644 index 0000000..d0140eb --- /dev/null +++ b/extensions/vertx/pom.xml @@ -0,0 +1,39 @@ +<?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</artifactId> + <version>1.1.0-SNAPSHOT</version> + <relativePath>../../poms/build-parent/pom.xml</relativePath> + </parent> + + <artifactId>camel-quarkus-vertx-parent</artifactId> + <name>Camel Quarkus :: Vert.x</name> + <packaging>pom</packaging> + + <modules> + <module>deployment</module> + <module>runtime</module> + </modules> +</project> diff --git a/extensions/vertx/runtime/pom.xml b/extensions/vertx/runtime/pom.xml new file mode 100644 index 0000000..78b8a13 --- /dev/null +++ b/extensions/vertx/runtime/pom.xml @@ -0,0 +1,98 @@ +<?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-vertx-parent</artifactId> + <version>1.1.0-SNAPSHOT</version> + <relativePath>../pom.xml</relativePath> + </parent> + + <artifactId>camel-quarkus-vertx</artifactId> + <name>Camel Quarkus :: Vert.x :: Runtime</name> + <description>Send and receive messages to/from Vert.x Event Bus.</description> + + <properties> + <firstVersion>1.0.0-CR2</firstVersion> + </properties> + + <dependencyManagement> + <dependencies> + <dependency> + <groupId>org.apache.camel.quarkus</groupId> + <artifactId>camel-quarkus-bom</artifactId> + <version>${project.version}</version> + <type>pom</type> + <scope>import</scope> + </dependency> + </dependencies> + </dependencyManagement> + + <dependencies> + <dependency> + <groupId>io.quarkus</groupId> + <artifactId>quarkus-vertx</artifactId> + </dependency> + <dependency> + <groupId>org.apache.camel.quarkus</groupId> + <artifactId>camel-quarkus-core</artifactId> + </dependency> + <dependency> + <groupId>org.apache.camel</groupId> + <artifactId>camel-vertx</artifactId> + </dependency> + </dependencies> + + <build> + <plugins> + <plugin> + <groupId>org.apache.camel.quarkus</groupId> + <artifactId>camel-quarkus-package-maven-plugin</artifactId> + <executions> + <execution> + <id>update-extension-doc-page</id> + <goals><goal>update-extension-doc-page</goal></goals> + <phase>process-resources</phase> + </execution> + </executions> + </plugin> + <plugin> + <groupId>io.quarkus</groupId> + <artifactId>quarkus-bootstrap-maven-plugin</artifactId> + </plugin> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-compiler-plugin</artifactId> + <configuration> + <annotationProcessorPaths> + <path> + <groupId>io.quarkus</groupId> + <artifactId>quarkus-extension-processor</artifactId> + <version>${quarkus.version}</version> + </path> + </annotationProcessorPaths> + </configuration> + </plugin> + </plugins> + </build> +</project> diff --git a/extensions/vertx/runtime/src/main/resources/META-INF/quarkus-extension.yaml b/extensions/vertx/runtime/src/main/resources/META-INF/quarkus-extension.yaml new file mode 100644 index 0000000..03628c8 --- /dev/null +++ b/extensions/vertx/runtime/src/main/resources/META-INF/quarkus-extension.yaml @@ -0,0 +1,29 @@ +# +# 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. +# + +# 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 Vert.x" +description: "Send and receive messages to/from Vert.x Event Bus" +metadata: + guide: "https://camel.apache.org/camel-quarkus/latest/extensions/vertx.html" + categories: + - "integration" diff --git a/integration-tests/pom.xml b/integration-tests/pom.xml index c3ea1ac..109bf2f 100644 --- a/integration-tests/pom.xml +++ b/integration-tests/pom.xml @@ -126,6 +126,7 @@ <module>telegram</module> <module>twitter</module> <module>validator</module> + <module>vertx</module> <module>websocket-jsr356</module> <module>xml</module> <module>xstream</module> diff --git a/integration-tests/vertx/pom.xml b/integration-tests/vertx/pom.xml new file mode 100644 index 0000000..8ed8421 --- /dev/null +++ b/integration-tests/vertx/pom.xml @@ -0,0 +1,130 @@ +<?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-integration-tests</artifactId> + <version>1.1.0-SNAPSHOT</version> + <relativePath>../pom.xml</relativePath> + </parent> + + <artifactId>camel-quarkus-integration-test-vertx</artifactId> + <name>Camel Quarkus :: Integration Tests :: Vert.x</name> + <description>Integration tests for Camel Quarkus Vert.x extension</description> + + <properties> + <!-- mvnd, a.k.a. Maven Daemon: https://github.com/gnodet/mvnd --> + <!-- The following rule tells mvnd to build the listed deployment modules before this module. --> + <!-- This is important because mvnd builds modules in parallel by default. The deployment modules are not --> + <!-- explicit dependencies of this module in the Maven sense, although they are required by the Quarkus Maven plugin. --> + <!-- Please update rule whenever you change the dependencies of this module by running --> + <!-- mvn process-resources -Pformat from the root directory --> + <mvnd.builder.rule>camel-quarkus-direct-deployment,camel-quarkus-support-policy-deployment,camel-quarkus-vertx-deployment</mvnd.builder.rule> + </properties> + + <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-direct</artifactId> + </dependency> + <dependency> + <groupId>org.apache.camel.quarkus</groupId> + <artifactId>camel-quarkus-vertx</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> + </dependencies> + + <build> + <plugins> + <plugin> + <groupId>io.quarkus</groupId> + <artifactId>quarkus-maven-plugin</artifactId> + <executions> + <execution> + <goals> + <goal>build</goal> + </goals> + </execution> + </executions> + </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/vertx/src/main/java/org/apache/camel/quarkus/component/vertx/it/VertxResource.java b/integration-tests/vertx/src/main/java/org/apache/camel/quarkus/component/vertx/it/VertxResource.java new file mode 100644 index 0000000..33507a8 --- /dev/null +++ b/integration-tests/vertx/src/main/java/org/apache/camel/quarkus/component/vertx/it/VertxResource.java @@ -0,0 +1,45 @@ +/* + * 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.vertx.it; + +import java.net.URI; + +import javax.inject.Inject; +import javax.ws.rs.Consumes; +import javax.ws.rs.POST; +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.ProducerTemplate; + +@Path("/vertx") +public class VertxResource { + + @Inject + ProducerTemplate producerTemplate; + + @Path("/post") + @POST + @Consumes(MediaType.TEXT_PLAIN) + @Produces(MediaType.TEXT_PLAIN) + public Response post(String message) throws Exception { + String result = producerTemplate.requestBody("direct:start", message, String.class); + return Response.created(new URI("https://camel.apache.org/")).entity(result).build(); + } +} diff --git a/integration-tests/vertx/src/main/java/org/apache/camel/quarkus/component/vertx/it/VertxRoutes.java b/integration-tests/vertx/src/main/java/org/apache/camel/quarkus/component/vertx/it/VertxRoutes.java new file mode 100644 index 0000000..c8c3610 --- /dev/null +++ b/integration-tests/vertx/src/main/java/org/apache/camel/quarkus/component/vertx/it/VertxRoutes.java @@ -0,0 +1,31 @@ +/* + * 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.vertx.it; + +import org.apache.camel.builder.RouteBuilder; + +public class VertxRoutes extends RouteBuilder { + + @Override + public void configure() throws Exception { + from("direct:start") + .to("vertx:next?pubSub=true"); + + from("vertx:next?pubSub=true") + .setBody(simple("Hello ${body}")); + } +} diff --git a/integration-tests/vertx/src/test/java/org/apache/camel/quarkus/component/vertx/it/VertxIT.java b/integration-tests/vertx/src/test/java/org/apache/camel/quarkus/component/vertx/it/VertxIT.java new file mode 100644 index 0000000..12cfeb9 --- /dev/null +++ b/integration-tests/vertx/src/test/java/org/apache/camel/quarkus/component/vertx/it/VertxIT.java @@ -0,0 +1,24 @@ +/* + * 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.vertx.it; + +import io.quarkus.test.junit.NativeImageTest; + +@NativeImageTest +class VertxIT extends VertxTest { + +} diff --git a/integration-tests/vertx/src/test/java/org/apache/camel/quarkus/component/vertx/it/VertxTest.java b/integration-tests/vertx/src/test/java/org/apache/camel/quarkus/component/vertx/it/VertxTest.java new file mode 100644 index 0000000..ea284e8 --- /dev/null +++ b/integration-tests/vertx/src/test/java/org/apache/camel/quarkus/component/vertx/it/VertxTest.java @@ -0,0 +1,40 @@ +/* + * 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.vertx.it; + +import io.quarkus.test.junit.QuarkusTest; +import io.restassured.RestAssured; +import io.restassured.http.ContentType; +import org.junit.jupiter.api.Test; + +import static org.hamcrest.Matchers.is; + +@QuarkusTest +class VertxTest { + + @Test + public void testVertxComponent() { + String message = "Camel Quarkus Vert.x"; + RestAssured.given() + .contentType(ContentType.TEXT) + .body(message) + .post("/vertx/post") + .then() + .statusCode(201) + .body(is("Hello " + message)); + } +} diff --git a/poms/bom-deployment/pom.xml b/poms/bom-deployment/pom.xml index b6ee2a5..c7e1e00 100644 --- a/poms/bom-deployment/pom.xml +++ b/poms/bom-deployment/pom.xml @@ -874,6 +874,11 @@ </dependency> <dependency> <groupId>org.apache.camel.quarkus</groupId> + <artifactId>camel-quarkus-vertx-deployment</artifactId> + <version>${camel-quarkus.version}</version> + </dependency> + <dependency> + <groupId>org.apache.camel.quarkus</groupId> <artifactId>camel-quarkus-vm-deployment</artifactId> <version>${camel-quarkus.version}</version> </dependency> diff --git a/poms/bom/pom.xml b/poms/bom/pom.xml index 1240667..5185468 100644 --- a/poms/bom/pom.xml +++ b/poms/bom/pom.xml @@ -1066,6 +1066,11 @@ </dependency> <dependency> <groupId>org.apache.camel</groupId> + <artifactId>camel-vertx</artifactId> + <version>${camel.version}</version> + </dependency> + <dependency> + <groupId>org.apache.camel</groupId> <artifactId>camel-vm</artifactId> <version>${camel.version}</version> </dependency> @@ -1953,6 +1958,11 @@ </dependency> <dependency> <groupId>org.apache.camel.quarkus</groupId> + <artifactId>camel-quarkus-vertx</artifactId> + <version>${camel-quarkus.version}</version> + </dependency> + <dependency> + <groupId>org.apache.camel.quarkus</groupId> <artifactId>camel-quarkus-vm</artifactId> <version>${camel-quarkus.version}</version> </dependency>
