davsclaus opened a new pull request, #23920:
URL: https://github.com/apache/camel/pull/23920
## Summary
- Fix regression where `camel export` dry-run fails with
`NoSuchBeanException` for bean references (e.g.,
`aggregationRepository=#event_aggregation`) when the route uses EIPs that
resolve beans via `mandatoryLookup()`
- The root cause: commit `8a185b5618f8` (CAMEL-23355) changed the stub
pattern from `"*"` to `"component:*"` in `Run.java`, but the corresponding
condition in `KameletMain.java:527` that adds `StubBeanRepository` to the
registry was not updated to also handle `"component:*"`
- Additionally, `StubBeanRepository` is now constructed with `"*"` pattern
so it correctly matches bean names (a `"component:*"` pattern would not match
bean names like `event_aggregation`)
## Changes
**`KameletMain.java`** — Added `"component:*".equals(stubPattern)` to the
condition that adds `StubBeanRepository`, and always pass `"*"` to
`StubBeanRepository` since bean references should be stubbed regardless of the
component stub pattern.
**`StubBeanRepositoryTest.java`** — New test verifying that
`StubBeanRepository("*")` stubs bean references and
`StubBeanRepository("component:*")` does not.
## Test plan
- [x] New `StubBeanRepositoryTest` verifies pattern matching behavior
- [x] Existing tests pass
- [ ] Manual: `camel export` with a route using
`aggregationRepository=#myRepo` should complete without `NoSuchBeanException`
_Claude Code on behalf of Claus Ibsen_
🤖 Generated with [Claude Code](https://claude.com/claude-code)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]