You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by lb...@apache.org on 2021/03/02 11:29:46 UTC

[camel-examples] branch master updated (7639e09 -> 019099d)

This is an automated email from the ASF dual-hosted git repository.

lburgazzoli pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/camel-examples.git.


    from 7639e09  CAMEL-16012: Remove prefix 07 (#40)
     new dd975a5  Adapt to the new dsl artefacts
     new 019099d  Remove duplicated artemis module

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 examples/main-xml/pom.xml                                |  2 +-
 examples/pom.xml                                         |  1 -
 examples/routeloader/README.adoc                         | 12 ++++++------
 examples/routeloader/pom.xml                             |  9 +++++++--
 .../src/main/resources/myroutes/my-yaml-route.yaml}      | 16 ++++++++++------
 5 files changed, 24 insertions(+), 16 deletions(-)
 copy examples/{activemq-tomcat/src/main/resources/log4j2.properties => routeloader/src/main/resources/myroutes/my-yaml-route.yaml} (78%)


[camel-examples] 02/02: Remove duplicated artemis module

Posted by lb...@apache.org.
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 019099d603ab62bdeab084176702ca00088b89b0
Author: Luca Burgazzoli <lb...@gmail.com>
AuthorDate: Tue Mar 2 11:52:52 2021 +0100

    Remove duplicated artemis module
---
 examples/pom.xml | 1 -
 1 file changed, 1 deletion(-)

diff --git a/examples/pom.xml b/examples/pom.xml
index 1681ecd..64e902c 100644
--- a/examples/pom.xml
+++ b/examples/pom.xml
@@ -126,7 +126,6 @@
         <module>loadbalancing</module>
         <module>loan-broker-jms</module>
         <module>main</module>
-        <module>artemis</module>
         <module>main-endpointdsl</module>
         <module>main-endpointdsl-aws2</module>
         <module>main-endpointdsl-aws2-s3</module>


[camel-examples] 01/02: Adapt to the new dsl artefacts

Posted by lb...@apache.org.
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 <lb...@gmail.com>
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