Claus Ibsen created CAMEL-26612:
-----------------------------------

             Summary: camel-jbang - camel eval --isolated and camel transform 
message do not load the plugins
                 Key: CAMEL-26612
                 URL: https://issues.apache.org/jira/browse/CAMEL-26612
             Project: Camel
          Issue Type: Improvement
          Components: camel-jbang
            Reporter: Claus Ibsen
             Fix For: 4.24.0


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 load every configured plugin of the Camel 
CLI, which they do not need.

Loading the plugins resolves them, and caches the class path of each plugin in 
~/.camel-jbang-plugins.json. When this runs in another JVM, the cache gets the 
class path of that JVM, which leaves out the jars that JVM has on its own class 
path. EvalSimpleTest of camel-jbang-core runs camel eval --isolated with the 
home of the developer (it must, to talk to the Camel that JBang starts). A 
local test run of camel-jbang-core therefore rewrote the plugin cache of the 
developer's Camel CLI with the class path of the test JVM: camel test run then 
failed with NoClassDefFoundError for 
org/junit/platform/launcher/core/LauncherDiscoveryRequestBuilder, and the tui, 
mcp and validate plugins loaded their jars from the Maven repository of the 
test run.

The empty Camel of a transform now skips the plugins (skipPlugins, as camel run 
--skip-plugins).



--
This message was sent by Atlassian Jira
(v10.3.26#10030026)

Reply via email to