[ https://issues.apache.org/jira/browse/CAMEL-21208?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Otavio Rodolfo Piske updated CAMEL-21208: ----------------------------------------- Description: 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|https://sonarcloud.io/project/issues?directories=dsl%2Fcamel-jbang%2Fcamel-jbang-core%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fcamel%2Fdsl%2Fjbang%2Fcore%2Fcommands&issueStatuses=OPEN%2CCONFIRMED&id=apache_camel&open=AX4xQ6i72wn0z3gD8D78]. 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. was: 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. > 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|https://sonarcloud.io/project/issues?directories=dsl%2Fcamel-jbang%2Fcamel-jbang-core%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fcamel%2Fdsl%2Fjbang%2Fcore%2Fcommands&issueStatuses=OPEN%2CCONFIRMED&id=apache_camel&open=AX4xQ6i72wn0z3gD8D78]. > 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)