davsclaus opened a new pull request, #29222:
URL: https://github.com/apache/camel/pull/29222

   https://issues.apache.org/jira/browse/CAMEL-26612
   
   `camel eval --isolated` and `camel transform message` boot an empty Camel in 
the background to evaluate an expression or transform a message 
(`Run.runTransformMessage`). They also loaded every configured plugin of the 
Camel CLI, which they do not need.
   
   Loading the plugins caches their class path in 
`~/.camel-jbang-plugins.json`. `EvalSimpleTest` runs `camel eval --isolated` 
with the home of the developer (it must, to talk to the Camel that JBang 
starts), so a local test run of camel-jbang-core rewrote that cache with the 
class path of the test JVM. The cached class path of the test plugin then had 
no JUnit, and `camel test run` failed with `NoClassDefFoundError: 
org/junit/platform/launcher/core/LauncherDiscoveryRequestBuilder`. The tui, mcp 
and validate plugins loaded their jars from the Maven repository of the test 
run.
   
   **Change**
   - The empty Camel of a transform now skips the plugins (`skipPlugins`, as 
`camel run --skip-plugins`). The options of that run are set in 
`prepareTransformMessage`, so a test can check them.
   
   **Tests**
   - New `RunTransformMessageTest`: the run of a transform has `skipPlugins`.
   - `EvalSimpleTest` (runs only locally) still passes: the background Camel 
starts and the expression is evaluated, and `~/.camel-jbang-plugins.json` stays 
byte-identical (it was rewritten before).
   
   🤖 Generated with [Claude Code](https://claude.com/claude-code)
   
   https://claude.ai/code/session_016Y4dDi5iQNgtHrDdz2NpwF
   


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