You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by cd...@apache.org on 2026/03/19 15:25:06 UTC

(camel) branch main updated: CAMEL-23157: Fix test plugin run command

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

cdeppisch 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 9064323d3017 CAMEL-23157: Fix test plugin run command
9064323d3017 is described below

commit 9064323d301771964ba59294d7470114a7c5876e
Author: Christoph Deppisch <ch...@web.de>
AuthorDate: Thu Mar 19 15:40:11 2026 +0100

    CAMEL-23157: Fix test plugin run command
    
    - Avoid test plugin to add test scoped dependencies to the Camel route runtime
---
 .../src/main/java/org/apache/camel/dsl/jbang/core/commands/Run.java | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/dsl/camel-jbang/camel-jbang-core/src/main/java/org/apache/camel/dsl/jbang/core/commands/Run.java b/dsl/camel-jbang/camel-jbang-core/src/main/java/org/apache/camel/dsl/jbang/core/commands/Run.java
index 87b2c2a13d80..1b5d3a19157e 100644
--- a/dsl/camel-jbang/camel-jbang-core/src/main/java/org/apache/camel/dsl/jbang/core/commands/Run.java
+++ b/dsl/camel-jbang/camel-jbang-core/src/main/java/org/apache/camel/dsl/jbang/core/commands/Run.java
@@ -999,7 +999,11 @@ public class Run extends CamelCommand {
                     .collect(Collectors.toSet());
 
             for (PluginExporter exporter : exporters) {
-                addDependencies(exporter.getDependencies(runtime).toArray(String[]::new));
+                addDependencies(exporter.getDependencies(runtime)
+                        .stream()
+                        .filter(dependency -> !dependency.startsWith("mvn@test")) // filter test scoped dependencies
+                        .collect(Collectors.toSet())
+                        .toArray(String[]::new));
             }
         }