Claus Ibsen created CAMEL-26297:
-----------------------------------

             Summary: camel-package-maven-plugin - generate a property 
configurer for languages, so camel.language.<name>.<option> is bound without 
reflection
                 Key: CAMEL-26297
                 URL: https://issues.apache.org/jira/browse/CAMEL-26297
             Project: Camel
          Issue Type: Improvement
            Reporter: Claus Ibsen
             Fix For: 4.24.0


Components (403) and data formats (60) get a generated {{PropertyConfigurer}}; 
languages have none, so camel-main binds {{camel.language.<name>.<option>}} to 
the setters of the Language bean by reflection.

CAMEL-26296 declares those options with {{@Metadata}} on the Language class 
fields and generates them as {{languageProperties}} in the language JSON. From 
the same fields, {{PackageLanguageMojo}} could generate a 
{{<Name>LanguageConfigurer}} and its 
{{META-INF/services/org/apache/camel/configurer/...}} entry, the way 
{{PackageDataFormatMojo}} does for data formats.

To verify first: the runtime looks a configurer up under different names:
* {{PropertyConfigurerHelper.resolvePropertyConfigurer(context, type)}} derives 
it from the class name ({{JsonPathLanguage}} -> {{json-path-language}});
* {{MainHelper}} / {{PropertyBindingSupport}} use the simple class name 
({{QuickjsLanguage}});
* data formats register under the catalog name ({{jackson-dataformat}}).
Check which name camel-main actually resolves for a language, and whether data 
formats are bound by their configurer in camel-main today or also fall back to 
reflection.

Languages with options: bean, java, jsonpath, openfeature, quickjs, semantic, 
typesafe-ai, xpath, xquery.

_Claude Code on behalf of davsclaus_



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

Reply via email to