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 9e5bea30650b CAMEL-23871: camel-jbang - Add --docker option to export
to exclude Docker file generation (#24383)
9e5bea30650b is described below
commit 9e5bea30650b4f8dd3642f4f09f0ee7fb89c268e
Author: Claus Ibsen <[email protected]>
AuthorDate: Thu Jul 2 16:00:05 2026 +0200
CAMEL-23871: camel-jbang - Add --docker option to export to exclude Docker
file generation (#24383)
Signed-off-by: Claus Ibsen <[email protected]>
Co-authored-by: Claude <[email protected]>
---
.../pages/jbang-commands/camel-jbang-dependency-copy.adoc | 1 +
.../pages/jbang-commands/camel-jbang-dependency-list.adoc | 1 +
.../jbang-commands/camel-jbang-dependency-update.adoc | 1 +
.../ROOT/pages/jbang-commands/camel-jbang-export.adoc | 1 +
.../ROOT/pages/jbang-commands/camel-jbang-sbom.adoc | 1 +
.../resources/META-INF/camel-jbang-commands-metadata.json | 6 +++---
.../org/apache/camel/dsl/jbang/core/commands/Export.java | 1 +
.../camel/dsl/jbang/core/commands/ExportBaseCommand.java | 4 ++++
.../camel/dsl/jbang/core/commands/ExportCamelMain.java | 4 +++-
.../camel/dsl/jbang/core/commands/ExportQuarkus.java | 4 +++-
.../camel/dsl/jbang/core/commands/ExportSpringBoot.java | 4 +++-
.../apache/camel/dsl/jbang/core/commands/ExportTest.java | 14 ++++++++++++++
12 files changed, 36 insertions(+), 6 deletions(-)
diff --git
a/docs/user-manual/modules/ROOT/pages/jbang-commands/camel-jbang-dependency-copy.adoc
b/docs/user-manual/modules/ROOT/pages/jbang-commands/camel-jbang-dependency-copy.adoc
index a239db5174d3..655fa496ce3e 100644
---
a/docs/user-manual/modules/ROOT/pages/jbang-commands/camel-jbang-dependency-copy.adoc
+++
b/docs/user-manual/modules/ROOT/pages/jbang-commands/camel-jbang-dependency-copy.adoc
@@ -25,6 +25,7 @@ camel dependency copy [options]
| `--clean-dir` | If exporting to current directory (default) then all
existing files are preserved. Enabling this option will force cleaning current
directory including all sub dirs (use this with care) | false | boolean
| `--dep,--dependency` | Add additional dependencies | | List
| `--dir,--directory` | Directory where the project will be exported | . |
String
+| `--docker` | Include Docker files in exported project | true | boolean
| `--download` | Whether to allow automatic downloading JAR dependencies (over
the internet) | true | boolean
| `--dry-run` | Preview export without writing files | false | boolean
| `--exclude` | Exclude files by name or pattern | | List
diff --git
a/docs/user-manual/modules/ROOT/pages/jbang-commands/camel-jbang-dependency-list.adoc
b/docs/user-manual/modules/ROOT/pages/jbang-commands/camel-jbang-dependency-list.adoc
index ffaa743eee4b..496d702ec96e 100644
---
a/docs/user-manual/modules/ROOT/pages/jbang-commands/camel-jbang-dependency-list.adoc
+++
b/docs/user-manual/modules/ROOT/pages/jbang-commands/camel-jbang-dependency-list.adoc
@@ -25,6 +25,7 @@ camel dependency list [options]
| `--clean-dir` | If exporting to current directory (default) then all
existing files are preserved. Enabling this option will force cleaning current
directory including all sub dirs (use this with care) | false | boolean
| `--dep,--dependency` | Add additional dependencies | | List
| `--dir,--directory` | Directory where the project will be exported | . |
String
+| `--docker` | Include Docker files in exported project | true | boolean
| `--download` | Whether to allow automatic downloading JAR dependencies (over
the internet) | true | boolean
| `--dry-run` | Preview export without writing files | false | boolean
| `--exclude` | Exclude files by name or pattern | | List
diff --git
a/docs/user-manual/modules/ROOT/pages/jbang-commands/camel-jbang-dependency-update.adoc
b/docs/user-manual/modules/ROOT/pages/jbang-commands/camel-jbang-dependency-update.adoc
index b62d6d22ba8a..a5b022885b9e 100644
---
a/docs/user-manual/modules/ROOT/pages/jbang-commands/camel-jbang-dependency-update.adoc
+++
b/docs/user-manual/modules/ROOT/pages/jbang-commands/camel-jbang-dependency-update.adoc
@@ -26,6 +26,7 @@ camel dependency update [options]
| `--clean-dir` | If exporting to current directory (default) then all
existing files are preserved. Enabling this option will force cleaning current
directory including all sub dirs (use this with care) | false | boolean
| `--dep,--dependency` | Add additional dependencies | | List
| `--dir,--directory` | Directory where the project will be exported | . |
String
+| `--docker` | Include Docker files in exported project | true | boolean
| `--download` | Whether to allow automatic downloading JAR dependencies (over
the internet) | true | boolean
| `--dry-run` | Preview export without writing files | false | boolean
| `--exclude` | Exclude files by name or pattern | | List
diff --git
a/docs/user-manual/modules/ROOT/pages/jbang-commands/camel-jbang-export.adoc
b/docs/user-manual/modules/ROOT/pages/jbang-commands/camel-jbang-export.adoc
index b20aaf49e3b4..e1551ba4d721 100644
--- a/docs/user-manual/modules/ROOT/pages/jbang-commands/camel-jbang-export.adoc
+++ b/docs/user-manual/modules/ROOT/pages/jbang-commands/camel-jbang-export.adoc
@@ -25,6 +25,7 @@ camel export [options]
| `--clean-dir` | If exporting to current directory (default) then all
existing files are preserved. Enabling this option will force cleaning current
directory including all sub dirs (use this with care) | false | boolean
| `--dep,--dependency` | Add additional dependencies | | List
| `--dir,--directory` | Directory where the project will be exported | . |
String
+| `--docker` | Include Docker files in exported project | true | boolean
| `--download` | Whether to allow automatic downloading JAR dependencies (over
the internet) | true | boolean
| `--dry-run` | Preview export without writing files | false | boolean
| `--exclude` | Exclude files by name or pattern | | List
diff --git
a/docs/user-manual/modules/ROOT/pages/jbang-commands/camel-jbang-sbom.adoc
b/docs/user-manual/modules/ROOT/pages/jbang-commands/camel-jbang-sbom.adoc
index 5c11230239c7..45f5d60a14ec 100644
--- a/docs/user-manual/modules/ROOT/pages/jbang-commands/camel-jbang-sbom.adoc
+++ b/docs/user-manual/modules/ROOT/pages/jbang-commands/camel-jbang-sbom.adoc
@@ -26,6 +26,7 @@ camel sbom [options]
| `--cyclonedx-plugin-version` | The CycloneDX Maven Plugin version | 2.9.1 |
String
| `--dep,--dependency` | Add additional dependencies | | List
| `--dir,--directory` | Directory where the project will be exported | . |
String
+| `--docker` | Include Docker files in exported project | true | boolean
| `--download` | Whether to allow automatic downloading JAR dependencies (over
the internet) | true | boolean
| `--dry-run` | Preview export without writing files | false | boolean
| `--exclude` | Exclude files by name or pattern | | List
diff --git
a/dsl/camel-jbang/camel-jbang-core/src/generated/resources/META-INF/camel-jbang-commands-metadata.json
b/dsl/camel-jbang/camel-jbang-core/src/generated/resources/META-INF/camel-jbang-commands-metadata.json
index 210008aa02cb..48228ac50fbe 100644
---
a/dsl/camel-jbang/camel-jbang-core/src/generated/resources/META-INF/camel-jbang-commands-metadata.json
+++
b/dsl/camel-jbang/camel-jbang-core/src/generated/resources/META-INF/camel-jbang-commands-metadata.json
@@ -7,14 +7,14 @@
{ "name": "completion", "fullName": "completion", "description": "Generate
completion script for bash\/zsh", "sourceClass":
"org.apache.camel.dsl.jbang.core.commands.Complete", "options": [ { "names":
"-h,--help", "description": "Display the help and sub-commands", "javaType":
"boolean", "type": "boolean" } ] },
{ "name": "config", "fullName": "config", "description": "Get and set user
configuration values", "sourceClass":
"org.apache.camel.dsl.jbang.core.commands.config.ConfigCommand", "options": [ {
"names": "-h,--help", "description": "Display the help and sub-commands",
"javaType": "boolean", "type": "boolean" } ], "subcommands": [ { "name": "get",
"fullName": "config get", "description": "Display user configuration value",
"sourceClass": "org.apache.camel.dsl.jbang.core.commands.config. [...]
{ "name": "debug", "fullName": "debug", "description": "Debug local Camel
integration", "sourceClass": "org.apache.camel.dsl.jbang.core.commands.Debug",
"options": [ { "names": "--ago", "description": "Use ago instead of yyyy-MM-dd
HH:mm:ss in timestamp.", "javaType": "boolean", "type": "boolean" }, { "names":
"--background", "description": "Run in the background", "defaultValue":
"false", "javaType": "boolean", "type": "boolean" }, { "names":
"--background-wait", "description": "To [...]
- { "name": "dependency", "fullName": "dependency", "description": "Displays
all Camel dependencies required to run", "sourceClass":
"org.apache.camel.dsl.jbang.core.commands.DependencyCommand", "options": [ {
"names": "-h,--help", "description": "Display the help and sub-commands",
"javaType": "boolean", "type": "boolean" } ], "subcommands": [ { "name":
"copy", "fullName": "dependency copy", "description": "Copies all Camel
dependencies required to run to a specific directory", "sourc [...]
+ { "name": "dependency", "fullName": "dependency", "description": "Displays
all Camel dependencies required to run", "sourceClass":
"org.apache.camel.dsl.jbang.core.commands.DependencyCommand", "options": [ {
"names": "-h,--help", "description": "Display the help and sub-commands",
"javaType": "boolean", "type": "boolean" } ], "subcommands": [ { "name":
"copy", "fullName": "dependency copy", "description": "Copies all Camel
dependencies required to run to a specific directory", "sourc [...]
{ "name": "dev", "fullName": "dev", "description": "Run in dev mode with
live reload", "sourceClass": "org.apache.camel.dsl.jbang.core.commands.Dev",
"options": [ { "names": "--background", "description": "Run in the background",
"defaultValue": "false", "javaType": "boolean", "type": "boolean" }, { "names":
"--background-wait", "description": "To wait for run in background to startup
successfully, before returning", "defaultValue": "true", "javaType": "boolean",
"type": "boolean" }, [...]
{ "name": "dirty", "fullName": "dirty", "description": "Check if there are
dirty files from previous Camel runs that did not terminate gracefully",
"sourceClass": "org.apache.camel.dsl.jbang.core.commands.process.Dirty",
"options": [ { "names": "--clean", "description": "Clean dirty files which are
no longer in use", "defaultValue": "false", "javaType": "boolean", "type":
"boolean" }, { "names": "-h,--help", "description": "Display the help and
sub-commands", "javaType": "boolean", " [...]
{ "name": "doc", "fullName": "doc", "description": "Shows documentation
for kamelet, component, and other Camel resources", "sourceClass":
"org.apache.camel.dsl.jbang.core.commands.catalog.CatalogDoc", "options": [ {
"names": "--camel-version", "description": "To use a different Camel version
than the default version", "javaType": "java.lang.String", "type": "string" },
{ "names": "--download", "description": "Whether to allow automatic downloading
JAR dependencies (over the internet [...]
{ "name": "doctor", "fullName": "doctor", "description": "Checks the
environment and reports potential issues", "sourceClass":
"org.apache.camel.dsl.jbang.core.commands.Doctor", "options": [ { "names":
"-h,--help", "description": "Display the help and sub-commands", "javaType":
"boolean", "type": "boolean" } ] },
{ "name": "eval", "fullName": "eval", "description": "Evaluate Camel
expressions and scripts", "sourceClass":
"org.apache.camel.dsl.jbang.core.commands.EvalCommand", "options": [ { "names":
"-h,--help", "description": "Display the help and sub-commands", "javaType":
"boolean", "type": "boolean" } ], "subcommands": [ { "name": "expression",
"fullName": "eval expression", "description": "Evaluates Camel expression",
"sourceClass": "org.apache.camel.dsl.jbang.core.commands.action.EvalEx [...]
{ "name": "explain", "fullName": "explain", "description": "Explain what a
Camel route does using AI\/LLM", "sourceClass":
"org.apache.camel.dsl.jbang.core.commands.Explain", "options": [ { "names":
"--api-key", "description": "API key for authentication. Also reads
ANTHROPIC_API_KEY, OPENAI_API_KEY, or LLM_API_KEY env vars", "javaType":
"java.lang.String", "type": "string" }, { "names": "--api-type", "description":
"API type: 'ollama', 'openai' (OpenAI-compatible), or 'anthropic' (A [...]
- { "name": "export", "fullName": "export", "description": "Export to other
runtimes (Camel Main, Spring Boot, or Quarkus)", "sourceClass":
"org.apache.camel.dsl.jbang.core.commands.Export", "options": [ { "names":
"--build-property", "description": "Maven build properties, ex.
--build-property=prop1=foo", "javaType": "java.util.List", "type": "array" }, {
"names": "--camel-spring-boot-version", "description": "Camel version to use
with Spring Boot", "javaType": "java.lang.String", "ty [...]
+ { "name": "export", "fullName": "export", "description": "Export to other
runtimes (Camel Main, Spring Boot, or Quarkus)", "sourceClass":
"org.apache.camel.dsl.jbang.core.commands.Export", "options": [ { "names":
"--build-property", "description": "Maven build properties, ex.
--build-property=prop1=foo", "javaType": "java.util.List", "type": "array" }, {
"names": "--camel-spring-boot-version", "description": "Camel version to use
with Spring Boot", "javaType": "java.lang.String", "ty [...]
{ "name": "get", "fullName": "get", "description": "Get status of Camel
integrations", "sourceClass":
"org.apache.camel.dsl.jbang.core.commands.process.CamelStatus", "options": [ {
"names": "--watch", "description": "Execute periodically and showing output
fullscreen", "javaType": "boolean", "type": "boolean" }, { "names":
"-h,--help", "description": "Display the help and sub-commands", "javaType":
"boolean", "type": "boolean" } ], "subcommands": [ { "name": "bean",
"fullName": "get [...]
{ "name": "harden", "fullName": "harden", "description": "Suggest security
hardening for Camel routes using AI\/LLM", "sourceClass":
"org.apache.camel.dsl.jbang.core.commands.Harden", "options": [ { "names":
"--api-key", "description": "API key for authentication. Also reads
OPENAI_API_KEY or LLM_API_KEY env vars", "javaType": "java.lang.String",
"type": "string" }, { "names": "--api-type", "description": "API type: 'ollama'
or 'openai' (OpenAI-compatible)", "defaultValue": "ollama", [...]
{ "name": "hawtio", "fullName": "hawtio", "description": "Launch Hawtio
web console", "sourceClass":
"org.apache.camel.dsl.jbang.core.commands.process.Hawtio", "options": [ {
"names": "--host", "description": "Hostname to bind the Hawtio web console to",
"defaultValue": "127.0.0.1", "javaType": "java.lang.String", "type": "string"
}, { "names": "--openUrl", "description": "To automatic open Hawtio web console
in the web browser", "defaultValue": "true", "javaType": "boolean", "type":
[...]
@@ -27,7 +27,7 @@
{ "name": "ps", "fullName": "ps", "description": "List running Camel
integrations", "sourceClass":
"org.apache.camel.dsl.jbang.core.commands.process.ListProcess", "options": [ {
"names": "--json", "description": "Output in JSON Format", "javaType":
"boolean", "type": "boolean" }, { "names": "--pid", "description": "List only
pid in the output", "javaType": "boolean", "type": "boolean" }, { "names":
"--remote", "description": "Break down counters into remote\/total pairs",
"javaType": [...]
{ "name": "restart", "fullName": "restart", "description": "Restarts
running Camel integrations (stop + re-launch)", "sourceClass":
"org.apache.camel.dsl.jbang.core.commands.process.RestartProcess", "options": [
{ "names": "-h,--help", "description": "Display the help and sub-commands",
"javaType": "boolean", "type": "boolean" } ] },
{ "name": "run", "fullName": "run", "description": "Run as local Camel
integration", "sourceClass": "org.apache.camel.dsl.jbang.core.commands.Run",
"options": [ { "names": "--background", "description": "Run in the background",
"defaultValue": "false", "javaType": "boolean", "type": "boolean" }, { "names":
"--background-wait", "description": "To wait for run in background to startup
successfully, before returning", "defaultValue": "true", "javaType": "boolean",
"type": "boolean" }, { [...]
- { "name": "sbom", "fullName": "sbom", "description": "Generate a CycloneDX
or SPDX SBOM for a specific project", "sourceClass":
"org.apache.camel.dsl.jbang.core.commands.SBOMGenerator", "options": [ {
"names": "--build-property", "description": "Maven build properties, ex.
--build-property=prop1=foo", "javaType": "java.util.List", "type": "array" }, {
"names": "--camel-spring-boot-version", "description": "Camel version to use
with Spring Boot", "javaType": "java.lang.String", "type" [...]
+ { "name": "sbom", "fullName": "sbom", "description": "Generate a CycloneDX
or SPDX SBOM for a specific project", "sourceClass":
"org.apache.camel.dsl.jbang.core.commands.SBOMGenerator", "options": [ {
"names": "--build-property", "description": "Maven build properties, ex.
--build-property=prop1=foo", "javaType": "java.util.List", "type": "array" }, {
"names": "--camel-spring-boot-version", "description": "Camel version to use
with Spring Boot", "javaType": "java.lang.String", "type" [...]
{ "name": "script", "fullName": "script", "description": "Run Camel
integration as shell script for terminal scripting", "sourceClass":
"org.apache.camel.dsl.jbang.core.commands.Script", "options": [ { "names":
"--logging", "description": "Can be used to turn on logging (logs to file in
<user home>\/.camel directory)", "defaultValue": "false", "javaType":
"boolean", "type": "boolean" }, { "names": "--logging-level", "description":
"Logging level (ERROR, WARN, INFO, DEBUG, TRACE)", "d [...]
{ "name": "shell", "fullName": "shell", "description": "Interactive Camel
CLI shell.", "sourceClass": "org.apache.camel.dsl.jbang.core.commands.Shell",
"options": [ { "names": "-h,--help", "description": "Display the help and
sub-commands", "javaType": "boolean", "type": "boolean" } ] },
{ "name": "stop", "fullName": "stop", "description": "Shuts down running
Camel integrations", "sourceClass":
"org.apache.camel.dsl.jbang.core.commands.process.StopProcess", "options": [ {
"names": "--kill", "description": "To force killing the process (SIGKILL)",
"javaType": "boolean", "type": "boolean" }, { "names": "-h,--help",
"description": "Display the help and sub-commands", "javaType": "boolean",
"type": "boolean" } ] },
diff --git
a/dsl/camel-jbang/camel-jbang-core/src/main/java/org/apache/camel/dsl/jbang/core/commands/Export.java
b/dsl/camel-jbang/camel-jbang-core/src/main/java/org/apache/camel/dsl/jbang/core/commands/Export.java
index 4eeeeff0efb7..25532983bbb1 100644
---
a/dsl/camel-jbang/camel-jbang-core/src/main/java/org/apache/camel/dsl/jbang/core/commands/Export.java
+++
b/dsl/camel-jbang/camel-jbang-core/src/main/java/org/apache/camel/dsl/jbang/core/commands/Export.java
@@ -256,6 +256,7 @@ public class Export extends ExportBaseCommand {
cmd.quarkusPackageType = this.quarkusPackageType;
cmd.springBootVersion = this.springBootVersion;
cmd.mavenWrapper = this.mavenWrapper;
+ cmd.docker = this.docker;
cmd.quiet = this.quiet;
cmd.buildProperties = this.buildProperties;
cmd.openapi = this.openapi;
diff --git
a/dsl/camel-jbang/camel-jbang-core/src/main/java/org/apache/camel/dsl/jbang/core/commands/ExportBaseCommand.java
b/dsl/camel-jbang/camel-jbang-core/src/main/java/org/apache/camel/dsl/jbang/core/commands/ExportBaseCommand.java
index 4465ccc09146..ecec1bdadf2a 100644
---
a/dsl/camel-jbang/camel-jbang-core/src/main/java/org/apache/camel/dsl/jbang/core/commands/ExportBaseCommand.java
+++
b/dsl/camel-jbang/camel-jbang-core/src/main/java/org/apache/camel/dsl/jbang/core/commands/ExportBaseCommand.java
@@ -204,6 +204,10 @@ public abstract class ExportBaseCommand extends
CamelCommand {
description = "Include Maven Wrapper files in exported
project")
protected boolean mavenWrapper = true;
+ @CommandLine.Option(names = { "--docker" }, defaultValue = "true",
+ description = "Include Docker files in exported
project")
+ protected boolean docker = true;
+
@CommandLine.Option(names = { "--open-api" }, description = "Adds an
OpenAPI spec from the given file (json or yaml file)")
protected String openapi;
diff --git
a/dsl/camel-jbang/camel-jbang-core/src/main/java/org/apache/camel/dsl/jbang/core/commands/ExportCamelMain.java
b/dsl/camel-jbang/camel-jbang-core/src/main/java/org/apache/camel/dsl/jbang/core/commands/ExportCamelMain.java
index b6f479b1653f..a5e1265aa2d9 100644
---
a/dsl/camel-jbang/camel-jbang-core/src/main/java/org/apache/camel/dsl/jbang/core/commands/ExportCamelMain.java
+++
b/dsl/camel-jbang/camel-jbang-core/src/main/java/org/apache/camel/dsl/jbang/core/commands/ExportCamelMain.java
@@ -161,7 +161,9 @@ class ExportCamelMain extends Export {
if (mavenWrapper) {
copyMavenWrapper();
}
- copyDockerFiles(BUILD_DIR);
+ if (docker) {
+ copyDockerFiles(BUILD_DIR);
+ }
String appJar = Paths.get("target", ids[1] + "-" + ids[2] +
".jar").toString();
copyReadme(BUILD_DIR, appJar);
if (cleanExportDir || !exportDir.equals(".")) {
diff --git
a/dsl/camel-jbang/camel-jbang-core/src/main/java/org/apache/camel/dsl/jbang/core/commands/ExportQuarkus.java
b/dsl/camel-jbang/camel-jbang-core/src/main/java/org/apache/camel/dsl/jbang/core/commands/ExportQuarkus.java
index 406b351366c5..d7f18af8efe3 100644
---
a/dsl/camel-jbang/camel-jbang-core/src/main/java/org/apache/camel/dsl/jbang/core/commands/ExportQuarkus.java
+++
b/dsl/camel-jbang/camel-jbang-core/src/main/java/org/apache/camel/dsl/jbang/core/commands/ExportQuarkus.java
@@ -145,7 +145,9 @@ class ExportQuarkus extends Export {
return prop;
});
// copy docker files
- copyDockerFiles(BUILD_DIR);
+ if (docker) {
+ copyDockerFiles(BUILD_DIR);
+ }
String appJar;
if ("fast-jar".equals(quarkusPackageType)) {
appJar = "target" + File.separator + "quarkus-app" +
File.separator + "quarkus-run.jar";
diff --git
a/dsl/camel-jbang/camel-jbang-core/src/main/java/org/apache/camel/dsl/jbang/core/commands/ExportSpringBoot.java
b/dsl/camel-jbang/camel-jbang-core/src/main/java/org/apache/camel/dsl/jbang/core/commands/ExportSpringBoot.java
index 4f3433d31a83..dd5919f5b1a3 100644
---
a/dsl/camel-jbang/camel-jbang-core/src/main/java/org/apache/camel/dsl/jbang/core/commands/ExportSpringBoot.java
+++
b/dsl/camel-jbang/camel-jbang-core/src/main/java/org/apache/camel/dsl/jbang/core/commands/ExportSpringBoot.java
@@ -156,7 +156,9 @@ class ExportSpringBoot extends Export {
if (mavenWrapper) {
copyMavenWrapper();
}
- copyDockerFiles(BUILD_DIR);
+ if (docker) {
+ copyDockerFiles(BUILD_DIR);
+ }
String appJar = "target" + File.separator + ids[1] + "-" + ids[2] +
".jar";
copyReadme(BUILD_DIR, appJar);
if (cleanExportDir || !exportDir.equals(".")) {
diff --git
a/dsl/camel-jbang/camel-jbang-core/src/test/java/org/apache/camel/dsl/jbang/core/commands/ExportTest.java
b/dsl/camel-jbang/camel-jbang-core/src/test/java/org/apache/camel/dsl/jbang/core/commands/ExportTest.java
index 8ea1f21fe19a..0edbb342b068 100644
---
a/dsl/camel-jbang/camel-jbang-core/src/test/java/org/apache/camel/dsl/jbang/core/commands/ExportTest.java
+++
b/dsl/camel-jbang/camel-jbang-core/src/test/java/org/apache/camel/dsl/jbang/core/commands/ExportTest.java
@@ -464,6 +464,20 @@ class ExportTest {
Assertions.assertTrue(new File(workingDir, "AGENTS.md").exists(),
"Missing AGENTS.md");
}
+ @ParameterizedTest
+ @MethodSource("runtimeProvider")
+ public void shouldSkipDockerFiles(RuntimeType rt) throws Exception {
+ LOG.info("shouldSkipDockerFiles {}", rt);
+ Export command = createCommand(rt, new String[] {
"src/test/resources/route.yaml" },
+ "--gav=examples:route:1.0.0", "--dir=" + workingDir,
"--quiet", "--docker=false");
+ int exit = command.doCall();
+
+ Assertions.assertEquals(0, exit);
+ Assertions.assertFalse(new File(workingDir + "/src/main/docker",
"Dockerfile").exists(),
+ "Dockerfile should not exist when --docker=false");
+ Assertions.assertTrue(new File(workingDir, "readme.md").exists(),
"Missing readme.md");
+ }
+
// Each runtime may have a different logic
public void assertApplicationPropertiesContent(RuntimeType rt, File
appProps) throws Exception {
try (FileInputStream fis = new FileInputStream(appProps)) {