You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by da...@apache.org on 2019/11/12 19:54:56 UTC
[camel-quarkus] 01/02: Fixes #403 adding scheduler extension
This is an automated email from the ASF dual-hosted git repository.
davsclaus pushed a commit to branch scheduler
in repository https://gitbox.apache.org/repos/asf/camel-quarkus.git
commit 7f9496d541ca6fb2db7a9c21bff6ebe64c8a77a0
Author: Claus Ibsen <cl...@gmail.com>
AuthorDate: Tue Nov 12 20:35:31 2019 +0100
Fixes #403 adding scheduler extension
---
extensions/pom.xml | 1 +
extensions/scheduler/deployment/pom.xml | 75 ++++++++++++
.../scheduler/deployment/SchedulerProcessor.java | 31 +++++
extensions/scheduler/pom.xml | 39 ++++++
extensions/scheduler/runtime/pom.xml | 82 +++++++++++++
.../main/resources/META-INF/quarkus-extension.yaml | 27 ++++
integration-tests/pom.xml | 1 +
integration-tests/scheduler/pom.xml | 136 +++++++++++++++++++++
.../component/scheduler/it/SchedulerResource.java | 48 ++++++++
.../component/scheduler/it/SchedulerRoute.java | 35 ++++++
.../component/scheduler/it/SchedulerIT.java | 24 ++++
.../component/scheduler/it/SchedulerTest.java | 37 ++++++
poms/bom-deployment/pom.xml | 5 +
poms/bom/pom.xml | 10 ++
14 files changed, 551 insertions(+)
diff --git a/extensions/pom.xml b/extensions/pom.xml
index 6d17ffd..f6974f5 100644
--- a/extensions/pom.xml
+++ b/extensions/pom.xml
@@ -78,6 +78,7 @@
<module>attachments</module>
<module>pdf</module>
<module>controlbus</module>
+ <module>scheduler</module>
</modules>
diff --git a/extensions/scheduler/deployment/pom.xml b/extensions/scheduler/deployment/pom.xml
new file mode 100644
index 0000000..c17ace2
--- /dev/null
+++ b/extensions/scheduler/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-scheduler-parent</artifactId>
+ <version>0.3.2-SNAPSHOT</version>
+ <relativePath>../pom.xml</relativePath>
+ </parent>
+
+ <artifactId>camel-quarkus-scheduler-deployment</artifactId>
+ <name>Camel Quarkus :: Scheduler :: 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-scheduler</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/scheduler/deployment/src/main/java/org/apache/camel/quarkus/component/scheduler/deployment/SchedulerProcessor.java b/extensions/scheduler/deployment/src/main/java/org/apache/camel/quarkus/component/scheduler/deployment/SchedulerProcessor.java
new file mode 100644
index 0000000..b71566d
--- /dev/null
+++ b/extensions/scheduler/deployment/src/main/java/org/apache/camel/quarkus/component/scheduler/deployment/SchedulerProcessor.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.scheduler.deployment;
+
+import io.quarkus.deployment.annotations.BuildStep;
+import io.quarkus.deployment.builditem.FeatureBuildItem;
+
+class SchedulerProcessor {
+
+ private static final String FEATURE = "camel-scheduler";
+
+ @BuildStep
+ FeatureBuildItem feature() {
+ return new FeatureBuildItem(FEATURE);
+ }
+
+}
diff --git a/extensions/scheduler/pom.xml b/extensions/scheduler/pom.xml
new file mode 100644
index 0000000..4367f81
--- /dev/null
+++ b/extensions/scheduler/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-scheduler-parent</artifactId>
+ <name>Camel Quarkus :: Scheduler</name>
+ <packaging>pom</packaging>
+
+ <modules>
+ <module>deployment</module>
+ <module>runtime</module>
+ </modules>
+</project>
diff --git a/extensions/scheduler/runtime/pom.xml b/extensions/scheduler/runtime/pom.xml
new file mode 100644
index 0000000..401bd2e
--- /dev/null
+++ b/extensions/scheduler/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-scheduler-parent</artifactId>
+ <version>0.3.2-SNAPSHOT</version>
+ <relativePath>../pom.xml</relativePath>
+ </parent>
+
+ <artifactId>camel-quarkus-scheduler</artifactId>
+ <name>Camel Quarkus :: Scheduler :: 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-scheduler</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/scheduler/runtime/src/main/resources/META-INF/quarkus-extension.yaml b/extensions/scheduler/runtime/src/main/resources/META-INF/quarkus-extension.yaml
new file mode 100644
index 0000000..9169c9d
--- /dev/null
+++ b/extensions/scheduler/runtime/src/main/resources/META-INF/quarkus-extension.yaml
@@ -0,0 +1,27 @@
+#
+# 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 Scheduler"
+description: "Camel Scheduler support"
+metadata:
+ keywords:
+ - "camel"
+ - "scheduling"
+ guide: "https://quarkus.io/guides/camel"
+ categories:
+ - "integration"
\ No newline at end of file
diff --git a/integration-tests/pom.xml b/integration-tests/pom.xml
index 4365937..89bc03f 100644
--- a/integration-tests/pom.xml
+++ b/integration-tests/pom.xml
@@ -107,6 +107,7 @@
<module>zipfile</module>
<module>pdf</module>
<module>controlbus</module>
+ <module>scheduler</module>
</modules>
diff --git a/integration-tests/scheduler/pom.xml b/integration-tests/scheduler/pom.xml
new file mode 100644
index 0000000..f453ce5
--- /dev/null
+++ b/integration-tests/scheduler/pom.xml
@@ -0,0 +1,136 @@
+<?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-scheduler</artifactId>
+ <name>Camel Quarkus :: Integration Tests :: Scheduler</name>
+ <description>Integration tests for Camel Quarkus Scheduler extension</description>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.camel.quarkus</groupId>
+ <artifactId>camel-quarkus-scheduler</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.camel.quarkus</groupId>
+ <artifactId>camel-quarkus-log</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/scheduler/src/main/java/org/apache/camel/quarkus/component/scheduler/it/SchedulerResource.java b/integration-tests/scheduler/src/main/java/org/apache/camel/quarkus/component/scheduler/it/SchedulerResource.java
new file mode 100644
index 0000000..cbb27a4
--- /dev/null
+++ b/integration-tests/scheduler/src/main/java/org/apache/camel/quarkus/component/scheduler/it/SchedulerResource.java
@@ -0,0 +1,48 @@
+/*
+ * 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.scheduler.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.ProducerTemplate;
+import org.jboss.logging.Logger;
+
+@Path("/scheduler")
+@ApplicationScoped
+public class SchedulerResource {
+
+ private static final Logger LOG = Logger.getLogger(SchedulerResource.class);
+
+ @Inject
+ ProducerTemplate producerTemplate;
+
+ @Path("/get")
+ @GET
+ @Produces(MediaType.TEXT_PLAIN)
+ public Response get() throws Exception {
+ String response = producerTemplate.requestBody("direct:start", null, String.class);
+ LOG.infof("Got response from scheduler: %s", response);
+ return Response.ok(response).build();
+ }
+
+}
diff --git a/integration-tests/scheduler/src/main/java/org/apache/camel/quarkus/component/scheduler/it/SchedulerRoute.java b/integration-tests/scheduler/src/main/java/org/apache/camel/quarkus/component/scheduler/it/SchedulerRoute.java
new file mode 100644
index 0000000..255f3e1
--- /dev/null
+++ b/integration-tests/scheduler/src/main/java/org/apache/camel/quarkus/component/scheduler/it/SchedulerRoute.java
@@ -0,0 +1,35 @@
+/*
+ * 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.scheduler.it;
+
+import java.util.concurrent.atomic.AtomicInteger;
+
+import org.apache.camel.builder.RouteBuilder;
+
+public class SchedulerRoute extends RouteBuilder {
+
+ private final AtomicInteger counter = new AtomicInteger();
+
+ @Override
+ public void configure() throws Exception {
+ from("scheduler:start?initialDelay=1")
+ .process(e -> counter.incrementAndGet());
+
+ from("direct:start")
+ .setBody(e -> counter.get());
+ }
+}
diff --git a/integration-tests/scheduler/src/test/java/org/apache/camel/quarkus/component/scheduler/it/SchedulerIT.java b/integration-tests/scheduler/src/test/java/org/apache/camel/quarkus/component/scheduler/it/SchedulerIT.java
new file mode 100644
index 0000000..db02afd
--- /dev/null
+++ b/integration-tests/scheduler/src/test/java/org/apache/camel/quarkus/component/scheduler/it/SchedulerIT.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.scheduler.it;
+
+import io.quarkus.test.junit.NativeImageTest;
+
+@NativeImageTest
+class SchedulerIT extends SchedulerTest {
+
+}
diff --git a/integration-tests/scheduler/src/test/java/org/apache/camel/quarkus/component/scheduler/it/SchedulerTest.java b/integration-tests/scheduler/src/test/java/org/apache/camel/quarkus/component/scheduler/it/SchedulerTest.java
new file mode 100644
index 0000000..1ce2dac
--- /dev/null
+++ b/integration-tests/scheduler/src/test/java/org/apache/camel/quarkus/component/scheduler/it/SchedulerTest.java
@@ -0,0 +1,37 @@
+/*
+ * 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.scheduler.it;
+
+import io.quarkus.test.junit.QuarkusTest;
+import io.restassured.RestAssured;
+import org.junit.jupiter.api.Test;
+
+import static org.junit.jupiter.api.Assertions.assertNotEquals;
+
+@QuarkusTest
+class SchedulerTest {
+
+ @Test
+ public void test() throws Exception {
+ // give time for scheduler to run a bit
+ Thread.sleep(50);
+
+ String body = RestAssured.get("/scheduler/get").then().statusCode(200).extract().body().asString();
+ assertNotEquals("0", body);
+ }
+
+}
diff --git a/poms/bom-deployment/pom.xml b/poms/bom-deployment/pom.xml
index 7424484..304e4d2 100644
--- a/poms/bom-deployment/pom.xml
+++ b/poms/bom-deployment/pom.xml
@@ -288,6 +288,11 @@
<artifactId>camel-quarkus-netty-deployment</artifactId>
<version>${camel-quarkus.version}</version>
</dependency>
+ <dependency>
+ <groupId>org.apache.camel.quarkus</groupId>
+ <artifactId>camel-quarkus-scheduler-deployment</artifactId>
+ <version>${camel-quarkus.version}</version>
+ </dependency>
</dependencies>
diff --git a/poms/bom/pom.xml b/poms/bom/pom.xml
index c4e5e09..ca3c2c9 100644
--- a/poms/bom/pom.xml
+++ b/poms/bom/pom.xml
@@ -254,6 +254,11 @@
</dependency>
<dependency>
<groupId>org.apache.camel</groupId>
+ <artifactId>camel-scheduler</artifactId>
+ <version>${camel.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.camel</groupId>
<artifactId>camel-servlet</artifactId>
<version>${camel.version}</version>
</dependency>
@@ -570,6 +575,11 @@
<artifactId>snakeyaml</artifactId>
<version>${snakeyaml.version}</version>
</dependency>
+ <dependency>
+ <groupId>org.apache.camel.quarkus</groupId>
+ <artifactId>camel-quarkus-scheduler</artifactId>
+ <version>${camel-quarkus.version}</version>
+ </dependency>
</dependencies>