You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by ac...@apache.org on 2022/10/20 09:14:26 UTC

[camel] branch main created (now 245c5cf5c18)

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

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


      at 245c5cf5c18 CAMEL-18624: camel-jbang - Should load custom type converters when adding new JARs

This branch includes the following new commits:

     new 3139a76ca6f CAMEL-18624: camel-jbang - Should load custom type converters when adding new JARs
     new 245c5cf5c18 CAMEL-18624: camel-jbang - Should load custom type converters when adding new JARs

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.



[camel] 01/02: CAMEL-18624: camel-jbang - Should load custom type converters when adding new JARs

Posted by ac...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit 3139a76ca6f6f38d0a6282da9580b1ac8113b799
Author: Claus Ibsen <cl...@gmail.com>
AuthorDate: Thu Oct 20 11:00:27 2022 +0200

    CAMEL-18624: camel-jbang - Should load custom type converters when adding new JARs
---
 .../camel/main/download/MavenDependencyDownloader.java      | 13 ++++++++-----
 1 file changed, 8 insertions(+), 5 deletions(-)

diff --git a/dsl/camel-kamelet-main/src/main/java/org/apache/camel/main/download/MavenDependencyDownloader.java b/dsl/camel-kamelet-main/src/main/java/org/apache/camel/main/download/MavenDependencyDownloader.java
index 53b48ffba5a..790aae25cb1 100644
--- a/dsl/camel-kamelet-main/src/main/java/org/apache/camel/main/download/MavenDependencyDownloader.java
+++ b/dsl/camel-kamelet-main/src/main/java/org/apache/camel/main/download/MavenDependencyDownloader.java
@@ -363,6 +363,7 @@ public class MavenDependencyDownloader extends ServiceSupport implements Depende
             }
 
             List<MavenArtifact> artifacts = resolveDependenciesViaAether(deps, repositories, transitively);
+            List<File> files = new ArrayList<>();
             LOG.debug("Resolved {} -> [{}]", gav, artifacts);
 
             for (MavenArtifact a : artifacts) {
@@ -374,16 +375,18 @@ public class MavenDependencyDownloader extends ServiceSupport implements Depende
                         DependencyDownloaderClassLoader ddc = (DependencyDownloaderClassLoader) classLoader;
                         ddc.addFile(file);
                     }
-                    // trigger listener after downloaded and added to classloader
-                    for (ArtifactDownloadListener listener : artifactDownloadListeners) {
-                        listener.onDownloadedFile(file);
-                    }
+                    files.add(file);
                     LOG.trace("Added classpath: {}", a.getGav());
                 }
             }
 
+            // trigger listeners after downloaded and added to classloader
+            for (File file : files) {
+                for (ArtifactDownloadListener listener : artifactDownloadListeners) {
+                    listener.onDownloadedFile(file);
+                }
+            }
             if (!artifacts.isEmpty()) {
-                // trigger listener after downloaded and added to classloader
                 for (DownloadListener listener : downloadListeners) {
                     listener.onDownloadedDependency(groupId, artifactId, version);
                 }


[camel] 02/02: CAMEL-18624: camel-jbang - Should load custom type converters when adding new JARs

Posted by ac...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit 245c5cf5c1802f65f14eedb2610b5926e9d499e3
Author: Claus Ibsen <cl...@gmail.com>
AuthorDate: Thu Oct 20 11:04:32 2022 +0200

    CAMEL-18624: camel-jbang - Should load custom type converters when adding new JARs
---
 .../java/org/apache/camel/main/download/ArtifactDownloadListener.java   | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/dsl/camel-kamelet-main/src/main/java/org/apache/camel/main/download/ArtifactDownloadListener.java b/dsl/camel-kamelet-main/src/main/java/org/apache/camel/main/download/ArtifactDownloadListener.java
index 619bccbc0b2..290fe4fd065 100644
--- a/dsl/camel-kamelet-main/src/main/java/org/apache/camel/main/download/ArtifactDownloadListener.java
+++ b/dsl/camel-kamelet-main/src/main/java/org/apache/camel/main/download/ArtifactDownloadListener.java
@@ -27,7 +27,7 @@ public interface ArtifactDownloadListener {
     /**
      * After the artifact has been downloaded
      *
-     * @param file  the downloaded artifact as a file
+     * @param file the downloaded artifact as a file
      */
     void onDownloadedFile(File file);