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 bcef40f7613 CAMEL-18117: camel-jbang - Add docs about profiles bcef40f7613 is described below commit bcef40f7613d2e41b778e9ad3e4285e7d4924818 Author: Claus Ibsen <claus.ib...@gmail.com> AuthorDate: Mon May 23 15:46:55 2022 +0200 CAMEL-18117: camel-jbang - Add docs about profiles --- .../modules/ROOT/pages/camel-jbang.adoc | 38 ++++++++++++++++++++++ 1 file changed, 38 insertions(+) diff --git a/docs/user-manual/modules/ROOT/pages/camel-jbang.adoc b/docs/user-manual/modules/ROOT/pages/camel-jbang.adoc index 44186a55ff1..7da4467875b 100644 --- a/docs/user-manual/modules/ROOT/pages/camel-jbang.adoc +++ b/docs/user-manual/modules/ROOT/pages/camel-jbang.adoc @@ -117,6 +117,44 @@ Then while the Camel application is running, you can update the YAML route and u NOTE: The live reload is meant for development purposes, and if you encounter problems with reloading such as JVM class loading issues, then you may need to restart the application. +=== Using profiles + +Camel JBang have the concept of profiles. A _profile_ is essentially a name (id) that refers +to which configuration to automatic load with Camel JBang. The default profile is named `application` +which is a (smart default) to let Camel JBang automatic load `application.properties` (if present). + +This means that creating profiles matching to a properties file with the same name. + +For example having a profile named `local`, means that Camel JBang will load `local.properties` instead +of `application.properties`. + +To use a profile, you specify as command line option `--profile` such as: + +[source,bash] +---- +camel run hello.java --profile=local +---- + +You can only specify one profile name, i.e. `--profile=local,two` is not valid. + +In the `properties` files you can configure all +the configurations from xref:components:others:main.adoc[Camel Main]. + +For example to turn off xref:stream-caching.adoc[Stream Caching] and enable log masking you can specify: + +[source,properties] +---- +camel.main.streamCaching=false +camel.main.logMask=true +---- + +And you can also configure Camel components such as camel-kafka to declare the URL to the brokers: + +[source,properties] +---- +camel.component.kafka.brokers=broker1:9092,broker2:9092,broker3:9092 +---- + === Running routes hosted on GitHub You can run a route that is hosted on GitHub using Camels xref:components:others:resourceresolver-github.adoc[github] resource loader.