You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by da...@apache.org on 2022/12/12 12:59:32 UTC

[camel] branch main updated: CAMEL-18802: camel-jbang - Automatic download camel-base64 if used as properties function.

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 7455a739fc1 CAMEL-18802: camel-jbang - Automatic download camel-base64 if used as properties function.
7455a739fc1 is described below

commit 7455a739fc1f3d3ee7c53293ddb73af19e758a2f
Author: Claus Ibsen <cl...@gmail.com>
AuthorDate: Mon Dec 12 13:59:00 2022 +0100

    CAMEL-18802: camel-jbang - Automatic download camel-base64 if used as properties function.
---
 .../download/DependencyDownloaderPropertiesFunctionResolver.java   | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/dsl/camel-kamelet-main/src/main/java/org/apache/camel/main/download/DependencyDownloaderPropertiesFunctionResolver.java b/dsl/camel-kamelet-main/src/main/java/org/apache/camel/main/download/DependencyDownloaderPropertiesFunctionResolver.java
index 79e67724c17..280b78022d0 100644
--- a/dsl/camel-kamelet-main/src/main/java/org/apache/camel/main/download/DependencyDownloaderPropertiesFunctionResolver.java
+++ b/dsl/camel-kamelet-main/src/main/java/org/apache/camel/main/download/DependencyDownloaderPropertiesFunctionResolver.java
@@ -35,6 +35,13 @@ public class DependencyDownloaderPropertiesFunctionResolver extends DefaultPrope
 
     @Override
     public PropertiesFunction resolvePropertiesFunction(String name) {
+        if ("base64".equals(name)) {
+            if (downloader != null && !downloader.alreadyOnClasspath("org.apache.camel", "camel-base64",
+                    getCamelContext().getVersion())) {
+                downloader.downloadDependency("org.apache.camel", "camel-base64",
+                        getCamelContext().getVersion());
+            }
+        }
         if ("configmap".equals(name) || "secret".equals(name)) {
             if (downloader != null && !downloader.alreadyOnClasspath("org.apache.camel", "camel-kubernetes",
                     getCamelContext().getVersion())) {