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 2024/09/21 06:43:57 UTC

(camel) branch main updated: CAMEL-21246: camel-jbang - Export should include dependencies when camel.server.xxx is enabled. (#15639)

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 8edbd935b46 CAMEL-21246: camel-jbang - Export should include dependencies when camel.server.xxx is enabled. (#15639)
8edbd935b46 is described below

commit 8edbd935b4687014dda37fcb67b907536751b5f0
Author: Claus Ibsen <cl...@gmail.com>
AuthorDate: Sat Sep 21 08:43:51 2024 +0200

    CAMEL-21246: camel-jbang - Export should include dependencies when camel.server.xxx is enabled. (#15639)
---
 .../camel/dsl/jbang/core/commands/ExportBaseCommand.java    | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/dsl/camel-jbang/camel-jbang-core/src/main/java/org/apache/camel/dsl/jbang/core/commands/ExportBaseCommand.java b/dsl/camel-jbang/camel-jbang-core/src/main/java/org/apache/camel/dsl/jbang/core/commands/ExportBaseCommand.java
index 656e7eaee1a..8d3540f4d75 100644
--- a/dsl/camel-jbang/camel-jbang-core/src/main/java/org/apache/camel/dsl/jbang/core/commands/ExportBaseCommand.java
+++ b/dsl/camel-jbang/camel-jbang-core/src/main/java/org/apache/camel/dsl/jbang/core/commands/ExportBaseCommand.java
@@ -452,6 +452,19 @@ public abstract class ExportBaseCommand extends CamelCommand {
             for (String d : RuntimeUtil.getDependenciesAsArray(prop)) {
                 answer.add(d.trim());
             }
+            // automatic add needed dependencies when dev-console is enabled
+            if ("true".equalsIgnoreCase(prop.getProperty("camel.main.devConsoleEnabled"))
+                    || "true".equalsIgnoreCase(prop.getProperty("camel.server.devConsoleEnabled"))) {
+                answer.add("camel:console");
+                answer.add("camel:management");
+            }
+            // automatic add needed dependencies when main server enabled plugins
+            if ("true".equalsIgnoreCase(prop.getProperty("camel.server.jolokiaEnabled"))) {
+                answer.add("camel:platform-http-jolokia");
+            }
+            if ("true".equalsIgnoreCase(prop.getProperty("camel.server.metricsEnabled"))) {
+                answer.add("camel:micrometer-prometheus");
+            }
         }
 
         // remove duplicate versions (keep first)