Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Debugger]Avoid need to modify pom.xml to support DataSonnet language #646

Open
apupier opened this issue Dec 24, 2021 · 5 comments
Open

Comments

@apupier
Copy link
Member

apupier commented Dec 24, 2021

currently to evaluate expressions using DataSonnet in debugger, you need to add to the pom.xml:

    <dependency>
        <groupId>org.apache.camel.springboot</groupId>
        <artifactId>camel-datasonnet-starter</artifactId>
    </dependency>
    <dependency>
        <groupId>org.scala-lang</groupId>
        <artifactId>scala-library</artifactId>
        <version>2.13.3</version>
    </dependency>

it is modifying the user project. it would be nice if these dependencies can be injected automatically when needed

@davsclaus
Copy link
Collaborator

Yeah we should actually go the other way. That languages shown in that "list" is only languages that are available in the running Camel application.

The intention is not that you can run any languages "as you wish" but use the languages that your Camel application are using.

@javaduke
Copy link
Contributor

I like this idea, but is there any way in the plugin or in Camel to obtain a list of all languages in the classpath?

@davsclaus
Copy link
Collaborator

We can see from the JARs on the classpath which ones are langauges and via the camel-catalog find out their names.

An alternative is via JMX but then its "only languages that are active in use", eg you may have camel-datasonnet on classpath but it has not been in use yet, then its not registered in camel contexxt.

@javaduke
Copy link
Contributor

Ah, the resolving the new language is taken care of in the ManagedBacklogDebugger, it calls camelContext.resolveLanguage() before evaluating the expression.
So by "via JMX" did you mean there's an existing functionality that I can use or that we need to implement a new call?
Perhaps add something like getResolvedLanguages() to the Camel context?

@davsclaus
Copy link
Collaborator

Yeah I am adding JMX operations to the CamelContextMBean
https://issues.apache.org/jira/browse/CAMEL-17383

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants