This is an automated email from the ASF dual-hosted git repository.
davsclaus pushed a commit to branch camel-4.18.x
in repository https://gitbox.apache.org/repos/asf/camel.git
The following commit(s) were added to refs/heads/camel-4.18.x by this push:
new f399abc1e221 CAMEL-23002: camel plugin add xyz - should ignore the gav
in the camel-jbang-user.properties (#21637)
f399abc1e221 is described below
commit f399abc1e221b748ebc9de9c3ea0a41cfa03d439
Author: Claus Ibsen <[email protected]>
AuthorDate: Fri Feb 27 17:33:07 2026 +0100
CAMEL-23002: camel plugin add xyz - should ignore the gav in the
camel-jbang-user.properties (#21637)
---
.../apache/camel/dsl/jbang/core/common/CommandLineHelper.java | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git
a/dsl/camel-jbang/camel-jbang-core/src/main/java/org/apache/camel/dsl/jbang/core/common/CommandLineHelper.java
b/dsl/camel-jbang/camel-jbang-core/src/main/java/org/apache/camel/dsl/jbang/core/common/CommandLineHelper.java
index 39274c6d9d30..eb8a4f56772a 100644
---
a/dsl/camel-jbang/camel-jbang-core/src/main/java/org/apache/camel/dsl/jbang/core/common/CommandLineHelper.java
+++
b/dsl/camel-jbang/camel-jbang-core/src/main/java/org/apache/camel/dsl/jbang/core/common/CommandLineHelper.java
@@ -164,6 +164,16 @@ public final class CommandLineHelper {
public CamelUserConfigDefaultValueProvider(Properties properties) {
super(properties);
}
+
+ @Override
+ public String defaultValue(CommandLine.Model.ArgSpec argSpec) throws
Exception {
+ // all plugin commands should not support default values from
camel-jbang-user.properties
+ CommandLine.Model.CommandSpec parent = argSpec.command().parent();
+ if (parent != null && parent.name().equals("plugin")) {
+ return null;
+ }
+ return super.defaultValue(argSpec);
+ }
}
}