christophd opened a new pull request, #29663:
URL: https://github.com/apache/camel/pull/29663
## Summary
_Claude Code on behalf of christophd_
- Add `appliesTo` attribute to `@CamelJBangPlugin` annotation and
`PluginType` enum so each plugin can declare which commands it contributes to
beyond its own (e.g. `export`, `run`)
- `CliExportContext` now passes the target command (`"run"` or `"export"`)
to `getActivePlugins()`, so plugins unrelated to the current command are
skipped entirely — avoiding expensive Maven resolution for plugins that don't
contribute exporters or run customizers
- Old plugin configurations for known `PluginType` entries (e.g. `test`) are
auto-migrated with a warning when the `appliesTo` field is missing
- `TestPlugin` declares `appliesTo = {"export"}` since it is the only plugin
providing a `PluginExporter`
## Test plan
- [x] 17 tests in `PluginFilteringTest` covering:
- Target-based filtering in `getActivePlugins`
- `appliesTo` filtering (loaded for matching target, skipped for
non-matching)
- Broken unrelated plugins don't break targeted resolution
- `CliExportContext` does not resolve unrelated plugins
- `addPlugins` does not customize unrelated plugins
- Auto-migration of old configs for known plugins (config updated +
warning emitted)
- Built-in commands don't trigger plugin discovery
- [x] Full `camel-jbang-core` test suite passes (no new failures)
🤖 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]