You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by da...@apache.org on 2023/05/17 07:09:36 UTC

[camel] 02/02: CAMEL-19360: camel-jbang - Export a set of files

This is an automated email from the ASF dual-hosted git repository.

davsclaus pushed a commit to branch camel-3.x
in repository https://gitbox.apache.org/repos/asf/camel.git

commit 8be2f35ba7c8b95087ed7da822368493773d85f8
Author: Claus Ibsen <cl...@gmail.com>
AuthorDate: Wed May 17 09:04:30 2023 +0200

    CAMEL-19360: camel-jbang - Export a set of files
---
 .../modules/ROOT/pages/camel-jbang.adoc            | 23 ++++++++++++++++++++++
 1 file changed, 23 insertions(+)

diff --git a/docs/user-manual/modules/ROOT/pages/camel-jbang.adoc b/docs/user-manual/modules/ROOT/pages/camel-jbang.adoc
index 103ac73cb5e..45d217e982e 100644
--- a/docs/user-manual/modules/ROOT/pages/camel-jbang.adoc
+++ b/docs/user-manual/modules/ROOT/pages/camel-jbang.adoc
@@ -1793,6 +1793,29 @@ camel export --runtime=camel-main --gav=com.foo:acme:1.0-SNAPSHOT --directory=..
 
 TIP: See the possible options by running: `camel export --help` for more details.
 
+=== Exporting with selected files
+
+By default, Camel will export what was last run, or all files from the current directory.
+You can also explicit specify which files should be exported.
+
+For example, you may have 3 files in a folder:
+
+- Foo.java
+- bar.xml
+- cheese.yaml
+
+These are 3 Camel routes, and you want to export them into 2 different applications:
+
+[source,bash]
+----
+camel export Foo.java --runtime=quarkus --gav=com.foo:acme:1.0-SNAPSHOT --directory=../export1
+camel export bar.xml cheese.yaml --runtime=spring-boot --gav=com.foo:cheese:1.0-SNAPSHOT --directory=../export2
+----
+
+As you can see the first export command will only include `Foo.java`, and then 2nd export includes both `bar.xml` and `cheese.yaml`.
+
+NOTE: If you have `application.properties` in the folder as well, then this will be included in both exports.
+
 === Exporting as Gradle Project
 
 Camel JBang exports by default as a Maven based project. To use Gradle instead, you can