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-examples.git

commit dd975a50d3f275abffaca503bc6f8cf2160f6272
Author: Luca Burgazzoli <[email protected]>
AuthorDate: Tue Mar 2 11:47:33 2021 +0100

    Adapt to the new dsl artefacts
---
 examples/main-xml/pom.xml                          |  2 +-
 examples/routeloader/README.adoc                   | 12 +++++-----
 examples/routeloader/pom.xml                       |  9 ++++++--
 .../src/main/resources/myroutes/my-yaml-route.yaml | 27 ++++++++++++++++++++++
 4 files changed, 41 insertions(+), 9 deletions(-)

diff --git a/examples/main-xml/pom.xml b/examples/main-xml/pom.xml
index fdacd77..db412d1 100644
--- a/examples/main-xml/pom.xml
+++ b/examples/main-xml/pom.xml
@@ -59,7 +59,7 @@
         <!-- use fast and light-weight xml parser -->
         <dependency>
             <groupId>org.apache.camel</groupId>
-            <artifactId>camel-xml-io</artifactId>
+            <artifactId>camel-xml-io-dsl</artifactId>
         </dependency>
 
         <!-- and we use these components -->
diff --git a/examples/routeloader/README.adoc b/examples/routeloader/README.adoc
index 0f72be3..aa02830 100644
--- a/examples/routeloader/README.adoc
+++ b/examples/routeloader/README.adoc
@@ -1,16 +1,16 @@
-== Camel Example Route Loader with Java
+== Camel Example Route Loader with multiple DSLs
 
 This example shows how Camel is capable of loading routes during startup using 
the new route loader system.
-The route loader has support for loading routes in XML and Java (other 
languages to be added).
+The route loader has support for loading routes in XML, Java and YAML (other 
languages to be added).
 
 This is the feature that was first developed as part of Camel K which has 
evolved to be a core
 part of Camel.
 
-The Java route loader is using `camel-joor` component which has the support 
for dynamic compiling Java source.
+The example has the following routes in the `src/main/resources/myroutes` 
directory:
 
-The example has a Java route in the `src/main/resources/myroutes` directory. 
This route is a java file,
-but the file is not part of the regular source code and is therefore not 
compiled with the regular Java compiler.
-The route is loaded by Camels route loader and dynamic compiled via 
`camel-joor` during startup of Camel.
+- `MyRouteBuilder.java` which a java file, but the file is not part of the 
regular source code and is therefore not compiled with the regular Java 
compiler. The route is loaded by Camels route loader and dynamic compiled via 
`camel-java-joor-dsl` during startup of Camel.
+- `my-yaml-route.yaml` which is loaded by the new `camel-yaml-dsl` engine. 
+- `cheese-route.xml` which is loaded by the `camel-xml-io-dsl` engine.
 
 === How to run
 
diff --git a/examples/routeloader/pom.xml b/examples/routeloader/pom.xml
index ac882a4..4d8dc41 100644
--- a/examples/routeloader/pom.xml
+++ b/examples/routeloader/pom.xml
@@ -59,12 +59,17 @@
         <!-- joor with java route loader -->
         <dependency>
             <groupId>org.apache.camel</groupId>
-            <artifactId>camel-joor</artifactId>
+            <artifactId>camel-java-joor-dsl</artifactId>
         </dependency>
         <!-- xml-io with fast xml route loader -->
         <dependency>
             <groupId>org.apache.camel</groupId>
-            <artifactId>camel-xml-io</artifactId>
+            <artifactId>camel-xml-io-dsl</artifactId>
+        </dependency>
+        <!-- yaml route loader -->
+        <dependency>
+            <groupId>org.apache.camel</groupId>
+            <artifactId>camel-yaml-dsl</artifactId>
         </dependency>
 
         <!-- components -->
diff --git 
a/examples/routeloader/src/main/resources/myroutes/my-yaml-route.yaml 
b/examples/routeloader/src/main/resources/myroutes/my-yaml-route.yaml
new file mode 100644
index 0000000..6a8247a
--- /dev/null
+++ b/examples/routeloader/src/main/resources/myroutes/my-yaml-route.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.
+## ---------------------------------------------------------------------------
+
+- route:
+    from: "timer:yaml"
+    steps:
+      - set-body:
+          simple: "Timed fired ${header.CamelTimerCounter} times"
+      - to: 
+          uri: "log:yaml" 
+          properties:
+            show-body-type: false
+            show-exchange-pattern: false

Reply via email to