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

davsclaus pushed a commit to branch camel-4.18.x
in repository https://gitbox.apache.org/repos/asf/camel.git


The following commit(s) were added to refs/heads/camel-4.18.x by this push:
     new 2eb67c7cfdb8 [backport camel-4.18.x] CAMEL-24358: camel-jbang - Add 
repo param propagation test (#25396)
2eb67c7cfdb8 is described below

commit 2eb67c7cfdb8a20106b57d929745c0035d02f8fb
Author: GaĆ«lle Fournier <[email protected]>
AuthorDate: Thu Aug 6 20:55:49 2026 +0200

    [backport camel-4.18.x] CAMEL-24358: camel-jbang - Add repo param 
propagation test (#25396)
    
    CAMEL-24358: camel-jbang - Add repo param propagation test
---
 .../camel/dsl/jbang/core/commands/ExportTest.java  | 23 ++++++++++++++++++++++
 1 file changed, 23 insertions(+)

diff --git 
a/dsl/camel-jbang/camel-jbang-core/src/test/java/org/apache/camel/dsl/jbang/core/commands/ExportTest.java
 
b/dsl/camel-jbang/camel-jbang-core/src/test/java/org/apache/camel/dsl/jbang/core/commands/ExportTest.java
index d0421c0627ea..38465f968ef6 100644
--- 
a/dsl/camel-jbang/camel-jbang-core/src/test/java/org/apache/camel/dsl/jbang/core/commands/ExportTest.java
+++ 
b/dsl/camel-jbang/camel-jbang-core/src/test/java/org/apache/camel/dsl/jbang/core/commands/ExportTest.java
@@ -932,4 +932,27 @@ class ExportTest {
         }
     }
 
+    @ParameterizedTest
+    @MethodSource("runtimeProvider")
+    public void shouldExportWithCustomRepos(RuntimeType rt) throws Exception {
+        LOG.info("shouldExportWithCustomRepos {}", rt);
+        Export command = createCommand(rt, new String[] { 
"src/test/resources/route.yaml" },
+                "--gav=examples:route:1.0.0", "--dir=" + workingDir, "--quiet",
+                
"--repos=https://my.custom.repo/releases,https://other.repo/snapshots";);
+        int exit = command.doCall();
+
+        Assertions.assertEquals(0, exit);
+        Model model = readMavenModel();
+
+        assertThat(model.getRepositories())
+                .as("Expected custom repositories in generated pom.xml")
+                .anySatisfy(repo -> 
assertThat(repo.getUrl()).isEqualTo("https://my.custom.repo/releases";))
+                .anySatisfy(repo -> 
assertThat(repo.getUrl()).isEqualTo("https://other.repo/snapshots";));
+
+        assertThat(model.getPluginRepositories())
+                .as("Expected custom plugin repositories in generated pom.xml")
+                .anySatisfy(repo -> 
assertThat(repo.getUrl()).isEqualTo("https://my.custom.repo/releases";))
+                .anySatisfy(repo -> 
assertThat(repo.getUrl()).isEqualTo("https://other.repo/snapshots";));
+    }
+
 }

Reply via email to