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 2023/04/05 07:48:05 UTC

[camel] branch main updated: CAMEL-19242: camel-jbang - camel doc may not work on main

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 43f772b5963 CAMEL-19242: camel-jbang - camel doc may not work on main
43f772b5963 is described below

commit 43f772b5963547a6b0cc301a18bd5cfde8634bc3
Author: Claus Ibsen <cl...@gmail.com>
AuthorDate: Wed Apr 5 09:47:22 2023 +0200

    CAMEL-19242: camel-jbang - camel doc may not work on main
---
 .../org/apache/camel/main/download/MavenDependencyDownloader.java | 8 +++++---
 1 file changed, 5 insertions(+), 3 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 0b2be581ba6..ac78c5b063d 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
@@ -221,9 +221,11 @@ public class MavenDependencyDownloader extends ServiceSupport implements Depende
             // to the ones detected from ~/.m2/settings.xml and configured in
             // org.apache.camel.main.download.MavenDependencyDownloader#repos
             Set<String> extraRepositories = new LinkedHashSet<>(resolveExtraRepositories(extraRepos));
-            // and from known extra repositories (if any)
-            String known = knownReposResolver.getRepo(artifactId);
-            extraRepositories.addAll(resolveExtraRepositories(known));
+            if (knownReposResolver != null) {
+                // and from known extra repositories (if any)
+                String known = knownReposResolver.getRepo(artifactId);
+                extraRepositories.addAll(resolveExtraRepositories(known));
+            }
 
             List<MavenArtifact> artifacts = resolveDependenciesViaAether(deps, extraRepositories,
                     transitively, useApacheSnaphots);