Skip to content

Commit 696d7c8

Browse files
gnodetclaude
andcommitted
CAMEL-21208: Expand TemplateHelper tests to cover all templates
Comprehensive test coverage for all 23 FreeMarker templates: - FreeMarker-processed templates (processTemplate): code-java, main, spring-boot-main, Dockerfile21/25, readme, readme.native, rest-dsl.yaml, run-custom-camel-version, main-pom (with deps, repos, jib/jkube), spring-boot-pom, quarkus-pom - Init templates (raw text loading): java, yaml, xml, kamelet source/sink/action, pipe, integration Tests verify: license header stripping, placeholder resolution, conditional rendering, list iteration, Maven ${} passthrough, Kamelet {{}} passthrough, and missing template error handling. Also regenerate jbang command docs after rebase. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 7cddc10 commit 696d7c8

File tree

48 files changed

+524
-87
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

48 files changed

+524
-87
lines changed

docs/user-manual/modules/ROOT/pages/camel-jbang.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4192,7 +4192,7 @@ The camel.jbang supports 45 options, which are listed below.
41924192
|===
41934193
| Name | Description | Default | Type
41944194
| *camel.jbang.camel-version* | The version of Apache Camel to use | | String
4195-
| *camel.jbang.camelSpringBoot{zwsp}Version* | To use a custom Camel version when running or export to Spring Boot | | String
4195+
| *camel.jbang.camelSpringBootVersion* | To use a custom Camel version when running or export to Spring Boot | | String
41964196
| *camel.jbang.classpathFiles* | Additional files to add to classpath (Use commas to separate multiple files). | | String
41974197
| *camel.jbang.compileWorkDir* | Work directory for compiler. Can be used to write compiled classes or other resources. | .camel-jbang/compile | String
41984198
| *camel.jbang.console* | Developer console at /q/dev on local HTTP server (port 8080 by default) | false | boolean

docs/user-manual/modules/ROOT/pages/jbang-commands/camel-jbang-bind.adoc

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,10 @@
22
// AUTO-GENERATED by camel-package-maven-plugin - DO NOT EDIT THIS FILE
33
= camel bind
44

5-
Bind source and sink Kamelets as a new Camel integration
5+
DEPRECATED: Bind source and sink Kamelets as a new Camel integration
6+
7+
8+
CAUTION: This command is deprecated.
69

710

811
== Usage
@@ -20,7 +23,7 @@ camel bind [options]
2023
|===
2124
| Option | Description | Default | Type
2225
| `--error-handler` | Add error handler (none|log|sink:<endpoint>). Sink endpoints are expected in the format [[apigroup/]version:]kind:[namespace/]name, plain Camel URIs or Kamelet name. | | String
23-
| `--output` | Output format generated by this command (supports: file, yaml or json). | file | String
26+
| `--output` | Output format generated by this command (supports: ). | file | String
2427
| `--property` | Adds a pipe property in the form of [source|sink|error-handler|step-<n>].<key>=<value> where <n> is the step number starting from 1 | | String
2528
| `--sink` | Sink (to) such as a Kamelet or Camel endpoint uri | | String
2629
| `--source` | Source (from) such as a Kamelet or Camel endpoint uri | | String

docs/user-manual/modules/ROOT/pages/jbang-commands/camel-jbang-cmd-receive.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ camel cmd receive [options]
2828
| `--logging-color` | Use colored logging | true | boolean
2929
| `--mask` | Whether to mask endpoint URIs to avoid printing sensitive information such as password or access keys | | boolean
3030
| `--only-body` | Show only message body in received messages | false | boolean
31-
| `--output` | Output format (text or json) | | String
31+
| `--output` | Output format () | | String
3232
| `--prefix` | Print prefix with running Camel integration name. auto=only prefix when running multiple integrations. true=always prefix. false=prefix off. | auto | String
3333
| `--pretty` | Pretty print message body when using JSon or XML format | | boolean
3434
| `--prop,--property` | Additional properties; override existing (only applicable when NOT using an existing running Camel) | | String

docs/user-manual/modules/ROOT/pages/jbang-commands/camel-jbang-commands.adoc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ TIP: You can also use `camel --help` or `camel <command> --help` to see availabl
1111
[cols="2,5",options="header"]
1212
|===
1313
| Command | Description
14-
| xref:jbang-commands/camel-jbang-bind.adoc[camel bind] | Bind source and sink Kamelets as a new Camel integration
14+
| xref:jbang-commands/camel-jbang-bind.adoc[camel bind] | DEPRECATED: Bind source and sink Kamelets as a new Camel integration
1515
| xref:jbang-commands/camel-jbang-catalog.adoc[camel catalog] | List artifacts from Camel Catalog
1616
| xref:jbang-commands/camel-jbang-cmd.adoc[camel cmd] | Performs commands in the running Camel integrations, such as start/stop route, or change logging levels.
1717
| xref:jbang-commands/camel-jbang-completion.adoc[camel completion] | Generate completion script for bash/zsh
@@ -43,4 +43,5 @@ TIP: You can also use `camel --help` or `camel <command> --help` to see availabl
4343
| xref:jbang-commands/camel-jbang-transform.adoc[camel transform] | Transform message or Camel routes
4444
| xref:jbang-commands/camel-jbang-update.adoc[camel update] | Update Camel project
4545
| xref:jbang-commands/camel-jbang-version.adoc[camel version] | Manage Camel versions
46+
| xref:jbang-commands/camel-jbang-wrapper.adoc[camel wrapper] | Install Camel wrapper scripts for version pinning
4647
|===

docs/user-manual/modules/ROOT/pages/jbang-commands/camel-jbang-debug.adoc

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ camel debug [options]
3636
| `--gav` | The Maven group:artifact:version (used during exporting) | | String
3737
| `--health` _(deprecated)_ | Deprecated: use --observe instead. Health check at /q/health on local HTTP server (port 8080 by default) | false | boolean
3838
| `--ignore-loading-error` | Whether to ignore route loading and compilation errors (use this with care!) | false | boolean
39+
| `--java-version` | Java version () | 21 | String
3940
| `--jfr` | Enables Java Flight Recorder saving recording to disk on exit | false | boolean
4041
| `--jfr-profile` | Java Flight Recorder profile to use (such as default or profile) | | String
4142
| `--jvm-debug` | To enable JVM remote debugging on port 4004 by default. The supported values are true to enable the remote debugging, false to disable the remote debugging or a number to use a custom port | | int
@@ -45,7 +46,7 @@ camel debug [options]
4546
| `--log-lines` | Number of log lines to display on top of screen | 10 | int
4647
| `--logging` | Can be used to turn off logging | true | boolean
4748
| `--logging-category` | Used for individual logging levels (ex: org.apache.kafka=DEBUG) | | List
48-
| `--logging-color` | Use colored logging | true | boolean
49+
| `--logging-color` | Use colored logging. Default is auto-detected based on NO_COLOR, CI, FORCE_COLOR environment variables and terminal capabilities | | boolean
4950
| `--logging-config-path` | Path to file with custom logging configuration | | String
5051
| `--logging-json` | Use JSON logging (ECS Layout) | false | boolean
5152
| `--logging-level` | Logging level () | info | String
@@ -67,7 +68,7 @@ camel debug [options]
6768
| `--package-scan-jars` | Whether to automatic package scan JARs for custom Spring or Quarkus beans making them available for Camel JBang | false | boolean
6869
| `--port` | Embeds a local HTTP server on this port (port 8080 by default; use 0 to dynamic assign a free random port number) | | int
6970
| `--pretty` | Pretty print message body when using JSon or XML format | | boolean
70-
| `--profile` | Profile to run (dev, test, or prod). | dev | String
71+
| `--profile` | Profile to run (). | dev | String
7172
| `--prompt` | Allow user to type in required parameters in prompt if not present in application | false | boolean
7273
| `--prop,--property` | Additional properties (override existing) | | String
7374
| `--properties` | comma separated list of properties file (ex. /path/to/file.properties,/path/to/other.properties | | String
@@ -83,7 +84,7 @@ camel debug [options]
8384
| `--show-exchange-properties` | Show exchange properties in debug messages | false | boolean
8485
| `--show-exchange-variables` | Show exchange variables in debug messages | true | boolean
8586
| `--show-headers` | Show message headers in debug messages | true | boolean
86-
| `--skip-plugins` | Skip plugins during export | false | boolean
87+
| `--skip-plugins` | Skip resolving plugin dependencies | false | boolean
8788
| `--source` | Prefer to display source filename/code instead of IDs | | boolean
8889
| `--source-dir` | Source directory for dynamically loading Camel file(s) to run. When using this, then files cannot be specified at the same time. | | String
8990
| `--spring-boot-version` | Spring Boot version | RuntimeType.SPRING_BOOT_VERSION | String

docs/user-manual/modules/ROOT/pages/jbang-commands/camel-jbang-dependency-copy.adoc

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,19 +26,20 @@ camel dependency copy [options]
2626
| `--dep,--dependency` | Add additional dependencies | | List
2727
| `--dir,--directory` | Directory where the project will be exported | . | String
2828
| `--download` | Whether to allow automatic downloading JAR dependencies (over the internet) | true | boolean
29+
| `--dry-run` | Preview export without writing files | false | boolean
2930
| `--exclude` | Exclude files by name or pattern | | List
3031
| `--fresh` | Make sure we use fresh (i.e. non-cached) resources | false | boolean
3132
| `--gav` | The Maven group:artifact:version | | String
3233
| `--groovy-pre-compiled` | Whether to include pre-compiled Groovy classes in the export (only supported with runtime=camel-main) | false | boolean
3334
| `--hawtio` | Whether to include Hawtio web console (only available for exporting to Spring Boot or Quarkus) | false | boolean
3435
| `--hawtio-version` | Version of the Hawtio web console | HawtioVersion.HAWTIO_VERSION | String
3536
| `--ignore-loading-error` | Whether to ignore route loading and compilation errors (use this with care!) | false | boolean
36-
| `--java-version` | Java version (21, 25) | 21 | String
37+
| `--java-version` | Java version () | 21 | String
3738
| `--kamelets-version` | Apache Camel Kamelets version | RuntimeType.KAMELETS_VERSION | String
3839
| `--lazy-bean` | Whether to use lazy bean initialization (can help with complex classloading issues | true | boolean
3940
| `--local-kamelet-dir` | Local directory for loading Kamelets (takes precedence) | | String
4041
| `--logging` | Can be used to turn on logging to console (logs by default to file in <user home>/.camel directory) | false | boolean
41-
| `--logging-level` | Logging level | info | String
42+
| `--logging-level` | Logging level () | info | String
4243
| `--main-classname` | The class name of the Camel Main application class | CamelApplication | String
4344
| `--management-port` | To use a dedicated port for HTTP management | | int
4445
| `--maven-apache-snapshot-enabled` | Whether downloading JARs from ASF Maven Snapshot repository is enabled | true | boolean
@@ -49,22 +50,24 @@ camel dependency copy [options]
4950
| `--name` | The integration name. Use this when the name should not get derived otherwise. | | String
5051
| `--observe` | Enable observability services | false | boolean
5152
| `--open-api` | Adds an OpenAPI spec from the given file (json or yaml file) | | String
52-
| `--output` | Output format (gav, maven, jbang) | gav | String
53+
| `--output` | Output format () | gav | String
5354
| `--output-directory` | Directory where dependencies should be copied | lib | String
5455
| `--package-name` | For Java source files should they have the given package name. By default the package name is computed from the Maven GAV. Use false to turn off and not include package name in the Java source files. | | String
5556
| `--package-scan-jars` | Whether to automatic package scan JARs for custom Spring or Quarkus beans making them available for Camel JBang | false | boolean
5657
| `--port` | Embeds a local HTTP server on this port | | int
57-
| `--profile` | Profile to export (dev, test, or prod). | | String
58+
| `--profile` | Profile to export (). | | String
5859
| `--prop,--property` | Camel application properties, ex. --property=prop1=foo | | String
5960
| `--quarkus-artifact-id` | Quarkus Platform Maven artifactId | quarkus-bom | String
6061
| `--quarkus-group-id` | Quarkus Platform Maven groupId | io.quarkus.platform | String
62+
| `--quarkus-package-type` | Quarkus package type (uber-jar or fast-jar) | uber-jar | String
6163
| `--quarkus-version` | Quarkus Platform version | RuntimeType.QUARKUS_VERSION | String
6264
| `--quiet` | Will be quiet, only print when error occurs | false | boolean
6365
| `--repo,--repos` | Additional maven repositories (Use commas to separate multiple repositories) | | String
6466
| `--runtime` | Runtime () | | RuntimeType
6567
| `--skip-plugins` | Skip plugins during export | false | boolean
6668
| `--spring-boot-version` | Spring Boot version | RuntimeType.SPRING_BOOT_VERSION | String
6769
| `--verbose` | Verbose output of startup activity (dependency resolution and downloading | false | boolean
70+
| `--yes,-y` | Automatically answer yes to confirmation prompts (e.g. when using --clean-dir) | false | boolean
6871
| `-h,--help` | Display the help and sub-commands | | boolean
6972
|===
7073

docs/user-manual/modules/ROOT/pages/jbang-commands/camel-jbang-dependency-list.adoc

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,19 +26,20 @@ camel dependency list [options]
2626
| `--dep,--dependency` | Add additional dependencies | | List
2727
| `--dir,--directory` | Directory where the project will be exported | . | String
2828
| `--download` | Whether to allow automatic downloading JAR dependencies (over the internet) | true | boolean
29+
| `--dry-run` | Preview export without writing files | false | boolean
2930
| `--exclude` | Exclude files by name or pattern | | List
3031
| `--fresh` | Make sure we use fresh (i.e. non-cached) resources | false | boolean
3132
| `--gav` | The Maven group:artifact:version | | String
3233
| `--groovy-pre-compiled` | Whether to include pre-compiled Groovy classes in the export (only supported with runtime=camel-main) | false | boolean
3334
| `--hawtio` | Whether to include Hawtio web console (only available for exporting to Spring Boot or Quarkus) | false | boolean
3435
| `--hawtio-version` | Version of the Hawtio web console | HawtioVersion.HAWTIO_VERSION | String
3536
| `--ignore-loading-error` | Whether to ignore route loading and compilation errors (use this with care!) | false | boolean
36-
| `--java-version` | Java version (21, 25) | 21 | String
37+
| `--java-version` | Java version () | 21 | String
3738
| `--kamelets-version` | Apache Camel Kamelets version | RuntimeType.KAMELETS_VERSION | String
3839
| `--lazy-bean` | Whether to use lazy bean initialization (can help with complex classloading issues | true | boolean
3940
| `--local-kamelet-dir` | Local directory for loading Kamelets (takes precedence) | | String
4041
| `--logging` | Can be used to turn on logging to console (logs by default to file in <user home>/.camel directory) | false | boolean
41-
| `--logging-level` | Logging level | info | String
42+
| `--logging-level` | Logging level () | info | String
4243
| `--main-classname` | The class name of the Camel Main application class | CamelApplication | String
4344
| `--management-port` | To use a dedicated port for HTTP management | | int
4445
| `--maven-apache-snapshot-enabled` | Whether downloading JARs from ASF Maven Snapshot repository is enabled | true | boolean
@@ -49,21 +50,23 @@ camel dependency list [options]
4950
| `--name` | The integration name. Use this when the name should not get derived otherwise. | | String
5051
| `--observe` | Enable observability services | false | boolean
5152
| `--open-api` | Adds an OpenAPI spec from the given file (json or yaml file) | | String
52-
| `--output` | Output format (gav, maven, jbang) | gav | String
53+
| `--output` | Output format () | gav | String
5354
| `--package-name` | For Java source files should they have the given package name. By default the package name is computed from the Maven GAV. Use false to turn off and not include package name in the Java source files. | | String
5455
| `--package-scan-jars` | Whether to automatic package scan JARs for custom Spring or Quarkus beans making them available for Camel JBang | false | boolean
5556
| `--port` | Embeds a local HTTP server on this port | | int
56-
| `--profile` | Profile to export (dev, test, or prod). | | String
57+
| `--profile` | Profile to export (). | | String
5758
| `--prop,--property` | Camel application properties, ex. --property=prop1=foo | | String
5859
| `--quarkus-artifact-id` | Quarkus Platform Maven artifactId | quarkus-bom | String
5960
| `--quarkus-group-id` | Quarkus Platform Maven groupId | io.quarkus.platform | String
61+
| `--quarkus-package-type` | Quarkus package type (uber-jar or fast-jar) | uber-jar | String
6062
| `--quarkus-version` | Quarkus Platform version | RuntimeType.QUARKUS_VERSION | String
6163
| `--quiet` | Will be quiet, only print when error occurs | false | boolean
6264
| `--repo,--repos` | Additional maven repositories (Use commas to separate multiple repositories) | | String
6365
| `--runtime` | Runtime () | | RuntimeType
6466
| `--skip-plugins` | Skip plugins during export | false | boolean
6567
| `--spring-boot-version` | Spring Boot version | RuntimeType.SPRING_BOOT_VERSION | String
6668
| `--verbose` | Verbose output of startup activity (dependency resolution and downloading | false | boolean
69+
| `--yes,-y` | Automatically answer yes to confirmation prompts (e.g. when using --clean-dir) | false | boolean
6770
| `-h,--help` | Display the help and sub-commands | | boolean
6871
|===
6972

docs/user-manual/modules/ROOT/pages/jbang-commands/camel-jbang-dependency-update.adoc

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,19 +27,20 @@ camel dependency update [options]
2727
| `--dep,--dependency` | Add additional dependencies | | List
2828
| `--dir,--directory` | Directory where the project will be exported | . | String
2929
| `--download` | Whether to allow automatic downloading JAR dependencies (over the internet) | true | boolean
30+
| `--dry-run` | Preview export without writing files | false | boolean
3031
| `--exclude` | Exclude files by name or pattern | | List
3132
| `--fresh` | Make sure we use fresh (i.e. non-cached) resources | false | boolean
3233
| `--gav` | The Maven group:artifact:version | | String
3334
| `--groovy-pre-compiled` | Whether to include pre-compiled Groovy classes in the export (only supported with runtime=camel-main) | false | boolean
3435
| `--hawtio` | Whether to include Hawtio web console (only available for exporting to Spring Boot or Quarkus) | false | boolean
3536
| `--hawtio-version` | Version of the Hawtio web console | HawtioVersion.HAWTIO_VERSION | String
3637
| `--ignore-loading-error` | Whether to ignore route loading and compilation errors (use this with care!) | false | boolean
37-
| `--java-version` | Java version (21, 25) | 21 | String
38+
| `--java-version` | Java version () | 21 | String
3839
| `--kamelets-version` | Apache Camel Kamelets version | RuntimeType.KAMELETS_VERSION | String
3940
| `--lazy-bean` | Whether to use lazy bean initialization (can help with complex classloading issues | true | boolean
4041
| `--local-kamelet-dir` | Local directory for loading Kamelets (takes precedence) | | String
4142
| `--logging` | Can be used to turn on logging to console (logs by default to file in <user home>/.camel directory) | false | boolean
42-
| `--logging-level` | Logging level | info | String
43+
| `--logging-level` | Logging level () | info | String
4344
| `--main-classname` | The class name of the Camel Main application class | CamelApplication | String
4445
| `--management-port` | To use a dedicated port for HTTP management | | int
4546
| `--maven-apache-snapshot-enabled` | Whether downloading JARs from ASF Maven Snapshot repository is enabled | true | boolean
@@ -50,21 +51,23 @@ camel dependency update [options]
5051
| `--name` | The integration name. Use this when the name should not get derived otherwise. | | String
5152
| `--observe` | Enable observability services | false | boolean
5253
| `--open-api` | Adds an OpenAPI spec from the given file (json or yaml file) | | String
53-
| `--output` | Output format (gav, maven, jbang) | gav | String
54+
| `--output` | Output format () | gav | String
5455
| `--package-name` | For Java source files should they have the given package name. By default the package name is computed from the Maven GAV. Use false to turn off and not include package name in the Java source files. | | String
5556
| `--package-scan-jars` | Whether to automatic package scan JARs for custom Spring or Quarkus beans making them available for Camel JBang | false | boolean
5657
| `--port` | Embeds a local HTTP server on this port | | int
57-
| `--profile` | Profile to export (dev, test, or prod). | | String
58+
| `--profile` | Profile to export (). | | String
5859
| `--prop,--property` | Camel application properties, ex. --property=prop1=foo | | String
5960
| `--quarkus-artifact-id` | Quarkus Platform Maven artifactId | quarkus-bom | String
6061
| `--quarkus-group-id` | Quarkus Platform Maven groupId | io.quarkus.platform | String
62+
| `--quarkus-package-type` | Quarkus package type (uber-jar or fast-jar) | uber-jar | String
6163
| `--quarkus-version` | Quarkus Platform version | RuntimeType.QUARKUS_VERSION | String
6264
| `--quiet` | Will be quiet, only print when error occurs | false | boolean
6365
| `--repo,--repos` | Additional maven repositories (Use commas to separate multiple repositories) | | String
6466
| `--runtime` | Runtime () | | RuntimeType
6567
| `--skip-plugins` | Skip plugins during export | false | boolean
6668
| `--spring-boot-version` | Spring Boot version | RuntimeType.SPRING_BOOT_VERSION | String
6769
| `--verbose` | Verbose output of startup activity (dependency resolution and downloading | false | boolean
70+
| `--yes,-y` | Automatically answer yes to confirmation prompts (e.g. when using --clean-dir) | false | boolean
6871
| `-h,--help` | Display the help and sub-commands | | boolean
6972
|===
7073

0 commit comments

Comments
 (0)