Closed scottkurz closed 1 year ago
Open to ideas on how to address this. Honestly I can do without the indentation fine personally. However, I get the impression some folks are not entirely comfortable with the Velocity and Groovy way of doing things just yet.
Looks like here's a good starting point: https://velocity.apache.org/engine/2.0/developer-guide.html#space-gobbling. That's all I have time for today.. didn't know "gobbling" was the search term.
It's potentially very promising. I'll look into how we could use this within Archetypes. Help is of course welcome.
Added a PR to just move the velocity directives to the beginning of the columns so the generated artifacts don't look weird.
E.g. I just generated with a pom.xml with this excerpt:
Apparently we need to do better than the type of indentations one would typically use for say, a nested if-then-else in Java.
Since others are probably more familiar with this Groovy templating I'll just post the issue and maybe someone already knows a good technique to fix this.
Note I did address this for Liberty server.xml in https://github.com/eclipse-ee4j/starter/pull/178 by simply giving up on a nested indentation corresponding to the nested "if" blocks.