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

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


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

commit 09c5c3d41088c366aaea68bb97508eb061698d78
Author: Claus Ibsen <[email protected]>
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