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.git
The following commit(s) were added to refs/heads/main by this push:
new 0874cd7b43b CAMEL-19302: camel init - Should not include hardcoded
routeId
0874cd7b43b is described below
commit 0874cd7b43b509db6b661f729e8a936337af6569
Author: Claus Ibsen <[email protected]>
AuthorDate: Tue May 2 18:53:35 2023 +0200
CAMEL-19302: camel init - Should not include hardcoded routeId
---
.../camel-jbang-core/src/main/resources/templates/groovy.tmpl | 1 -
dsl/camel-jbang/camel-jbang-core/src/main/resources/templates/java.tmpl | 2 +-
dsl/camel-jbang/camel-jbang-core/src/main/resources/templates/js.tmpl | 1 -
dsl/camel-jbang/camel-jbang-core/src/main/resources/templates/jsh.tmpl | 1 -
dsl/camel-jbang/camel-jbang-core/src/main/resources/templates/kts.tmpl | 1 -
dsl/camel-jbang/camel-jbang-core/src/main/resources/templates/xml.tmpl | 2 +-
dsl/camel-jbang/camel-jbang-core/src/main/resources/templates/yaml.tmpl | 2 +-
7 files changed, 3 insertions(+), 7 deletions(-)
diff --git
a/dsl/camel-jbang/camel-jbang-core/src/main/resources/templates/groovy.tmpl
b/dsl/camel-jbang/camel-jbang-core/src/main/resources/templates/groovy.tmpl
index 5c85581ae48..5776142ff6d 100644
--- a/dsl/camel-jbang/camel-jbang-core/src/main/resources/templates/groovy.tmpl
+++ b/dsl/camel-jbang/camel-jbang-core/src/main/resources/templates/groovy.tmpl
@@ -2,7 +2,6 @@
// Write your routes here, for example:
from('timer:groovy?period=1000')
- .routeId('groovy')
.setBody()
.simple('Hello Camel from ${routeId}')
.log('${body}')
diff --git
a/dsl/camel-jbang/camel-jbang-core/src/main/resources/templates/java.tmpl
b/dsl/camel-jbang/camel-jbang-core/src/main/resources/templates/java.tmpl
index 37bc087951e..887f1b2bca4 100644
--- a/dsl/camel-jbang/camel-jbang-core/src/main/resources/templates/java.tmpl
+++ b/dsl/camel-jbang/camel-jbang-core/src/main/resources/templates/java.tmpl
@@ -8,7 +8,7 @@ public class {{ .Name }} extends RouteBuilder {
public void configure() throws Exception {
// Write your routes here, for example:
- from("timer:java?period={{time:1000}}").routeId("java")
+ from("timer:java?period={{time:1000}}")
.setBody()
.simple("Hello Camel from ${routeId}")
.log("${body}");
diff --git
a/dsl/camel-jbang/camel-jbang-core/src/main/resources/templates/js.tmpl
b/dsl/camel-jbang/camel-jbang-core/src/main/resources/templates/js.tmpl
index d44eb892ac4..3b0dd87c2a0 100644
--- a/dsl/camel-jbang/camel-jbang-core/src/main/resources/templates/js.tmpl
+++ b/dsl/camel-jbang/camel-jbang-core/src/main/resources/templates/js.tmpl
@@ -2,7 +2,6 @@
// Write your routes here, for example:
from('timer:js?period=1000')
- .routeId('js')
.setBody()
.simple('Hello Camel from ${routeId}')
.log('${body}')
diff --git
a/dsl/camel-jbang/camel-jbang-core/src/main/resources/templates/jsh.tmpl
b/dsl/camel-jbang/camel-jbang-core/src/main/resources/templates/jsh.tmpl
index 1ddebe78fbe..74545cc227f 100644
--- a/dsl/camel-jbang/camel-jbang-core/src/main/resources/templates/jsh.tmpl
+++ b/dsl/camel-jbang/camel-jbang-core/src/main/resources/templates/jsh.tmpl
@@ -2,7 +2,6 @@
// Write your routes here, for example:
builder.from("timer:tick?period=1000")
- .routeId('jsh')
.setBody()
.simple('Hello Camel from ${routeId}')
.log('${body}');
diff --git
a/dsl/camel-jbang/camel-jbang-core/src/main/resources/templates/kts.tmpl
b/dsl/camel-jbang/camel-jbang-core/src/main/resources/templates/kts.tmpl
index d200de07a20..61136acd9bc 100644
--- a/dsl/camel-jbang/camel-jbang-core/src/main/resources/templates/kts.tmpl
+++ b/dsl/camel-jbang/camel-jbang-core/src/main/resources/templates/kts.tmpl
@@ -2,7 +2,6 @@
// Write your routes here, for example:
from("timer:kotlin?period=1000")
- .routeId("kotlin")
.setBody()
.simple("Hello Camel from \${routeId}")
.log("\${body}")
diff --git
a/dsl/camel-jbang/camel-jbang-core/src/main/resources/templates/xml.tmpl
b/dsl/camel-jbang/camel-jbang-core/src/main/resources/templates/xml.tmpl
index 290384f2898..d9db2253489 100644
--- a/dsl/camel-jbang/camel-jbang-core/src/main/resources/templates/xml.tmpl
+++ b/dsl/camel-jbang/camel-jbang-core/src/main/resources/templates/xml.tmpl
@@ -8,7 +8,7 @@
https://camel.apache.org/schema/spring/camel-spring.xsd">
<!-- Write your routes here, for example: -->
- <route id="xml">
+ <route>
<from uri="timer:xml?period={{time:1000}}"/>
<setBody>
<simple>Hello Camel from ${routeId}</simple>
diff --git
a/dsl/camel-jbang/camel-jbang-core/src/main/resources/templates/yaml.tmpl
b/dsl/camel-jbang/camel-jbang-core/src/main/resources/templates/yaml.tmpl
index ba311b93d2e..af5c3700f56 100644
--- a/dsl/camel-jbang/camel-jbang-core/src/main/resources/templates/yaml.tmpl
+++ b/dsl/camel-jbang/camel-jbang-core/src/main/resources/templates/yaml.tmpl
@@ -7,5 +7,5 @@
period: "1000"
steps:
- setBody:
- constant: "Hello Camel from yaml"
+ simple: "Hello Camel from ${routeId}"
- log: "${body}"