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

davsclaus pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel-jbang-examples.git


The following commit(s) were added to refs/heads/main by this push:
     new 0e6efc8  CAMEL-24808: rung 1 of the ladder: order-generator, 
nightly-report, properties-and-profiles (#76)
0e6efc8 is described below

commit 0e6efc834f9b487c3a2afa4aa87e2ca7d0dde8b5
Author: Claus Ibsen <[email protected]>
AuthorDate: Fri Sep 18 16:04:29 2026 +0200

    CAMEL-24808: rung 1 of the ladder: order-generator, nightly-report, 
properties-and-profiles (#76)
    
    The first rung of the real-world ladder, three examples in a new run/ 
directory: order-generator
    (a timer creates a shop order every five seconds, a Java bean hands out the 
order numbers, the
    order feed every later rung starts from), nightly-report (the cron 
component runs the inventory
    report on a schedule) and properties-and-profiles 
(application-prod.properties under
    --profile=prod). Each has the ladder README shape, metadata with level run 
and teaches, a Citrus
    YAML test the Camel CLI runs, and a CI matrix entry.
---
 .github/workflows/build.yml                        |   6 ++
 camel-jbang-example-catalog.json                   | 100 +++++++++++++++++++++
 run/nightly-report/README.md                       |  63 +++++++++++++
 run/nightly-report/application.properties          |  24 +++++
 run/nightly-report/metadata.json                   |  12 +++
 run/nightly-report/nightly-report.camel.yaml       |  16 ++++
 .../test/nightly-report.citrus.it.yaml             |  16 ++++
 run/order-generator/OrderNumber.java               |  20 +++++
 run/order-generator/README.md                      |  73 +++++++++++++++
 run/order-generator/application.properties         |  21 +++++
 run/order-generator/beans.yaml                     |   5 ++
 run/order-generator/metadata.json                  |  12 +++
 run/order-generator/order-generator.camel.yaml     |  24 +++++
 .../test/order-generator.citrus.it.yaml            |  24 +++++
 run/properties-and-profiles/README.md              |  73 +++++++++++++++
 .../application-prod.properties                    |  21 +++++
 run/properties-and-profiles/application.properties |  21 +++++
 run/properties-and-profiles/metadata.json          |  12 +++
 .../properties-and-profiles.camel.yaml             |  16 ++++
 .../test/properties-and-profiles.citrus.it.yaml    |  16 ++++
 20 files changed, 575 insertions(+)

diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index 0ba88b5..997a84b 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -32,6 +32,12 @@ jobs:
             path: messaging/ftp
           - name: MQTT messaging
             path: messaging/mqtt
+          - name: Order generator
+            path: run/order-generator
+          - name: Nightly report
+            path: run/nightly-report
+          - name: Properties and profiles
+            path: run/properties-and-profiles
           - name: OpenAPI server
             path: rest/openapi-server
           - name: OpenAPI client
diff --git a/camel-jbang-example-catalog.json b/camel-jbang-example-catalog.json
index 43408cb..de4521d 100644
--- a/camel-jbang-example-catalog.json
+++ b/camel-jbang-example-catalog.json
@@ -804,6 +804,106 @@
             "petstore.camel.yaml"
         ]
     },
+    {
+        "name": "run/nightly-report",
+        "title": "Nightly report",
+        "description": "A cron schedule runs the shop's inventory report, 
every ten seconds in the demo and nightly with a one-line change, and each run 
logs the stock counts with a timestamp.",
+        "level": "run",
+        "teaches": {
+            "components": [
+                "cron",
+                "log"
+            ],
+            "eips": [
+                "setBody"
+            ],
+            "languages": [
+                "simple"
+            ]
+        },
+        "tags": [
+            "shop",
+            "cron",
+            "schedule"
+        ],
+        "bundled": false,
+        "requiresDocker": false,
+        "hasCitrusTests": true,
+        "files": [
+            "README.md",
+            "application.properties",
+            "nightly-report.camel.yaml"
+        ]
+    },
+    {
+        "name": "run/order-generator",
+        "title": "Order generator",
+        "description": "A timer creates a shop order every five seconds: a 
Java bean hands out the order number, the body is the order as JSON, and the 
log shows each new order. The order feed every later example starts from.",
+        "level": "run",
+        "teaches": {
+            "components": [
+                "timer",
+                "log"
+            ],
+            "eips": [
+                "setHeader",
+                "setBody"
+            ],
+            "languages": [
+                "simple",
+                "method"
+            ]
+        },
+        "tags": [
+            "shop",
+            "timer",
+            "bean",
+            "json"
+        ],
+        "bundled": false,
+        "requiresDocker": false,
+        "hasCitrusTests": true,
+        "files": [
+            "OrderNumber.java",
+            "README.md",
+            "application.properties",
+            "beans.yaml",
+            "order-generator.camel.yaml"
+        ]
+    },
+    {
+        "name": "run/properties-and-profiles",
+        "title": "Properties and profiles",
+        "description": "A timer logs a welcome with the shop name and currency 
from application.properties; run with --profile=prod and 
application-prod.properties overrides both, so the same route greets with the 
production values.",
+        "level": "run",
+        "teaches": {
+            "components": [
+                "timer",
+                "log"
+            ],
+            "eips": [
+                "setBody"
+            ],
+            "languages": [
+                "simple"
+            ]
+        },
+        "tags": [
+            "shop",
+            "properties",
+            "profiles",
+            "configuration"
+        ],
+        "bundled": false,
+        "requiresDocker": false,
+        "hasCitrusTests": true,
+        "files": [
+            "README.md",
+            "application-prod.properties",
+            "application.properties",
+            "properties-and-profiles.camel.yaml"
+        ]
+    },
     {
         "name": "security/keycloak-security-rest",
         "title": "Keycloak Security REST API",
diff --git a/run/nightly-report/README.md b/run/nightly-report/README.md
new file mode 100644
index 0000000..ac608cd
--- /dev/null
+++ b/run/nightly-report/README.md
@@ -0,0 +1,63 @@
+# Nightly report
+
+The shop's inventory report on a schedule. A cron expression triggers the 
route instead of a timer: every
+ten seconds in the demo, nightly at 02:00 with a one-line change in 
`application.properties`.
+
+## What you will see
+
+```text
+INFO ... nightly-report.camel.yaml:15 : Inventory report 2026-09-18 15:04:10: 
120 T-shirts and 45 mugs in stock
+INFO ... nightly-report.camel.yaml:15 : Inventory report 2026-09-18 15:04:20: 
120 T-shirts and 45 mugs in stock
+```
+
+## Install Camel CLI
+
+<!-- see installation instructions in ../../install.adoc -->
+
+## Run it
+
+```shell
+camel run *
+```
+
+## How it works
+
+- The `cron` component fires on the schedule `report.schedule`, a cron 
expression with seconds first.
+- `setBody` builds the report line with the simple language: the current time 
with `${date:now:...}`
+  and the stock counts from properties.
+- The Camel CLI adds the scheduler (camel-quartz) the cron component needs on 
its own.
+
+## Build it step by step
+
+1. Start from a timer route that logs "Inventory report" every ten seconds.
+2. Replace the timer with `cron` and the schedule `0/10 * * * * ?`; the log 
keeps coming every ten seconds.
+3. Add the current time to the message with `${date:now:yyyy-MM-dd HH:mm:ss}`.
+4. Move the schedule and the stock counts to `application.properties` and use 
them as `{{...}}`.
+5. Change the schedule to `0 0 2 * * ?` and read it back: at two in the 
morning, every night.
+
+## Try changing
+
+- `0 * * * * ?` runs at the top of every minute.
+- Log the report at `WARN` level when a count drops below ten: the 
`content-based-router` example shows
+  the `choice` you need.
+
+## Integration testing
+
+The example comes with a test in the [Citrus](https://citrusframework.org/) 
YAML DSL,
+`test/nightly-report.citrus.it.yaml`, which the Camel CLI runs:
+
+```shell
+camel test run test/nightly-report.citrus.it.yaml
+```
+
+The test starts the route and verifies the logged line.
+
+## Help and contributions
+
+If you hit any problem using Camel or have some feedback, then please
+[let us know](https://camel.apache.org/community/support/).
+
+We also love contributors, so
+[get involved](https://camel.apache.org/community/contributing/) :-)
+
+The Camel riders!
diff --git a/run/nightly-report/application.properties 
b/run/nightly-report/application.properties
new file mode 100644
index 0000000..b2f7fad
--- /dev/null
+++ b/run/nightly-report/application.properties
@@ -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.
+
+# When the report runs, as a cron expression (seconds minutes hours day month 
weekday).
+# Every ten seconds for the demo; a nightly run at 02:00 is: report.schedule=0 
0 2 * * ?
+report.schedule=0/10 * * * * ?
+
+# The stock the report counts
+inventory.tshirt=120
+inventory.mug=45
diff --git a/run/nightly-report/metadata.json b/run/nightly-report/metadata.json
new file mode 100644
index 0000000..44100d3
--- /dev/null
+++ b/run/nightly-report/metadata.json
@@ -0,0 +1,12 @@
+{
+    "title": "Nightly report",
+    "description": "A cron schedule runs the shop's inventory report, every 
ten seconds in the demo and nightly with a one-line change, and each run logs 
the stock counts with a timestamp.",
+    "level": "run",
+    "teaches": {
+        "components": ["cron", "log"],
+        "eips": ["setBody"],
+        "languages": ["simple"]
+    },
+    "tags": ["shop", "cron", "schedule"],
+    "bundled": false
+}
diff --git a/run/nightly-report/nightly-report.camel.yaml 
b/run/nightly-report/nightly-report.camel.yaml
new file mode 100644
index 0000000..73f0cfb
--- /dev/null
+++ b/run/nightly-report/nightly-report.camel.yaml
@@ -0,0 +1,16 @@
+# The shop's inventory report on a schedule. A cron expression instead of a 
timer: the demo schedule
+# runs every ten seconds so there is something to see; a real nightly run is a 
one-line change.
+- route:
+    id: nightly-report
+    from:
+      uri: cron
+      parameters:
+        name: report
+        schedule: "{{report.schedule}}"
+      steps:
+        - setBody:
+            expression:
+              simple:
+                expression: "Inventory report ${date:now:yyyy-MM-dd HH:mm:ss}: 
{{inventory.tshirt}} T-shirts and {{inventory.mug}} mugs in stock"
+        - log:
+            message: "${body}"
diff --git a/run/nightly-report/test/nightly-report.citrus.it.yaml 
b/run/nightly-report/test/nightly-report.citrus.it.yaml
new file mode 100644
index 0000000..f49d866
--- /dev/null
+++ b/run/nightly-report/test/nightly-report.citrus.it.yaml
@@ -0,0 +1,16 @@
+name: nightly-report-test
+description: The scheduled report logs the stock counts
+actions:
+  - camel:
+      jbang:
+        run:
+          integration:
+            name: "nightly-report"
+            file: "../nightly-report.camel.yaml"
+            systemProperties:
+              file: "../application.properties"
+  - camel:
+      jbang:
+        verify:
+          integration: "nightly-report"
+          logMessage: "120 T-shirts and 45 mugs in stock"
diff --git a/run/order-generator/OrderNumber.java 
b/run/order-generator/OrderNumber.java
new file mode 100644
index 0000000..e1e963c
--- /dev/null
+++ b/run/order-generator/OrderNumber.java
@@ -0,0 +1,20 @@
+package camel.example;
+
+import java.util.concurrent.atomic.AtomicInteger;
+
+/**
+ * Hands out the shop's order numbers, ORD-1001, ORD-1002, ... A plain Java 
class next to the route, declared as a
+ * bean in beans.yaml and called from the route with a method expression.
+ */
+public class OrderNumber {
+
+    private final AtomicInteger counter = new AtomicInteger();
+
+    public void setStart(int start) {
+        counter.set(start - 1);
+    }
+
+    public String next() {
+        return "ORD-" + counter.incrementAndGet();
+    }
+}
diff --git a/run/order-generator/README.md b/run/order-generator/README.md
new file mode 100644
index 0000000..e644321
--- /dev/null
+++ b/run/order-generator/README.md
@@ -0,0 +1,73 @@
+# Order generator
+
+The shop's order feed. A timer creates an order every five seconds, a Java 
bean hands out the order
+number, and the order is logged as JSON. Every later example on the ladder 
starts from this file and
+this order shape.
+
+## What you will see
+
+```text
+INFO ... order-generator.camel.yaml:23 : New order ORD-1001: {"orderId": 
"ORD-1001", "customer": "C-482", "country": "DK", "lines": [{"sku": 
"CAMEL-TSHIRT", "qty": 2, "price": 19.95}], "status": "paid"}
+INFO ... order-generator.camel.yaml:23 : New order ORD-1002: {"orderId": 
"ORD-1002", "customer": "C-207", "country": "DK", "lines": [{"sku": 
"CAMEL-TSHIRT", "qty": 1, "price": 19.95}], "status": "paid"}
+```
+
+## Install Camel CLI
+
+<!-- see installation instructions in ../../install.adoc -->
+
+## Run it
+
+```shell
+camel run *
+```
+
+Stop it with `ctrl` + `c`, or from another terminal with `camel stop 
order-generator`.
+
+## How it works
+
+- `order-generator.camel.yaml` is the route: a `timer` fires every 
`order.period` milliseconds, a
+  `setHeader` asks the `orderNumber` bean for the next number with a method 
expression, a `setBody`
+  builds the order as JSON with the simple language, and a `log` prints it.
+- `OrderNumber.java` is a plain Java class next to the route. `beans.yaml` 
declares it as the bean
+  `orderNumber` and sets its first number from a property.
+- `application.properties` holds the period and the first order number; change 
them without touching
+  the route.
+
+## Build it step by step
+
+Ask your assistant, or type it yourself, one step at a time, and run after 
each:
+
+1. A timer route that logs "New order" every five seconds.
+2. Set a header `orderId` to a constant `ORD-1001` and log "New order 
${header.orderId}".
+3. Add a Java class `OrderNumber` with a method `next()` that returns `ORD-` 
and a counter, declare it
+   in `beans.yaml`, and set the header from the bean's method instead of the 
constant.
+4. Set the body to a JSON order with the order id, a random customer and one 
line, and log the body.
+5. Move the period and the first order number to `application.properties`.
+
+## Try changing
+
+- `order.period=1000` for an order every second.
+- Add a second line to the order, or pick the sku at random from two products.
+- Log only the order id and the number of lines: `${header.orderId} has 
${body.lines.size()} line(s)`
+  needs the body as an object; the `json-transform` example on the next rung 
shows how.
+
+## Integration testing
+
+The example comes with a test in the [Citrus](https://citrusframework.org/) 
YAML DSL,
+`test/order-generator.citrus.it.yaml`, which the Camel CLI runs:
+
+```shell
+camel test run test/order-generator.citrus.it.yaml
+```
+
+The test starts the route and verifies the logged line.
+
+## Help and contributions
+
+If you hit any problem using Camel or have some feedback, then please
+[let us know](https://camel.apache.org/community/support/).
+
+We also love contributors, so
+[get involved](https://camel.apache.org/community/contributing/) :-)
+
+The Camel riders!
diff --git a/run/order-generator/application.properties 
b/run/order-generator/application.properties
new file mode 100644
index 0000000..bf07ed7
--- /dev/null
+++ b/run/order-generator/application.properties
@@ -0,0 +1,21 @@
+# 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.
+
+# How often a new order is created, in milliseconds
+order.period=5000
+# The first order number
+order.first-number=1001
diff --git a/run/order-generator/beans.yaml b/run/order-generator/beans.yaml
new file mode 100644
index 0000000..444deab
--- /dev/null
+++ b/run/order-generator/beans.yaml
@@ -0,0 +1,5 @@
+- beans:
+    - name: orderNumber
+      type: "camel.example.OrderNumber"
+      properties:
+        start: "{{order.first-number}}"
diff --git a/run/order-generator/metadata.json 
b/run/order-generator/metadata.json
new file mode 100644
index 0000000..161db95
--- /dev/null
+++ b/run/order-generator/metadata.json
@@ -0,0 +1,12 @@
+{
+    "title": "Order generator",
+    "description": "A timer creates a shop order every five seconds: a Java 
bean hands out the order number, the body is the order as JSON, and the log 
shows each new order. The order feed every later example starts from.",
+    "level": "run",
+    "teaches": {
+        "components": ["timer", "log"],
+        "eips": ["setHeader", "setBody"],
+        "languages": ["simple", "method"]
+    },
+    "tags": ["shop", "timer", "bean", "json"],
+    "bundled": false
+}
diff --git a/run/order-generator/order-generator.camel.yaml 
b/run/order-generator/order-generator.camel.yaml
new file mode 100644
index 0000000..514f42b
--- /dev/null
+++ b/run/order-generator/order-generator.camel.yaml
@@ -0,0 +1,24 @@
+# The shop's order feed: a timer creates an order every few seconds. Every 
later example on the
+# ladder starts from this file and this order shape.
+- route:
+    id: order-generator
+    from:
+      uri: timer
+      parameters:
+        timerName: orders
+        period: "{{order.period}}"
+      steps:
+        - setHeader:
+            name: orderId
+            expression:
+              method:
+                ref: orderNumber
+                method: next
+        - setBody:
+            expression:
+              simple:
+                expression: |-
+                  {"orderId": "${header.orderId}", "customer": 
"C-${random(100,999)}", "country": "DK",
+                   "lines": [{"sku": "CAMEL-TSHIRT", "qty": ${random(1,3)}, 
"price": 19.95}], "status": "paid"}
+        - log:
+            message: "New order ${header.orderId}: ${body}"
diff --git a/run/order-generator/test/order-generator.citrus.it.yaml 
b/run/order-generator/test/order-generator.citrus.it.yaml
new file mode 100644
index 0000000..5ffe782
--- /dev/null
+++ b/run/order-generator/test/order-generator.citrus.it.yaml
@@ -0,0 +1,24 @@
+name: order-generator-test
+description: The order generator logs a new order with a number and a JSON body
+actions:
+  - camel:
+      jbang:
+        run:
+          integration:
+            name: "order-generator"
+            file: "../order-generator.camel.yaml"
+            systemProperties:
+              file: "../application.properties"
+          resources:
+            - "beans.yaml"
+            - "OrderNumber.java"
+  - camel:
+      jbang:
+        verify:
+          integration: "order-generator"
+          logMessage: "New order ORD-1001"
+  - camel:
+      jbang:
+        verify:
+          integration: "order-generator"
+          logMessage: "\"sku\": \"CAMEL-TSHIRT\""
diff --git a/run/properties-and-profiles/README.md 
b/run/properties-and-profiles/README.md
new file mode 100644
index 0000000..e749ff1
--- /dev/null
+++ b/run/properties-and-profiles/README.md
@@ -0,0 +1,73 @@
+# Properties and profiles
+
+One route, two configurations. `application.properties` is what `camel run` 
uses; `application-prod.properties`
+holds the values that differ in production and is chosen with `--profile=prod`.
+
+## What you will see
+
+```text
+camel run *
+INFO ... properties-and-profiles.camel.yaml:15 : Welcome to Camel Shop 
(development), prices in EUR
+
+camel run * --profile=prod
+INFO ... properties-and-profiles.camel.yaml:15 : Welcome to Camel Shop, prices 
in USD
+```
+
+## Install Camel CLI
+
+<!-- see installation instructions in ../../install.adoc -->
+
+## Run it
+
+```shell
+camel run *
+```
+
+and then the production profile:
+
+```shell
+camel run * --profile=prod
+```
+
+## How it works
+
+- `{{shop.name}}` and `{{shop.currency}}` in the route are property 
placeholders; Camel resolves them
+  from `application.properties` at startup.
+- With `--profile=prod` Camel also reads `application-prod.properties`, and a 
value there wins over the
+  same key in `application.properties`. Only the differing values need to be 
in the profile file.
+- `welcome.period` is only in `application.properties`, so both profiles share 
it.
+
+## Build it step by step
+
+1. A timer route that logs "Welcome to Camel Shop".
+2. Move the shop name to `application.properties` as `shop.name` and use 
`{{shop.name}}` in the message.
+3. Add `shop.currency` the same way and mention it in the message.
+4. Create `application-prod.properties` with a different name and currency, 
run with `--profile=prod`,
+   and see the message change.
+5. Move the timer period to a property that only `application.properties` has.
+
+## Try changing
+
+- Override a single value from the command line: `camel run * 
--prop=shop.currency=DKK`.
+- Add an `application-test.properties` and run `--profile=test`.
+
+## Integration testing
+
+The example comes with a test in the [Citrus](https://citrusframework.org/) 
YAML DSL,
+`test/properties-and-profiles.citrus.it.yaml`, which the Camel CLI runs:
+
+```shell
+camel test run test/properties-and-profiles.citrus.it.yaml
+```
+
+The test starts the route and verifies the logged line.
+
+## Help and contributions
+
+If you hit any problem using Camel or have some feedback, then please
+[let us know](https://camel.apache.org/community/support/).
+
+We also love contributors, so
+[get involved](https://camel.apache.org/community/contributing/) :-)
+
+The Camel riders!
diff --git a/run/properties-and-profiles/application-prod.properties 
b/run/properties-and-profiles/application-prod.properties
new file mode 100644
index 0000000..33d3d1c
--- /dev/null
+++ b/run/properties-and-profiles/application-prod.properties
@@ -0,0 +1,21 @@
+# 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.
+
+# The production configuration, used with camel run --profile=prod.
+# Only the values that differ are needed; the rest come from 
application.properties.
+shop.name=Camel Shop
+shop.currency=USD
diff --git a/run/properties-and-profiles/application.properties 
b/run/properties-and-profiles/application.properties
new file mode 100644
index 0000000..050a9e5
--- /dev/null
+++ b/run/properties-and-profiles/application.properties
@@ -0,0 +1,21 @@
+# 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.
+
+# The default configuration, used with plain camel run
+shop.name=Camel Shop (development)
+shop.currency=EUR
+welcome.period=3000
diff --git a/run/properties-and-profiles/metadata.json 
b/run/properties-and-profiles/metadata.json
new file mode 100644
index 0000000..17bd78e
--- /dev/null
+++ b/run/properties-and-profiles/metadata.json
@@ -0,0 +1,12 @@
+{
+    "title": "Properties and profiles",
+    "description": "A timer logs a welcome with the shop name and currency 
from application.properties; run with --profile=prod and 
application-prod.properties overrides both, so the same route greets with the 
production values.",
+    "level": "run",
+    "teaches": {
+        "components": ["timer", "log"],
+        "eips": ["setBody"],
+        "languages": ["simple"]
+    },
+    "tags": ["shop", "properties", "profiles", "configuration"],
+    "bundled": false
+}
diff --git a/run/properties-and-profiles/properties-and-profiles.camel.yaml 
b/run/properties-and-profiles/properties-and-profiles.camel.yaml
new file mode 100644
index 0000000..6882e66
--- /dev/null
+++ b/run/properties-and-profiles/properties-and-profiles.camel.yaml
@@ -0,0 +1,16 @@
+# The same route with two configurations: application.properties for 
development and
+# application-prod.properties for production, chosen with --profile=prod.
+- route:
+    id: welcome
+    from:
+      uri: timer
+      parameters:
+        timerName: welcome
+        period: "{{welcome.period}}"
+      steps:
+        - setBody:
+            expression:
+              simple:
+                expression: "Welcome to {{shop.name}}, prices in 
{{shop.currency}}"
+        - log:
+            message: "${body}"
diff --git 
a/run/properties-and-profiles/test/properties-and-profiles.citrus.it.yaml 
b/run/properties-and-profiles/test/properties-and-profiles.citrus.it.yaml
new file mode 100644
index 0000000..7744604
--- /dev/null
+++ b/run/properties-and-profiles/test/properties-and-profiles.citrus.it.yaml
@@ -0,0 +1,16 @@
+name: properties-and-profiles-test
+description: The route greets with the values of application.properties
+actions:
+  - camel:
+      jbang:
+        run:
+          integration:
+            name: "properties-and-profiles"
+            file: "../properties-and-profiles.camel.yaml"
+            systemProperties:
+              file: "../application.properties"
+  - camel:
+      jbang:
+        verify:
+          integration: "properties-and-profiles"
+          logMessage: "Welcome to Camel Shop (development), prices in EUR"

Reply via email to