From ed548bbfcd41c1038b7522d30e48832f28a410ee Mon Sep 17 00:00:00 2001 From: James Netherton Date: Wed, 18 Sep 2024 10:23:43 +0100 Subject: [PATCH] Remove timer-log-kotlin example project --- docs/modules/ROOT/attachments/examples.json | 5 - timer-log-kotlin/README.adoc | 60 ---- timer-log-kotlin/eclipse-formatter-config.xml | 276 --------------- timer-log-kotlin/pom.xml | 326 ------------------ .../src/main/kotlin/org/acme/kotlin/routes.kt | 32 -- .../src/main/resources/application.properties | 29 -- .../kotlin/org/acme/kotlin/TimerLogKotlin.kt | 38 -- .../org/acme/kotlin/TimerLogKotlinIT.kt | 22 -- 8 files changed, 788 deletions(-) delete mode 100644 timer-log-kotlin/README.adoc delete mode 100644 timer-log-kotlin/eclipse-formatter-config.xml delete mode 100644 timer-log-kotlin/pom.xml delete mode 100644 timer-log-kotlin/src/main/kotlin/org/acme/kotlin/routes.kt delete mode 100644 timer-log-kotlin/src/main/resources/application.properties delete mode 100644 timer-log-kotlin/src/test/kotlin/org/acme/kotlin/TimerLogKotlin.kt delete mode 100644 timer-log-kotlin/src/test/kotlin/org/acme/kotlin/TimerLogKotlinIT.kt diff --git a/docs/modules/ROOT/attachments/examples.json b/docs/modules/ROOT/attachments/examples.json index 758b9b8c..a9d089c1 100644 --- a/docs/modules/ROOT/attachments/examples.json +++ b/docs/modules/ROOT/attachments/examples.json @@ -64,11 +64,6 @@ "description": "Shows how you can build a simple Kamelet and use with your Camel applications.", "link": "https://github.com/apache/camel-quarkus-examples/tree/main/kamelet-chucknorris" }, - { - "title": "Kotlin Hello World", - "description": "Shows how to define Camel routes using Kotlin programming language", - "link": "https://github.com/apache/camel-quarkus-examples/tree/main/timer-log-kotlin" - }, { "title": "Leader election in Kubernetes: A Camel Quarkus Master example", "description": "Shows how to use Camel master component.", diff --git a/timer-log-kotlin/README.adoc b/timer-log-kotlin/README.adoc deleted file mode 100644 index bf23bc32..00000000 --- a/timer-log-kotlin/README.adoc +++ /dev/null @@ -1,60 +0,0 @@ -= Kotlin Hello World: A Camel Quarkus example -:cq-example-description: An example that shows how to define Camel routes using Kotlin programming language - -{cq-description} - -TIP: Check the https://camel.apache.org/camel-quarkus/latest/first-steps.html[Camel Quarkus User guide] for prerequisites -and other general information. - -== Start in the Development mode - -[source,shell] ----- -$ mvn clean compile quarkus:dev ----- - -The above command compiles the project, starts the application and lets the Quarkus tooling watch for changes in your -workspace. Any modifications in your project will automatically take effect in the running application. - -TIP: Please refer to the Development mode section of -https://camel.apache.org/camel-quarkus/latest/first-steps.html#_development_mode[Camel Quarkus User guide] for more details. - -Then look at the log output in the console. As we run the example in Quarkus Dev Mode, you can edit the source code and have live updates. -For example try to change `Incremented the counter` to `Counter state` in the message body or change the property `timer.period` in application.properties - -=== Package and run the application - -Once you are done with developing you may want to package and run the application. - -TIP: Find more details about the JVM mode and Native mode in the Package and run section of -https://camel.apache.org/camel-quarkus/latest/first-steps.html#_package_and_run_the_application[Camel Quarkus User guide] - -==== JVM mode - -[source,shell] ----- -$ mvn clean package -$ java -jar target/quarkus-app/quarkus-run.jar -... -[io.quarkus] (main) camel-quarkus-examples-... started in 1.163s. ----- - -==== Native mode - -IMPORTANT: Native mode requires having GraalVM and other tools installed. Please check the Prerequisites section -of https://camel.apache.org/camel-quarkus/latest/first-steps.html#_prerequisites[Camel Quarkus User guide]. - -To prepare a native executable using GraalVM, run the following command: - -[source,shell] ----- -$ mvn clean package -Pnative -$ ./target/*-runner -... -[io.quarkus] (main) camel-quarkus-examples-... started in 0.013s. -... ----- - -== Feedback - -Please report bugs and propose improvements via https://github.com/apache/camel-quarkus/issues[GitHub issues of Camel Quarkus] project. diff --git a/timer-log-kotlin/eclipse-formatter-config.xml b/timer-log-kotlin/eclipse-formatter-config.xml deleted file mode 100644 index 2248b2b8..00000000 --- a/timer-log-kotlin/eclipse-formatter-config.xml +++ /dev/null @@ -1,276 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/timer-log-kotlin/pom.xml b/timer-log-kotlin/pom.xml deleted file mode 100644 index dbd51c67..00000000 --- a/timer-log-kotlin/pom.xml +++ /dev/null @@ -1,326 +0,0 @@ - - - - 4.0.0 - - camel-quarkus-examples-timer-log-kotlin - org.apache.camel.quarkus.examples - 3.15.0-SNAPSHOT - - Camel Quarkus :: Examples :: Timer Log Kotlin - Camel Quarkus Example :: Timer to Log Kotlin - - - 3.15.0.CR1 - 3.15.0-SNAPSHOT - - io.quarkus - quarkus-bom - org.apache.camel.quarkus - camel-quarkus-bom - 2.0.20 - - UTF-8 - UTF-8 - 17 - 17 - ${maven.compiler.target} - ${maven.compiler.source} - - 2.24.1 - 1.12.0 - 4.5 - 3.13.0 - 3.4.2 - 3.3.1 - 3.5.0 - - - - - - - ${quarkus.platform.group-id} - ${quarkus.platform.artifact-id} - ${quarkus.platform.version} - pom - import - - - ${camel-quarkus.platform.group-id} - ${camel-quarkus.platform.artifact-id} - ${camel-quarkus.platform.version} - pom - import - - - - - - - org.apache.camel.quarkus - camel-quarkus-kotlin - - - org.apache.camel.quarkus - camel-quarkus-log - - - org.apache.camel.quarkus - camel-quarkus-microprofile-health - - - org.apache.camel.quarkus - camel-quarkus-timer - - - - - io.quarkus - quarkus-junit5 - test - - - org.awaitility - awaitility - test - - - - - src/main/kotlin - src/test/kotlin - - - - - - net.revelc.code.formatter - formatter-maven-plugin - ${formatter-maven-plugin.version} - - ${maven.multiModuleProjectDirectory}/eclipse-formatter-config.xml - LF - - - - - net.revelc.code - impsort-maven-plugin - ${impsort-maven-plugin.version} - - java.,javax.,org.w3c.,org.xml.,junit. - true - true - java.,javax.,org.w3c.,org.xml.,junit. - - - - - org.apache.maven.plugins - maven-compiler-plugin - ${maven-compiler-plugin.version} - - true - true - - -Xlint:unchecked - - - - - - org.apache.maven.plugins - maven-surefire-plugin - ${maven-surefire-plugin.version} - - false - - org.jboss.logmanager.LogManager - - - - - - ${quarkus.platform.group-id} - quarkus-maven-plugin - ${quarkus.platform.version} - - - - org.apache.maven.plugins - maven-failsafe-plugin - ${maven-surefire-plugin.version} - - - - org.apache.maven.plugins - maven-jar-plugin - ${maven-jar-plugin.version} - - - - com.mycila - license-maven-plugin - ${license-maven-plugin.version} - - true -
${maven.multiModuleProjectDirectory}/header.txt
- - **/*.adoc - **/*.txt - **/LICENSE.txt - **/LICENSE - **/NOTICE.txt - **/NOTICE - **/README - **/pom.xml.versionsBackup - - - SLASHSTAR_STYLE - CAMEL_PROPERTIES_STYLE - SLASHSTAR_STYLE - - - ${maven.multiModuleProjectDirectory}/license-properties-headerdefinition.xml - -
-
-
-
- - - - ${quarkus.platform.group-id} - quarkus-maven-plugin - - - build - - build - - - - - - org.jetbrains.kotlin - kotlin-maven-plugin - ${kotlin.version} - - - compile - compile - - compile - - - - test-compile - test-compile - - test-compile - - - - - - all-open - - - - - - - - - - org.jetbrains.kotlin - kotlin-maven-allopen - ${kotlin.version} - - - - - - net.revelc.code.formatter - formatter-maven-plugin - - - format - - format - - process-sources - - - - - - net.revelc.code - impsort-maven-plugin - - - sort-imports - - sort - - process-sources - - - - -
- - - - native - - - native - - - - true - - - - - org.apache.maven.plugins - maven-failsafe-plugin - - - - integration-test - verify - - - - ${quarkus.native.enabled} - - - - - - - - - - -
diff --git a/timer-log-kotlin/src/main/kotlin/org/acme/kotlin/routes.kt b/timer-log-kotlin/src/main/kotlin/org/acme/kotlin/routes.kt deleted file mode 100644 index 73e1e36f..00000000 --- a/timer-log-kotlin/src/main/kotlin/org/acme/kotlin/routes.kt +++ /dev/null @@ -1,32 +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.acme.timer - -import org.apache.camel.Exchange -import org.apache.camel.quarkus.kotlin.routes -import jakarta.enterprise.context.ApplicationScoped -import jakarta.enterprise.inject.Produces - -@ApplicationScoped -class Routes { - @Produces - fun myRoutes() = routes { - from("timer:foo?period=1000") - .process { e: Exchange -> e.message.body = "Hello from Kotlin!" } - .log("\${body}") - } -} \ No newline at end of file diff --git a/timer-log-kotlin/src/main/resources/application.properties b/timer-log-kotlin/src/main/resources/application.properties deleted file mode 100644 index 6302ccfc..00000000 --- a/timer-log-kotlin/src/main/resources/application.properties +++ /dev/null @@ -1,29 +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. -## --------------------------------------------------------------------------- -# -# Quarkus -# -quarkus.banner.enabled = false -quarkus.log.file.enable = true - -# to turn on DEBUG logging in camel-main -# quarkus.log.category."org.apache.camel.main".level = DEBUG - -# -# Camel -# -camel.context.name = quarkus-camel-example-timer-log-kotlin diff --git a/timer-log-kotlin/src/test/kotlin/org/acme/kotlin/TimerLogKotlin.kt b/timer-log-kotlin/src/test/kotlin/org/acme/kotlin/TimerLogKotlin.kt deleted file mode 100644 index 56fc2e54..00000000 --- a/timer-log-kotlin/src/test/kotlin/org/acme/kotlin/TimerLogKotlin.kt +++ /dev/null @@ -1,38 +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.acme.timer - -import java.io.File; -import java.nio.charset.StandardCharsets; -import java.util.concurrent.TimeUnit; - -import io.quarkus.test.junit.QuarkusTest; -import org.awaitility.Awaitility.await -import org.junit.jupiter.api.Test; - -@QuarkusTest -open class TimerLogKotlinTest { - - @Test - fun testTimerLogKotlin() { - val quarkusLogFile = File("target/quarkus.log") - - await().atMost(10L, TimeUnit.SECONDS).pollDelay(1, TimeUnit.SECONDS).until { - quarkusLogFile.readText(StandardCharsets.UTF_8).contains("Hello from Kotlin!") - } - } -} \ No newline at end of file diff --git a/timer-log-kotlin/src/test/kotlin/org/acme/kotlin/TimerLogKotlinIT.kt b/timer-log-kotlin/src/test/kotlin/org/acme/kotlin/TimerLogKotlinIT.kt deleted file mode 100644 index 348374ae..00000000 --- a/timer-log-kotlin/src/test/kotlin/org/acme/kotlin/TimerLogKotlinIT.kt +++ /dev/null @@ -1,22 +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.acme.timer - -import io.quarkus.test.junit.QuarkusIntegrationTest - -@QuarkusIntegrationTest -class TimerLogKotlinIT : TimerLogKotlinTest()