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 575b47a39d2 CAMEL-18034: camel-jbang - Rename --reload to --dev
575b47a39d2 is described below
commit 575b47a39d28ab2cf661314c02c95e7cf0941ba1
Author: Claus Ibsen <[email protected]>
AuthorDate: Fri Apr 29 13:37:37 2022 +0200
CAMEL-18034: camel-jbang - Rename --reload to --dev
---
docs/user-manual/modules/ROOT/pages/camel-jbang.adoc | 12 ++++++------
.../java/org/apache/camel/dsl/jbang/core/commands/Run.java | 12 ++++++------
2 files changed, 12 insertions(+), 12 deletions(-)
diff --git a/docs/user-manual/modules/ROOT/pages/camel-jbang.adoc
b/docs/user-manual/modules/ROOT/pages/camel-jbang.adoc
index a958677bf06..776d3b14cdc 100644
--- a/docs/user-manual/modules/ROOT/pages/camel-jbang.adoc
+++ b/docs/user-manual/modules/ROOT/pages/camel-jbang.adoc
@@ -102,14 +102,14 @@ camel run foo*
TIP: The run goal can also detect files that are `properties`.
-=== Live reload
+=== Dev mode with live reload
-You can enable live reload of the route(s) when the source file is updated
(saved),
-using the `--reload` options as shown:
+You can enable dev mode that comes with live reload of the route(s) when the
source file is updated (saved),
+using the `--dev` options as shown:
[source,bash]
----
-camel run jms-amqp-10-sink-binding.yaml --reload
+camel run jms-amqp-10-sink-binding.yaml --dev
----
Then while the Camel application is running, you can update the YAML route and
update when saving.
@@ -171,11 +171,11 @@ The example can then be run locally with:
camel run *
----
-You can also run in reload mode, to hot-deploy on source code changes.
+You can also run in dev mode, to hot-deploy on source code changes.
[source,bash]
----
-camel run * --reload
+camel run * --dev
----
You can also download a single file, such as one of the Camel K examples:
diff --git
a/dsl/camel-jbang/camel-jbang-core/src/main/java/org/apache/camel/dsl/jbang/core/commands/Run.java
b/dsl/camel-jbang/camel-jbang-core/src/main/java/org/apache/camel/dsl/jbang/core/commands/Run.java
index 05059433f4d..88f3689c8ad 100644
---
a/dsl/camel-jbang/camel-jbang-core/src/main/java/org/apache/camel/dsl/jbang/core/commands/Run.java
+++
b/dsl/camel-jbang/camel-jbang-core/src/main/java/org/apache/camel/dsl/jbang/core/commands/Run.java
@@ -98,8 +98,8 @@ class Run implements Callable<Integer> {
description = "For how long time in seconds Camel can be idle
before stopping")
private int maxIdleSeconds;
- @Option(names = { "--reload" }, description = "Enables live reload when
source file is changed (saved)")
- private boolean reload;
+ @Option(names = { "--dev" }, description = "Enables dev mode (live reload
when source files are updated and saved)")
+ private boolean dev;
@Option(names = { "--trace" }, description = "Enables trace logging of the
routed messages")
private boolean trace;
@@ -267,7 +267,7 @@ class Run implements Callable<Integer> {
writeSetting(main, applicationProperties, "camel.main.name", name);
writeSetting(main, applicationProperties,
"camel.main.shutdownTimeout", "5");
- writeSetting(main, applicationProperties,
"camel.main.routesReloadEnabled", reload ? "true" : "false");
+ writeSetting(main, applicationProperties,
"camel.main.routesReloadEnabled", dev ? "true" : "false");
writeSetting(main, applicationProperties,
"camel.main.sourceLocationEnabled", "true");
writeSetting(main, applicationProperties, "camel.main.tracing", trace
? "true" : "false");
writeSetting(main, applicationProperties, "camel.main.modeline",
modeline ? "true" : "false");
@@ -345,7 +345,7 @@ class Run implements Callable<Integer> {
} else {
propertiesFiles = propertiesFiles + "," + file;
}
- if (reload && file.startsWith("file:")) {
+ if (dev && file.startsWith("file:")) {
// we can only reload if file based
sjReload.add(file.substring(5));
}
@@ -402,7 +402,7 @@ class Run implements Callable<Integer> {
}
js.add(file);
- if (reload && file.startsWith("file:")) {
+ if (dev && file.startsWith("file:")) {
// we can only reload if file based
sjReload.add(file.substring(5));
}
@@ -436,7 +436,7 @@ class Run implements Callable<Integer> {
}
// we can only reload if file based
- if (reload && sjReload.length() > 0) {
+ if (dev && sjReload.length() > 0) {
main.addInitialProperty("camel.main.routesReloadEnabled", "true");
main.addInitialProperty("camel.main.routesReloadDirectory", ".");
// skip file: as prefix