[
https://issues.apache.org/jira/browse/CAMEL-21208?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17881208#comment-17881208
]
Otavio Rodolfo Piske commented on CAMEL-21208:
----------------------------------------------
There is some similarity with CAMEL-21181, but I feel that one is more about
serializing objects, than generating code. Nonetheless, it may be possible to
come up with a solution that fits both of the problems.
> camel-jbang: use a template engine for code generation
> ------------------------------------------------------
>
> Key: CAMEL-21208
> URL: https://issues.apache.org/jira/browse/CAMEL-21208
> Project: Camel
> Issue Type: Improvement
> Components: camel-jbang
> Affects Versions: 4.7.0, 4.8.0
> Reporter: Otavio Rodolfo Piske
> Priority: Major
>
> We have several places were we [create the export files by
> code|https://github.com/apache/camel/blob/main/dsl/camel-jbang/camel-jbang-core/src/main/java/org/apache/camel/dsl/jbang/core/commands/Run.java#L1265-L1281].
> Not only this bug-prone, but this is also extremely hard to read, test,
> maintain and evolve. The code on Camel JBang is full of code like this.
> Using a template engine allow us to separate the template source, from the
> text/code generation logic, resulting in a code that is easier to maintain.
> We should pick a template engine, convert the all that code to the
> appropriate format and cleanup the code generation.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)