Otavio Rodolfo Piske created CAMEL-21208:
--------------------------------------------
Summary: 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
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)