How to adapt the custom generation to our standards?
We generate our pojos from an API contract which works pretty well. However, there are a few things need to address on the generated pojos that end up requiring some editing on the generated files - either manually or through a script.
For instance, we would like to remove the @Generated annotation completely (and, yes, <hideGenerationTimestamp>true</hideGenerationTimestamp> works, but it does not remove the @Generated annotation altogether).
A couple of other things we would like to have is to extract enums, override the toString() method, remove the toIndentendString(Object o) method, remove the JsonNullable import, stop using the @Nullable annotation and, finally, have better control over the generated contructors.
Unfortunately, we are not using Lombok at this time, but we will adopt that soon. So, eventually, it would be nice to be able to annotate the classes with @Data, @Builder, @NoArgsConstructor and @AllArgsConstructor.
I have seen many examples using Mustache, but have not really been able to enforce what we need.
The pom we use is attached below and we execute it with mvn clean generate-sources.
There are a few mustache templates in the specified directory, but they either doesn't seem to affect the result or they are not being used at all.