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 07fd3e7 CAMEL-17199: update documentation to align Camel JBang CLI
usage w/ Karavan (#6442)
07fd3e7 is described below
commit 07fd3e7f2261460ebc25401d907e990656b1180b
Author: Otavio Rodolfo Piske <[email protected]>
AuthorDate: Tue Nov 16 17:15:32 2021 +0100
CAMEL-17199: update documentation to align Camel JBang CLI usage w/ Karavan
(#6442)
---
.../modules/ROOT/pages/camel-jbang.adoc | 37 ++++++++++++----------
1 file changed, 20 insertions(+), 17 deletions(-)
diff --git a/docs/user-manual/modules/ROOT/pages/camel-jbang.adoc
b/docs/user-manual/modules/ROOT/pages/camel-jbang.adoc
index add02b4..b26f7ad 100644
--- a/docs/user-manual/modules/ROOT/pages/camel-jbang.adoc
+++ b/docs/user-manual/modules/ROOT/pages/camel-jbang.adoc
@@ -4,14 +4,7 @@ A JBang-based Camel app for searching for kamelets,
components, languages, runni
The `camel-jbang` is available from *Camel 3.12* and newer versions.
-== Installation
-
-JBang makes it easy for us by providing an installation feature that works
with Github. If you have JBang installed on your system, then you can run the
following command to install CamelJBang:
-
-[source,bash]
-----
-jbang app install CamelJBang@apache/camel
-----
+When running Camel JBang, it is possible to set the Camel version to use. For
instance, to run the commands with the version 3.13.0, define the
`camel.jbang.version` property in the command line.
== Using Camel JBang
@@ -19,9 +12,11 @@ The CamelJBang supports multiple commands. Running the
command below, will print
[source,bash]
----
-CamelJBang.java [command]
+jbang -Dcamel.jbang.version=3.13.0 CamelJBang@apache/camel [command]
----
+*Note*: the first time you run this command, it may cause dependencies to be
cached, therefore taking a few extra seconds to run.
+
All the commands support the `--help` and will display the appropriate help if
that flag is provided.
=== Search
@@ -30,21 +25,21 @@ You can use the CLI to search for kamelets, components,
languages and miscelaneo
[source,bash]
----
-CamelJBang.java search --help
+jbang -Dcamel.jbang.version=3.13.0 CamelJBang@apache/camel search --help
----
For example, to search for kamelets named `jms`, you can use:
[source,bash]
----
-CamelJBang.java search kamelets --search-term=jms
+jbang -Dcamel.jbang.version=3.13.0 CamelJBang@apache/camel search kamelets
--search-term=jms
----
To list all the kamelets, just run the command without any search term:
[source,bash]
----
-CamelJBang.java search kamelets
+jbang -Dcamel.jbang.version=3.13.0 CamelJBang@apache/camel search kamelets
----
@@ -76,7 +71,7 @@ To bootstrap the Kamelet run:
[source,bash]
----
-CamelJBang init kamelet --bootstrap
+jbang -Dcamel.jbang.version=3.13.0 CamelJBang@apache/camel init kamelet
--bootstrap
----
This will create a sub-directory called `work` in the current directory with a
properties file named `init-template.properties` inside it.
@@ -87,7 +82,7 @@ After you have filled the values, you can generate the
Kamelet using:
[source,bash]
----
-CamelJBang init kamelet --properties-path work/init-template.properties
+jbang -Dcamel.jbang.version=3.13.0 CamelJBang@apache/camel init kamelet
--properties-path work/init-template.properties
----
Running this command will create a new file in the `work` directory. The name
of the generated file is determined by the `kameletMetadataName` property in
the properties file. As such, parsing the default properties file would
generate a file named `my-sample-sink.kamelet.yaml` in the directory.
@@ -103,7 +98,7 @@ To execute this feature run:
[source,bash]
----
-CamelJBang init binding --destination /path/to/destination/directory/
--kamelet sftp-source
+jbang -Dcamel.jbang.version=3.13.0 CamelJBang@apache/camel init binding
--destination /path/to/destination/directory/ --kamelet sftp-source
----
This will create a new sample YAML binding file that can be modified and used
in Camel K.
@@ -112,7 +107,7 @@ You can also generate bindings that can be run by
CamelJBang or Camel Core, but
[source,bash]
----
-CamelJBang init binding --destination /path/to/destination/directory/
--kamelet sftp-source --project core
+jbang -Dcamel.jbang.version=3.13.0 CamelJBang@apache/camel init binding
--destination /path/to/destination/directory/ --kamelet sftp-source --project
core
----
@@ -143,9 +138,17 @@ Execute the following command to run this route:
[source,bash]
----
-CamelJBang run jms-amqp-10-sink-binding.yaml
+jbang -Dcamel.jbang.version=3.13.0 CamelJBang@apache/camel run
jms-amqp-10-sink-binding.yaml
----
NOTE: it is necessary to have a AMQP 1.0 broker, such as Apache Artemis,
running locally and listening on port 61616. Adjust the route accordingly if
using a different address for the broker.
+== Installation
+
+It is not necessary to install Camel JBang. However, if you prefer to do so,
JBang makes it easy for us by providing an installation feature that works with
Github. If you have JBang installed on your system, then you can run the
following command to install CamelJBang:
+
+[source,bash]
+----
+jbang app install CamelJBang@apache/camel
+----