Skip to content

Commit 1d9c15a

Browse files
gnodetclaude
andcommitted
CAMEL-22544: Address review feedback
- Merge DependencyUpdateJBangTest into DependencyUpdateTest (single test class) - Use fixture files from src/test/resources for scan-routes Maven tests instead of calling Init+Export at runtime - Add input validation preventing mixed pom.xml and Java targets - Guard addMavenDeps against targetLineNumber == -1 - Clean up blank lines left by removeMavenDeps - Clarify isCamelDependency javadoc on group prefix matching - Fix PrepareCamelJBangCommandsMojo regex to match 'this' (not just 'main') as constructor arg, fixing stale metadata generation - Regenerate all jbang command metadata and docs Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 5c041c1 commit 1d9c15a

File tree

56 files changed

+653
-380
lines changed

Some content is hidden

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

56 files changed

+653
-380
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: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ camel debug [options]
4545
| `--log-lines` | Number of log lines to display on top of screen | 10 | int
4646
| `--logging` | Can be used to turn off logging | true | boolean
4747
| `--logging-category` | Used for individual logging levels (ex: org.apache.kafka=DEBUG) | | List
48-
| `--logging-color` | Use colored logging | true | boolean
48+
| `--logging-color` | Use colored logging. Default is auto-detected based on NO_COLOR, CI, FORCE_COLOR environment variables and terminal capabilities | | boolean
4949
| `--logging-config-path` | Path to file with custom logging configuration | | String
5050
| `--logging-json` | Use JSON logging (ECS Layout) | false | boolean
5151
| `--logging-level` | Logging level () | info | String
@@ -67,7 +67,7 @@ camel debug [options]
6767
| `--package-scan-jars` | Whether to automatic package scan JARs for custom Spring or Quarkus beans making them available for Camel JBang | false | boolean
6868
| `--port` | Embeds a local HTTP server on this port (port 8080 by default; use 0 to dynamic assign a free random port number) | | int
6969
| `--pretty` | Pretty print message body when using JSon or XML format | | boolean
70-
| `--profile` | Profile to run (dev, test, or prod). | dev | String
70+
| `--profile` | Profile to run (). | dev | String
7171
| `--prompt` | Allow user to type in required parameters in prompt if not present in application | false | boolean
7272
| `--prop,--property` | Additional properties (override existing) | | String
7373
| `--properties` | comma separated list of properties file (ex. /path/to/file.properties,/path/to/other.properties | | String
@@ -83,7 +83,7 @@ camel debug [options]
8383
| `--show-exchange-properties` | Show exchange properties in debug messages | false | boolean
8484
| `--show-exchange-variables` | Show exchange variables in debug messages | true | boolean
8585
| `--show-headers` | Show message headers in debug messages | true | boolean
86-
| `--skip-plugins` | Skip plugins during export | false | boolean
86+
| `--skip-plugins` | Skip resolving plugin dependencies | false | boolean
8787
| `--source` | Prefer to display source filename/code instead of IDs | | boolean
8888
| `--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
8989
| `--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: 6 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,12 +50,12 @@ 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
@@ -65,6 +66,7 @@ camel dependency copy [options]
6566
| `--skip-plugins` | Skip plugins during export | false | boolean
6667
| `--spring-boot-version` | Spring Boot version | RuntimeType.SPRING_BOOT_VERSION | String
6768
| `--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
6870
| `-h,--help` | Display the help and sub-commands | | boolean
6971
|===
7072

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

Lines changed: 6 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,11 +50,11 @@ 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
@@ -64,6 +65,7 @@ camel dependency list [options]
6465
| `--skip-plugins` | Skip plugins during export | false | boolean
6566
| `--spring-boot-version` | Spring Boot version | RuntimeType.SPRING_BOOT_VERSION | String
6667
| `--verbose` | Verbose output of startup activity (dependency resolution and downloading | false | boolean
68+
| `--yes,-y` | Automatically answer yes to confirmation prompts (e.g. when using --clean-dir) | false | boolean
6769
| `-h,--help` | Display the help and sub-commands | | boolean
6870
|===
6971

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

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

5-
Updates dependencies in Maven pom.xml or Java source file (JBang style)
5+
Updates dependencies in Maven pom.xml or Java source files (JBang style)
66

77

88
== Usage
@@ -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
6162
| `--quarkus-version` | Quarkus Platform version | RuntimeType.QUARKUS_VERSION | String
6263
| `--quiet` | Will be quiet, only print when error occurs | false | boolean
6364
| `--repo,--repos` | Additional maven repositories (Use commas to separate multiple repositories) | | String
6465
| `--runtime` | Runtime () | | RuntimeType
66+
| `--scan-routes` | Sync dependencies from route definitions. Only manages org.apache.camel dependencies, preserving non-Camel dependencies. Removes unused Camel dependencies. | | boolean
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.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ camel dependency [options]
2121
| xref:jbang-commands/camel-jbang-dependency-copy.adoc[copy] | Copies all Camel dependencies required to run to a specific directory
2222
| xref:jbang-commands/camel-jbang-dependency-list.adoc[list] | Displays all Camel dependencies required to run
2323
| xref:jbang-commands/camel-jbang-dependency-runtime.adoc[runtime] | Display Camel runtime and version for given Maven project
24-
| xref:jbang-commands/camel-jbang-dependency-update.adoc[update] | Updates dependencies in Maven pom.xml or Java source file (JBang style)
24+
| xref:jbang-commands/camel-jbang-dependency-update.adoc[update] | Updates dependencies in Maven pom.xml or Java source files (JBang style)
2525
|===
2626

2727

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ camel explain [options]
2222
| `--api-key` | API key for authentication. Also reads OPENAI_API_KEY or LLM_API_KEY env vars | | String
2323
| `--api-type` | API type: 'ollama' or 'openai' (OpenAI-compatible) | ollama | ApiType
2424
| `--catalog-context` | Include Camel Catalog descriptions in the prompt | | boolean
25-
| `--format` | Output format: text, markdown | text | String
25+
| `--format` | Output format () | text | String
2626
| `--model` | Model to use | DEFAULT_MODEL | String
2727
| `--show-prompt` | Show the prompt sent to the LLM | | boolean
2828
| `--stream` | Stream the response as it's generated (shows progress) | true | boolean

0 commit comments

Comments
 (0)