From 319ed62602735bd5f6960c5fd7882e95b68a087c Mon Sep 17 00:00:00 2001 From: Claus Ibsen Date: Tue, 25 Nov 2025 21:09:50 +0100 Subject: [PATCH] CAMEL-22734: camel-jbang - Add both repo/repos and prop/property as option names --- .../camel/dsl/jbang/core/commands/DependencyRuntime.java | 2 +- .../camel/dsl/jbang/core/commands/ExportBaseCommand.java | 2 +- .../java/org/apache/camel/dsl/jbang/core/commands/Run.java | 2 +- .../jbang/core/commands/action/TransformMessageAction.java | 2 +- .../dsl/jbang/core/commands/catalog/CatalogBaseCommand.java | 2 +- .../camel/dsl/jbang/core/commands/catalog/CatalogDoc.java | 2 +- .../dsl/jbang/core/commands/update/CamelUpdateMixin.java | 2 +- .../camel/dsl/jbang/core/commands/update/UpdateList.java | 2 +- .../camel/dsl/jbang/core/commands/version/VersionSet.java | 3 ++- .../dsl/jbang/core/commands/generate/CodeSchemaGenerator.java | 2 +- .../dsl/jbang/core/commands/kubernetes/KubernetesRun.java | 4 ++-- 11 files changed, 13 insertions(+), 12 deletions(-) diff --git a/dsl/camel-jbang/camel-jbang-core/src/main/java/org/apache/camel/dsl/jbang/core/commands/DependencyRuntime.java b/dsl/camel-jbang/camel-jbang-core/src/main/java/org/apache/camel/dsl/jbang/core/commands/DependencyRuntime.java index 6c03611feb466..4f3473ecb3076 100644 --- a/dsl/camel-jbang/camel-jbang-core/src/main/java/org/apache/camel/dsl/jbang/core/commands/DependencyRuntime.java +++ b/dsl/camel-jbang/camel-jbang-core/src/main/java/org/apache/camel/dsl/jbang/core/commands/DependencyRuntime.java @@ -39,7 +39,7 @@ public class DependencyRuntime extends CamelCommand { @CommandLine.Parameters(description = "The pom.xml to analyze", arity = "1", paramLabel = "") Path pomXml; - @CommandLine.Option(names = { "--repos" }, + @CommandLine.Option(names = { "--repo", "--repos" }, description = "Additional maven repositories (Use commas to separate multiple repositories)") String repositories; 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 0f84ef2cd4922..c96d1282b4b6d 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 @@ -104,7 +104,7 @@ public abstract class ExportBaseCommand extends CamelCommand { protected List files = new ArrayList<>(); - @CommandLine.Option(names = { "--repos" }, + @CommandLine.Option(names = { "--repo", "--repos" }, description = "Additional maven repositories (Use commas to separate multiple repositories)") protected String repositories; diff --git a/dsl/camel-jbang/camel-jbang-core/src/main/java/org/apache/camel/dsl/jbang/core/commands/Run.java b/dsl/camel-jbang/camel-jbang-core/src/main/java/org/apache/camel/dsl/jbang/core/commands/Run.java index dcde4ffc5ae8d..6fefffdd60ea8 100644 --- a/dsl/camel-jbang/camel-jbang-core/src/main/java/org/apache/camel/dsl/jbang/core/commands/Run.java +++ b/dsl/camel-jbang/camel-jbang-core/src/main/java/org/apache/camel/dsl/jbang/core/commands/Run.java @@ -184,7 +184,7 @@ public class Run extends CamelCommand { split = ",") List dependencies = new ArrayList<>(); - @CommandLine.Option(names = { "--repos" }, + @CommandLine.Option(names = { "--repo", "--repos" }, description = "Additional maven repositories (Use commas to separate multiple repositories)") String repositories; diff --git a/dsl/camel-jbang/camel-jbang-core/src/main/java/org/apache/camel/dsl/jbang/core/commands/action/TransformMessageAction.java b/dsl/camel-jbang/camel-jbang-core/src/main/java/org/apache/camel/dsl/jbang/core/commands/action/TransformMessageAction.java index 6a7cc61472d6b..dc5c711bd011e 100644 --- a/dsl/camel-jbang/camel-jbang-core/src/main/java/org/apache/camel/dsl/jbang/core/commands/action/TransformMessageAction.java +++ b/dsl/camel-jbang/camel-jbang-core/src/main/java/org/apache/camel/dsl/jbang/core/commands/action/TransformMessageAction.java @@ -115,7 +115,7 @@ public class TransformMessageAction extends ActionWatchCommand { description = "Pretty print message body when using JSon or XML format") boolean pretty; - @CommandLine.Option(names = { "--repos" }, + @CommandLine.Option(names = { "--repo", "--repos" }, description = "Additional maven repositories (Use commas to separate multiple repositories)") String repositories; diff --git a/dsl/camel-jbang/camel-jbang-core/src/main/java/org/apache/camel/dsl/jbang/core/commands/catalog/CatalogBaseCommand.java b/dsl/camel-jbang/camel-jbang-core/src/main/java/org/apache/camel/dsl/jbang/core/commands/catalog/CatalogBaseCommand.java index cb19c6455673c..eda2a7b393111 100644 --- a/dsl/camel-jbang/camel-jbang-core/src/main/java/org/apache/camel/dsl/jbang/core/commands/catalog/CatalogBaseCommand.java +++ b/dsl/camel-jbang/camel-jbang-core/src/main/java/org/apache/camel/dsl/jbang/core/commands/catalog/CatalogBaseCommand.java @@ -64,7 +64,7 @@ public abstract class CatalogBaseCommand extends CamelCommand { defaultValue = "io.quarkus.platform") String quarkusGroupId = "io.quarkus.platform"; - @CommandLine.Option(names = { "--repos" }, + @CommandLine.Option(names = { "--repo", "--repos" }, description = "Additional maven repositories for download on-demand (Use commas to separate multiple repositories)") String repos; diff --git a/dsl/camel-jbang/camel-jbang-core/src/main/java/org/apache/camel/dsl/jbang/core/commands/catalog/CatalogDoc.java b/dsl/camel-jbang/camel-jbang-core/src/main/java/org/apache/camel/dsl/jbang/core/commands/catalog/CatalogDoc.java index 3ea5c08cf29c9..ec594e78c8ebb 100644 --- a/dsl/camel-jbang/camel-jbang-core/src/main/java/org/apache/camel/dsl/jbang/core/commands/catalog/CatalogDoc.java +++ b/dsl/camel-jbang/camel-jbang-core/src/main/java/org/apache/camel/dsl/jbang/core/commands/catalog/CatalogDoc.java @@ -80,7 +80,7 @@ public class CatalogDoc extends CamelCommand { defaultValue = "io.quarkus.platform") String quarkusGroupId = "io.quarkus.platform"; - @CommandLine.Option(names = { "--repos" }, + @CommandLine.Option(names = { "--repo", "--repos" }, description = "Additional maven repositories for download on-demand (Use commas to separate multiple repositories)") String repos; diff --git a/dsl/camel-jbang/camel-jbang-core/src/main/java/org/apache/camel/dsl/jbang/core/commands/update/CamelUpdateMixin.java b/dsl/camel-jbang/camel-jbang-core/src/main/java/org/apache/camel/dsl/jbang/core/commands/update/CamelUpdateMixin.java index 500447167d385..c039e512eb7fd 100644 --- a/dsl/camel-jbang/camel-jbang-core/src/main/java/org/apache/camel/dsl/jbang/core/commands/update/CamelUpdateMixin.java +++ b/dsl/camel-jbang/camel-jbang-core/src/main/java/org/apache/camel/dsl/jbang/core/commands/update/CamelUpdateMixin.java @@ -70,7 +70,7 @@ public class CamelUpdateMixin { description = "Runtime (${COMPLETION-CANDIDATES})") RuntimeType runtime = RuntimeType.main; - @CommandLine.Option(names = { "--repos" }, + @CommandLine.Option(names = { "--repo", "--repos" }, description = "Additional maven repositories for download on-demand (Use commas to separate multiple repositories)") String repos; diff --git a/dsl/camel-jbang/camel-jbang-core/src/main/java/org/apache/camel/dsl/jbang/core/commands/update/UpdateList.java b/dsl/camel-jbang/camel-jbang-core/src/main/java/org/apache/camel/dsl/jbang/core/commands/update/UpdateList.java index e92ddae287e87..2c06295bf9598 100644 --- a/dsl/camel-jbang/camel-jbang-core/src/main/java/org/apache/camel/dsl/jbang/core/commands/update/UpdateList.java +++ b/dsl/camel-jbang/camel-jbang-core/src/main/java/org/apache/camel/dsl/jbang/core/commands/update/UpdateList.java @@ -84,7 +84,7 @@ description = "List available update versions for Apache Camel and its runtime variants") public class UpdateList extends CamelCommand { - @CommandLine.Option(names = { "--repos" }, + @CommandLine.Option(names = { "--repo", "--repos" }, description = "Additional maven repositories for download on-demand (Use commas to separate multiple repositories)") String repos; diff --git a/dsl/camel-jbang/camel-jbang-core/src/main/java/org/apache/camel/dsl/jbang/core/commands/version/VersionSet.java b/dsl/camel-jbang/camel-jbang-core/src/main/java/org/apache/camel/dsl/jbang/core/commands/version/VersionSet.java index 51b503a6ac55d..aad93b502d847 100644 --- a/dsl/camel-jbang/camel-jbang-core/src/main/java/org/apache/camel/dsl/jbang/core/commands/version/VersionSet.java +++ b/dsl/camel-jbang/camel-jbang-core/src/main/java/org/apache/camel/dsl/jbang/core/commands/version/VersionSet.java @@ -37,7 +37,8 @@ public class VersionSet extends CamelCommand { description = "Runtime (${COMPLETION-CANDIDATES})") RuntimeType runtime; - @CommandLine.Option(names = { "--repo", "--repos" }, description = "Maven repository for downloading the dependencies") + @CommandLine.Option(names = { "--repo", "--repos" }, + description = "Maven repository for downloading the dependencies (Use commas to separate multiple repositories)") String repo; @CommandLine.Option(names = { "--reset" }, description = "Reset by removing any custom version settings") diff --git a/dsl/camel-jbang/camel-jbang-plugin-generate/src/main/java/org/apache/camel/dsl/jbang/core/commands/generate/CodeSchemaGenerator.java b/dsl/camel-jbang/camel-jbang-plugin-generate/src/main/java/org/apache/camel/dsl/jbang/core/commands/generate/CodeSchemaGenerator.java index 2a2c944a857af..63692f86935d4 100644 --- a/dsl/camel-jbang/camel-jbang-plugin-generate/src/main/java/org/apache/camel/dsl/jbang/core/commands/generate/CodeSchemaGenerator.java +++ b/dsl/camel-jbang/camel-jbang-plugin-generate/src/main/java/org/apache/camel/dsl/jbang/core/commands/generate/CodeSchemaGenerator.java @@ -77,7 +77,7 @@ public class CodeSchemaGenerator extends CamelCommand { description = "Whether to allow automatic downloading JAR dependencies (over the internet)") boolean download = true; - @CommandLine.Option(names = { "--repos" }, + @CommandLine.Option(names = { "--repo", "--repos" }, description = "Additional maven repositories (Use commas to separate multiple repositories)") String repositories; diff --git a/dsl/camel-jbang/camel-jbang-plugin-kubernetes/src/main/java/org/apache/camel/dsl/jbang/core/commands/kubernetes/KubernetesRun.java b/dsl/camel-jbang/camel-jbang-plugin-kubernetes/src/main/java/org/apache/camel/dsl/jbang/core/commands/kubernetes/KubernetesRun.java index 9a632cd409cd0..547145b1de5ed 100644 --- a/dsl/camel-jbang/camel-jbang-plugin-kubernetes/src/main/java/org/apache/camel/dsl/jbang/core/commands/kubernetes/KubernetesRun.java +++ b/dsl/camel-jbang/camel-jbang-plugin-kubernetes/src/main/java/org/apache/camel/dsl/jbang/core/commands/kubernetes/KubernetesRun.java @@ -75,7 +75,7 @@ public class KubernetesRun extends KubernetesBaseCommand { @CommandLine.Option(names = { "--service-account" }, description = "The service account used to run the application.") String serviceAccount; - @CommandLine.Option(names = { "--property" }, + @CommandLine.Option(names = { "--prop", "--property" }, description = "Add a runtime property or properties from a file (syntax: [my-key=my-value|file:/path/to/my-conf.properties|/path/to/my-conf.properties].") String[] properties; @@ -183,7 +183,7 @@ public class KubernetesRun extends KubernetesBaseCommand { // Export base options - @CommandLine.Option(names = { "--repos" }, + @CommandLine.Option(names = { "--repo", "--repos" }, description = "Additional maven repositories (Use commas to separate multiple repositories)") String repositories;