Croway commented on PR #29990:
URL: https://github.com/apache/camel/pull/29990#issuecomment-6896268392

   Thanks @davsclaus, all four addressed in 8d736ba791ce:
   
   1. **Run customizer / exporter** — `CliExportContext` now asks each plugin 
for its run customizer and exporter in a `try`; on a `LinkageError` the plugin 
is left out as a whole (its other contribution too) with the same once-only 
warning. The warning names the plugin as `camel plugin delete` takes it, also 
when it was added with a `--command` of its own (the map key is the command). 
Plugins built into the CLI are not guarded, as they link with it. Test: 
`PluginHelperTest.aPluginWhoseExporterOrRunCustomizerDoesNotLinkDoesNotFailCamelExport`,
 with two cached plugins that link but whose exporter / run customizer does not 
(`UnlinkedContributionFakePlugins`); it failed before with the raw 
`NoClassDefFoundError` out of `CliExportContext`.
   2. **"update it"** — confirmed there is no `camel plugin update` (add, 
delete, get, list). The error and the contributor warning now end with `run 
camel plugin add <name> to select a release for this Camel version, or remove 
it with camel plugin delete <name>`. Other load failures (not found, download 
error) keep `remove it with camel plugin delete <name>`, as re-adding does not 
help there.
   3. **`notLinked`** — an error without a message 
(`ExceptionInInitializerError`) now shows its cause 
(`ExceptionInInitializerError caused by IllegalStateException boom` rather than 
`ExceptionInInitializerError null`), and the text says `it does not link with 
Camel X and may be built for another version: ...`. I used "and may be" rather 
than the parenthesis because the reason is already inside parentheses in the 
warning and the error (`cannot be loaded (...)`), so it would nest. New test 
`aStaticInitializerThatFailsIsReportedWithItsCause`; the existing assertions 
follow the new text.
   4. **FQCN** — `PluginHelperTest` imports `DefaultCamelCatalog`, and also 
`URLClassLoader`, `Collection`, `List` and `ArrayList`, which it used fully 
qualified too.
   
   The doc paragraph in `camel-jbang-projects.adoc` mentions the exporter/run 
customizer case and the `camel plugin add` / `camel plugin delete` advice.
   
   _Claude Code on behalf of Croway_
   


-- 
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]

Reply via email to