CAMEL-24628: camel-cli - camel dependency update propagate route files to export pipeline - #26122
Conversation
…s 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).
|
gnodet
left a comment
There was a problem hiding this comment.
Clean regression fix. The else branch correctly propagates non-target files (YAML/XML routes) to ExportBaseCommand.files so the export pipeline resolves their dependencies — restoring the behavior broken by the arity="1..*" refactor in CAMEL-22544.
The test covers the exact two-argument calling convention used by IDE tooling across all three runtimes.
Metadata:
- Category: bug fix
- Milestone: should be set to 4.23.0
- Backport: The regression exists on
camel-4.22.xtoo (CAMEL-22544 was cherry-picked there). A backport withport/camel-4.22.xlabel would be appropriate.
This review was generated by an AI agent, Hermès on behalf of @gnodet.
Description
Problem
Since CAMEL-22544,
camel dependency update pom.xml route.camel.yamlsilently drops the route file and resolves zero dependencies.The
@Parameters(arity="1..*")change causes all positional arguments to be consumed byDependencyUpdate.targetFiles. Non-update files (YAML/XML route definitions) are correctly classified but never propagated toExportBaseCommand.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 toExportBaseCommand.filesviaFilesConsumer.IDE tooling uses this two-argument calling convention, as confirmed by prior issues CAMEL-22447 and CAMEL-22446.
Fix
Add an
elsebranch inDependencyUpdate.doCall()that forwards non-target files (YAML, XML routes) tothis.filesfor the export pipeline — exactly as the@Parametersdescription already promises.Add a test that passes both
pom.xmland a route file as positional arguments to verify the route is used for dependency resolution.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.resolves https://issues.apache.org/jira/browse/CAMEL-24628