This is an automated email from the ASF dual-hosted git repository.

davsclaus pushed a commit to branch camel-4.0.x
in repository https://gitbox.apache.org/repos/asf/camel.git


The following commit(s) were added to refs/heads/camel-4.0.x by this push:
     new fb4eb88e1da CAMEL-19890: camel-jbang - Download dependencies should 
ignite whitespace if multiple dependencies are separated by comma with spaces 
before/after.
fb4eb88e1da is described below

commit fb4eb88e1dad532d5b78c71df2197ad3882286f9
Author: Claus Ibsen <claus.ib...@gmail.com>
AuthorDate: Wed Sep 20 15:42:25 2023 +0200

    CAMEL-19890: camel-jbang - Download dependencies should ignite whitespace 
if multiple dependencies are separated by comma with spaces before/after.
---
 .../apache/camel/main/download/CommandLineDependencyDownloader.java    | 3 +++
 1 file changed, 3 insertions(+)

diff --git 
a/dsl/camel-kamelet-main/src/main/java/org/apache/camel/main/download/CommandLineDependencyDownloader.java
 
b/dsl/camel-kamelet-main/src/main/java/org/apache/camel/main/download/CommandLineDependencyDownloader.java
index 5140cdc5e8c..df053597081 100644
--- 
a/dsl/camel-kamelet-main/src/main/java/org/apache/camel/main/download/CommandLineDependencyDownloader.java
+++ 
b/dsl/camel-kamelet-main/src/main/java/org/apache/camel/main/download/CommandLineDependencyDownloader.java
@@ -43,7 +43,10 @@ public class CommandLineDependencyDownloader extends 
ServiceSupport {
     private void downloadDependencies() {
         final List<String> gavs = new ArrayList<>();
         for (String dep : dependencies.split(",")) {
+            // trim whitespace
+            dep = dep.trim();
             String gav = dep;
+            gav = gav.trim();
             if (dep.startsWith("camel:") || dep.startsWith("camel-")) {
                 // it's a known camel component
                 gav = "org.apache.camel:camel-" + dep.substring(6) + ":" + 
camelContext.getVersion();

Reply via email to