[backport camel-4.22.x] CAMEL-24628: camel-cli - camel dependency update propagate route files to export pipeline - #26131
Conversation
…ate propagate route files to export pipeline ## Problem Since CAMEL-22544, `camel dependency update pom.xml route.camel.yaml` silently drops the route file and resolves zero dependencies. The `@Parameters(arity="1..*")` change causes all positional arguments to be consumed by `DependencyUpdate.targetFiles`. Non-update files (YAML/XML route definitions) are correctly classified but never propagated to `ExportBaseCommand.files`, so the export pipeline runs with no routes and discovers no components. This is a regression from Camel 4.20, where `arity="1"` let the second positional flow to `ExportBaseCommand.files` via `FilesConsumer`. IDE tooling uses this two-argument calling convention, as confirmed by prior issues CAMEL-22447 and CAMEL-22446. ## Fix Add an `else` branch in `DependencyUpdate.doCall()` that forwards non-target files (YAML, XML routes) to `this.files` for the export pipeline — exactly as the `@Parameters` description already promises. Add a test that passes both `pom.xml` and a route file as positional arguments to verify the route is used for dependency resolution. Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com
|
🌟 Thank you for your contribution to the Apache Camel project! 🌟 🐫 Apache Camel Committers, please review the following items:
|
|
🧪 CI tested the following changed modules:
🔬 Scalpel shadow comparison — Scalpel: 7 tested, 8 compile-only — current: 6 all testedMaveniverse Scalpel detected 15 affected modules (current approach: 6).
|
Description
Backport of #26122
Target
mainbranch)Tracking
Apache Camel coding standards and style
mvn clean install -DskipTestslocally from root folder and I have committed all auto-generated changes.AI-assisted contributions
Co-authored-bytrailers) and the PR description identifies the AI tool used.