You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by ac...@apache.org on 2022/08/22 05:03:30 UTC
[camel-k] branch main updated: migrate and improve languages example
This is an automated email from the ASF dual-hosted git repository.
acosentino pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel-k.git
The following commit(s) were added to refs/heads/main by this push:
new c51c7b09a migrate and improve languages example
c51c7b09a is described below
commit c51c7b09a9168045c94b89f917593a40042ae6a1
Author: Kuthumi Pepple <ku...@gmail.com>
AuthorDate: Fri Aug 19 06:54:17 2022 +0100
migrate and improve languages example
---
examples/README.md | 1 -
examples/languages/README.md | 3 ---
examples/languages/Sample.java | 26 --------------------------
examples/languages/hello.xml | 30 ------------------------------
examples/languages/routes.kts | 23 -----------------------
examples/languages/routes.yaml | 27 ---------------------------
examples/languages/simple.groovy | 23 -----------------------
examples/languages/simple.js | 21 ---------------------
8 files changed, 154 deletions(-)
diff --git a/examples/README.md b/examples/README.md
index 4f8ea61dc..7ba5a016e 100644
--- a/examples/README.md
+++ b/examples/README.md
@@ -8,7 +8,6 @@ In this section you will find the most basic examples. Useful to start learning
| Type | Description | Link |
|---|---|---|
-| Languages | Simple integrations developed in various supported languages | [see examples](./languages/)|
| User Config | Explore how to include a `property`, `secret`, `configmap` or file `resource` in your integration | [see examples](./user-config/)|
| Processor | Show how to include `Processor`s logic | [see examples](./processor/)|
| Open API | `Open API` support | [see examples](./openapi/)|
diff --git a/examples/languages/README.md b/examples/languages/README.md
deleted file mode 100644
index 1d70af4d0..000000000
--- a/examples/languages/README.md
+++ /dev/null
@@ -1,3 +0,0 @@
-# Supported languages Camel K examples
-
-Find useful examples about how to develop a Camel K integration in `Java`, `Javascript`, `Groovy`, `XML` and `YAML`.
\ No newline at end of file
diff --git a/examples/languages/Sample.java b/examples/languages/Sample.java
deleted file mode 100644
index a8223acbc..000000000
--- a/examples/languages/Sample.java
+++ /dev/null
@@ -1,26 +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.
- */
-
-import org.apache.camel.builder.RouteBuilder;
-
-public class Sample extends RouteBuilder {
- @Override
- public void configure() throws Exception {
- from("timer:tick")
- .log("Hello Camel K!");
- }
-}
\ No newline at end of file
diff --git a/examples/languages/hello.xml b/examples/languages/hello.xml
deleted file mode 100644
index 75ae138cd..000000000
--- a/examples/languages/hello.xml
+++ /dev/null
@@ -1,30 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- Licensed to the Apache Software Foundation (ASF) under one or more
- contributor license agreements. See the NOTICE file distributed with
- this work for additional information regarding copyright ownership.
- The ASF licenses this file to You under the Apache License, Version 2.0
- (the "License"); you may not use this file except in compliance with
- the License. You may obtain a copy of the License at
- http://www.apache.org/licenses/LICENSE-2.0
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
--->
-<routes xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xmlns="http://camel.apache.org/schema/spring"
- xsi:schemaLocation="
- http://camel.apache.org/schema/spring
- https://camel.apache.org/schema/spring/camel-spring.xsd">
-
- <route id="hello">
- <from uri="timer:hello?period=3000"/>
- <setBody>
- <constant>Hello World!!!</constant>
- </setBody>
- <to uri="log:info"/>
- </route>
-
-</routes>
diff --git a/examples/languages/routes.kts b/examples/languages/routes.kts
deleted file mode 100755
index 713c91d66..000000000
--- a/examples/languages/routes.kts
+++ /dev/null
@@ -1,23 +0,0 @@
-// camel-k: language=kotlin
-/*
- * 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.
- */
-
-from("timer:kotlin?period=1000")
- .routeId("kotlin")
- .setBody()
- .simple("Hello Camel K from \${routeId}")
- .to("log:info")
diff --git a/examples/languages/routes.yaml b/examples/languages/routes.yaml
deleted file mode 100644
index 201b47a35..000000000
--- a/examples/languages/routes.yaml
+++ /dev/null
@@ -1,27 +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.
-# ---------------------------------------------------------------------------
-
-- from:
- uri: "timer:tick"
- parameters:
- period: "5000"
- steps:
- - set-body:
- constant: "Hello Yaml !!!"
- - transform:
- simple: "${body.toUpperCase()}"
- - to: "log:info"
diff --git a/examples/languages/simple.groovy b/examples/languages/simple.groovy
deleted file mode 100644
index 31ef5701b..000000000
--- a/examples/languages/simple.groovy
+++ /dev/null
@@ -1,23 +0,0 @@
-// camel-k: language=groovy
-/*
- * 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.
- */
-
-from('timer:groovy?period=1000')
- .routeId('groovy')
- .setBody()
- .simple('Hello Camel K from ${routeId}')
- .to('log:info?showAll=false')
diff --git a/examples/languages/simple.js b/examples/languages/simple.js
deleted file mode 100644
index ac0ad7733..000000000
--- a/examples/languages/simple.js
+++ /dev/null
@@ -1,21 +0,0 @@
-// camel-k: language=js
-// 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.
-
-from('timer:js?period=1000')
- .routeId('js')
- .setBody()
- .simple('Hello Camel K from ${routeId}')
- .to('log:info?multiline=true')