davsclaus commented on code in PR #9489: URL: https://github.com/apache/camel/pull/9489#discussion_r1129904118
########## docs/user-manual/modules/ROOT/pages/camel-jbang.adoc: ########## @@ -1807,6 +1807,79 @@ The follow options related to _exporting_, can be configured in `application.pro NOTE: These are options from the export command, so you can see mor details and default values using `camel export --help`. +== Configuration + +Camel JBang can be used to store and use user configuration so that cli options won't have to be specified each time, for example, in order to run a different camel version, instead of executing + +[source,bash] +---- +camel run * --camel-version=3.18.4 +---- + +the option camel-version can be added to the user configuration like + +[source,bash] +---- +camel config set camel-version=3.18.4 +---- + +and then, the run command will pick the user configuration + +[source,bash] +---- +camel run * +---- + +The user configuration file will be stored in ~/.camel-jbang-user.properties + +=== Set and unset configuration + +Every Camel JBang option can be added to the user configuration, for example to export a simple project + +[source,bash] +---- +camel init foo.yaml +camel config set gav=com.foo:acme:1.0-SNAPSHOT +camel config set runtime=spring-boot +camel config set deps=org.apache.camel.springboot:camel-timer-starter +camel config set camel-spring-boot-version=3.20.1 + +camel export +---- + +User configurations values can be unset via: + +[source,bash] +---- +camel config unset camel-spring-boot-version=3.20.1 Review Comment: For unset I assume you only need to specify the key ########## docs/user-manual/modules/ROOT/pages/camel-jbang.adoc: ########## @@ -1807,6 +1807,79 @@ The follow options related to _exporting_, can be configured in `application.pro NOTE: These are options from the export command, so you can see mor details and default values using `camel export --help`. +== Configuration + +Camel JBang can be used to store and use user configuration so that cli options won't have to be specified each time, for example, in order to run a different camel version, instead of executing + +[source,bash] +---- +camel run * --camel-version=3.18.4 +---- + +the option camel-version can be added to the user configuration like + +[source,bash] +---- +camel config set camel-version=3.18.4 +---- + +and then, the run command will pick the user configuration + +[source,bash] +---- +camel run * +---- + +The user configuration file will be stored in ~/.camel-jbang-user.properties + +=== Set and unset configuration + +Every Camel JBang option can be added to the user configuration, for example to export a simple project + +[source,bash] +---- +camel init foo.yaml +camel config set gav=com.foo:acme:1.0-SNAPSHOT +camel config set runtime=spring-boot +camel config set deps=org.apache.camel.springboot:camel-timer-starter +camel config set camel-spring-boot-version=3.20.1 + +camel export +---- + +User configurations values can be unset via: + +[source,bash] +---- +camel config unset camel-spring-boot-version=3.20.1 +---- + +=== List and get configurations + +User configurations keys can be listed with: + +[source,bash] +---- +camel config list +---- + +Given the configuration in the previous paragraph the ouptut will be: + +[source,bash] +---- +gav Review Comment: I would like to see the values as well, eg gav = com.foo runtime = spring-boot ... -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
