This is an automated email from the ASF dual-hosted git repository. lburgazzoli pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/camel-quarkus.git
The following commit(s) were added to refs/heads/master by this push: new 8864ad8 Add exec component extension 8864ad8 is described below commit 8864ad8cb11ec9b54d9d641776d12aac92f089c4 Author: James Netherton <jamesnether...@gmail.com> AuthorDate: Thu Nov 14 08:21:04 2019 +0000 Add exec component extension fixes #417 --- .../pages/list-of-camel-quarkus-extensions.adoc | 5 +- extensions/exec/deployment/pom.xml | 75 ++++++++++++ .../component/exec/deployment/ExecProcessor.java | 31 +++++ extensions/exec/pom.xml | 39 ++++++ extensions/exec/runtime/pom.xml | 82 +++++++++++++ .../main/resources/META-INF/quarkus-extension.yaml | 26 ++++ extensions/pom.xml | 1 + extensions/readme.adoc | 5 +- integration-tests/exec/pom.xml | 132 +++++++++++++++++++++ .../quarkus/component/exec/it/ExecResource.java | 42 +++++++ .../quarkus/component/exec/it/ExecRoutes.java | 39 ++++++ .../camel/quarkus/component/exec/it/ExecIT.java | 24 ++++ .../camel/quarkus/component/exec/it/ExecTest.java | 36 ++++++ integration-tests/pom.xml | 1 + poms/bom-deployment/pom.xml | 5 + poms/bom/pom.xml | 11 +- 16 files changed, 551 insertions(+), 3 deletions(-) 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 347ce36..d6a11e2 100644 --- a/docs/modules/ROOT/pages/list-of-camel-quarkus-extensions.adoc +++ b/docs/modules/ROOT/pages/list-of-camel-quarkus-extensions.adoc @@ -6,7 +6,7 @@ As of Camel Quarkus {camel-quarkus-last-release} the following Camel artifacts a == Camel Components // components: START -Number of Camel components: 33 in 29 JAR artifacts (0 deprecated) +Number of Camel components: 34 in 30 JAR artifacts (0 deprecated) [width="100%",cols="4,1,5",options="header"] |=== @@ -39,6 +39,9 @@ Number of Camel components: 33 in 29 JAR artifacts (0 deprecated) | link:https://camel.apache.org/components/latest/direct-component.html[Direct] (camel-quarkus-direct) + `direct:name` | 0.2 | The direct component provides direct, synchronous call to another endpoint from the same CamelContext. +| link:https://camel.apache.org/components/latest/exec-component.html[Exec] (camel-quarkus-exec) + +`exec:executable` | 0.4 | The exec component can be used to execute OS system commands. + | xref:extensions/fhir.adoc[FHIR] (camel-quarkus-fhir) + `fhir:apiName/methodName` | 0.2 | The fhir component is used for working with the FHIR protocol (health care). diff --git a/extensions/exec/deployment/pom.xml b/extensions/exec/deployment/pom.xml new file mode 100644 index 0000000..94bd99f --- /dev/null +++ b/extensions/exec/deployment/pom.xml @@ -0,0 +1,75 @@ +<?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-exec-parent</artifactId> + <version>0.3.2-SNAPSHOT</version> + <relativePath>../pom.xml</relativePath> + </parent> + + <artifactId>camel-quarkus-exec-deployment</artifactId> + <name>Camel Quarkus :: Exec :: 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>org.apache.camel.quarkus</groupId> + <artifactId>camel-quarkus-core-deployment</artifactId> + </dependency> + <dependency> + <groupId>org.apache.camel.quarkus</groupId> + <artifactId>camel-quarkus-exec</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/exec/deployment/src/main/java/org/apache/camel/quarkus/component/exec/deployment/ExecProcessor.java b/extensions/exec/deployment/src/main/java/org/apache/camel/quarkus/component/exec/deployment/ExecProcessor.java new file mode 100644 index 0000000..186ffa1 --- /dev/null +++ b/extensions/exec/deployment/src/main/java/org/apache/camel/quarkus/component/exec/deployment/ExecProcessor.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.exec.deployment; + +import io.quarkus.deployment.annotations.BuildStep; +import io.quarkus.deployment.builditem.FeatureBuildItem; + +class ExecProcessor { + + private static final String FEATURE = "camel-exec"; + + @BuildStep + FeatureBuildItem feature() { + return new FeatureBuildItem(FEATURE); + } + +} diff --git a/extensions/exec/pom.xml b/extensions/exec/pom.xml new file mode 100644 index 0000000..8442027 --- /dev/null +++ b/extensions/exec/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>0.3.2-SNAPSHOT</version> + <relativePath>../../poms/build-parent/pom.xml</relativePath> + </parent> + + <artifactId>camel-quarkus-exec-parent</artifactId> + <name>Camel Quarkus :: Exec</name> + <packaging>pom</packaging> + + <modules> + <module>deployment</module> + <module>runtime</module> + </modules> +</project> diff --git a/extensions/exec/runtime/pom.xml b/extensions/exec/runtime/pom.xml new file mode 100644 index 0000000..d3e8d8c --- /dev/null +++ b/extensions/exec/runtime/pom.xml @@ -0,0 +1,82 @@ +<?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-exec-parent</artifactId> + <version>0.3.2-SNAPSHOT</version> + <relativePath>../pom.xml</relativePath> + </parent> + + <artifactId>camel-quarkus-exec</artifactId> + <name>Camel Quarkus :: Exec :: Runtime</name> + + <properties> + <firstVersion>0.4.0</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>org.apache.camel.quarkus</groupId> + <artifactId>camel-quarkus-core</artifactId> + </dependency> + <dependency> + <groupId>org.apache.camel</groupId> + <artifactId>camel-exec</artifactId> + </dependency> + </dependencies> + + <build> + <plugins> + <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/exec/runtime/src/main/resources/META-INF/quarkus-extension.yaml b/extensions/exec/runtime/src/main/resources/META-INF/quarkus-extension.yaml new file mode 100644 index 0000000..242ba35 --- /dev/null +++ b/extensions/exec/runtime/src/main/resources/META-INF/quarkus-extension.yaml @@ -0,0 +1,26 @@ +# +# 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. +# + +--- +name: "Camel Quarkus Exec" +description: "Camel Exec component" +metadata: + keywords: + - "camel" + guide: "https://quarkus.io/guides/camel" + categories: + - "integration" \ No newline at end of file diff --git a/extensions/pom.xml b/extensions/pom.xml index f86d229..1ff6264 100644 --- a/extensions/pom.xml +++ b/extensions/pom.xml @@ -53,6 +53,7 @@ <module>csv</module> <module>dataformat</module> <module>direct</module> + <module>exec</module> <module>fhir</module> <module>file</module> <module>infinispan</module> diff --git a/extensions/readme.adoc b/extensions/readme.adoc index a2038c0..ece78a0 100644 --- a/extensions/readme.adoc +++ b/extensions/readme.adoc @@ -5,7 +5,7 @@ Apache Camel Quarkus supports the following Camel artifacts as Quarkus Extension == Camel Components // components: START -Number of Camel components: 33 in 29 JAR artifacts (0 deprecated) +Number of Camel components: 34 in 30 JAR artifacts (0 deprecated) [width="100%",cols="4,1,5",options="header"] |=== @@ -38,6 +38,9 @@ Number of Camel components: 33 in 29 JAR artifacts (0 deprecated) | link:https://camel.apache.org/components/latest/direct-component.html[Direct] (camel-quarkus-direct) + `direct:name` | 0.2 | The direct component provides direct, synchronous call to another endpoint from the same CamelContext. +| link:https://camel.apache.org/components/latest/exec-component.html[Exec] (camel-quarkus-exec) + +`exec:executable` | 0.4 | The exec component can be used to execute OS system commands. + | xref:extensions/fhir.adoc[FHIR] (camel-quarkus-fhir) + `fhir:apiName/methodName` | 0.2 | The fhir component is used for working with the FHIR protocol (health care). diff --git a/integration-tests/exec/pom.xml b/integration-tests/exec/pom.xml new file mode 100644 index 0000000..a92d63a --- /dev/null +++ b/integration-tests/exec/pom.xml @@ -0,0 +1,132 @@ +<?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>0.3.2-SNAPSHOT</version> + </parent> + + <artifactId>camel-quarkus-integration-test-exec</artifactId> + <name>Camel Quarkus :: Integration Tests :: Exec</name> + <description>Integration tests for Camel Quarkus Exec extension</description> + + <dependencies> + <dependency> + <groupId>org.apache.camel.quarkus</groupId> + <artifactId>camel-quarkus-exec</artifactId> + </dependency> + <dependency> + <groupId>org.apache.camel.quarkus</groupId> + <artifactId>camel-quarkus-direct</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> + <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> + <configuration> + <systemProperties> + <native.image.path>${project.build.directory}/${project.build.finalName}-runner</native.image.path> + </systemProperties> + </configuration> + </execution> + </executions> + </plugin> + <plugin> + <groupId>io.quarkus</groupId> + <artifactId>quarkus-maven-plugin</artifactId> + <executions> + <execution> + <id>native-image</id> + <goals> + <goal>native-image</goal> + </goals> + <configuration> + <reportErrorsAtRuntime>false</reportErrorsAtRuntime> + <cleanupServer>true</cleanupServer> + <enableHttpsUrlHandler>true</enableHttpsUrlHandler> + <enableServer>false</enableServer> + <dumpProxies>false</dumpProxies> + <graalvmHome>${graalvmHome}</graalvmHome> + <enableJni>true</enableJni> + <enableAllSecurityServices>true</enableAllSecurityServices> + <disableReports>true</disableReports> + </configuration> + </execution> + </executions> + </plugin> + </plugins> + </build> + </profile> + </profiles> + +</project> diff --git a/integration-tests/exec/src/main/java/org/apache/camel/quarkus/component/exec/it/ExecResource.java b/integration-tests/exec/src/main/java/org/apache/camel/quarkus/component/exec/it/ExecResource.java new file mode 100644 index 0000000..1484405 --- /dev/null +++ b/integration-tests/exec/src/main/java/org/apache/camel/quarkus/component/exec/it/ExecResource.java @@ -0,0 +1,42 @@ +/* + * 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.exec.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 org.apache.camel.ProducerTemplate; + +@Path("/exec") +@ApplicationScoped +public class ExecResource { + + @Inject + ProducerTemplate producerTemplate; + + @Path("/echo") + @GET + @Produces(MediaType.TEXT_PLAIN) + public String echo() { + String result = producerTemplate.requestBody("direct:start", null, String.class); + return result.trim(); + } +} diff --git a/integration-tests/exec/src/main/java/org/apache/camel/quarkus/component/exec/it/ExecRoutes.java b/integration-tests/exec/src/main/java/org/apache/camel/quarkus/component/exec/it/ExecRoutes.java new file mode 100644 index 0000000..1e5f60e --- /dev/null +++ b/integration-tests/exec/src/main/java/org/apache/camel/quarkus/component/exec/it/ExecRoutes.java @@ -0,0 +1,39 @@ +/* + * 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.exec.it; + +import org.apache.camel.builder.RouteBuilder; +import org.apache.camel.util.FileUtil; + +public class ExecRoutes extends RouteBuilder { + + private static final boolean IS_WINDOWS = FileUtil.isWindows(); + + @Override + public void configure() throws Exception { + from("direct:start") + .toF("exec:%s?args=%s", getCommand(), getArgs()); + } + + private String getCommand() { + return IS_WINDOWS ? "cmd.exe" : "/bin/echo"; + } + + private String getArgs() { + return IS_WINDOWS ? "/C echo Hello Camel Quarkus" : "Hello Camel Quarkus"; + } +} diff --git a/integration-tests/exec/src/test/java/org/apache/camel/quarkus/component/exec/it/ExecIT.java b/integration-tests/exec/src/test/java/org/apache/camel/quarkus/component/exec/it/ExecIT.java new file mode 100644 index 0000000..e9e3551 --- /dev/null +++ b/integration-tests/exec/src/test/java/org/apache/camel/quarkus/component/exec/it/ExecIT.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.exec.it; + +import io.quarkus.test.junit.NativeImageTest; + +@NativeImageTest +class ExecIT extends ExecTest { + +} diff --git a/integration-tests/exec/src/test/java/org/apache/camel/quarkus/component/exec/it/ExecTest.java b/integration-tests/exec/src/test/java/org/apache/camel/quarkus/component/exec/it/ExecTest.java new file mode 100644 index 0000000..84165c9 --- /dev/null +++ b/integration-tests/exec/src/test/java/org/apache/camel/quarkus/component/exec/it/ExecTest.java @@ -0,0 +1,36 @@ +/* + * 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.exec.it; + +import io.quarkus.test.junit.QuarkusTest; +import io.restassured.RestAssured; + +import org.junit.jupiter.api.Test; +import static org.hamcrest.Matchers.is; + +@QuarkusTest +class ExecTest { + + @Test + public void testEchoExec() { + RestAssured.get("/exec/echo") + .then() + .statusCode(200) + .body(is("Hello Camel Quarkus")); + } + +} diff --git a/integration-tests/pom.xml b/integration-tests/pom.xml index 9e948d5..f183061 100644 --- a/integration-tests/pom.xml +++ b/integration-tests/pom.xml @@ -85,6 +85,7 @@ <module>controlbus</module> <module>csv</module> <module>dataformat</module> + <module>exec</module> <module>fhir</module> <module>file</module> <module>infinispan</module> diff --git a/poms/bom-deployment/pom.xml b/poms/bom-deployment/pom.xml index b6569c5..ac80230 100644 --- a/poms/bom-deployment/pom.xml +++ b/poms/bom-deployment/pom.xml @@ -145,6 +145,11 @@ </dependency> <dependency> <groupId>org.apache.camel.quarkus</groupId> + <artifactId>camel-quarkus-exec-deployment</artifactId> + <version>${camel-quarkus.version}</version> + </dependency> + <dependency> + <groupId>org.apache.camel.quarkus</groupId> <artifactId>camel-quarkus-file-deployment</artifactId> <version>${camel-quarkus.version}</version> </dependency> diff --git a/poms/bom/pom.xml b/poms/bom/pom.xml index c322b95..0a300f0 100644 --- a/poms/bom/pom.xml +++ b/poms/bom/pom.xml @@ -131,6 +131,11 @@ </dependency> <dependency> <groupId>org.apache.camel</groupId> + <artifactId>camel-exec</artifactId> + <version>${camel.version}</version> + </dependency> + <dependency> + <groupId>org.apache.camel</groupId> <artifactId>camel-fhir</artifactId> <version>${camel.version}</version> </dependency> @@ -420,6 +425,11 @@ </dependency> <dependency> <groupId>org.apache.camel.quarkus</groupId> + <artifactId>camel-quarkus-exec</artifactId> + <version>${camel-quarkus.version}</version> + </dependency> + <dependency> + <groupId>org.apache.camel.quarkus</groupId> <artifactId>camel-quarkus-fhir</artifactId> <version>${camel-quarkus.version}</version> </dependency> @@ -601,7 +611,6 @@ <version>${camel-quarkus.version}</version> </dependency> - </dependencies> </dependencyManagement>