Looking at the jOOQ example of the Maven plugin configuration for the code generator (near the end of the configuration), I see that the target directory for the generated files is target/generated-sources/jooq
.
Since the generator produces Java code, do you know why the suggestion here isn't a subfolder of /src
, but instead a completely separated one? Is there any reason for this? Is it a best practice or something?
This is a good question and should probably also be covered in the jOOQ manual!
The question is not strictly related to jOOQ but to source code generation in general (e.g. also when using XJC to generate JAXB-annotated Java code from XSD). Some people prefer making generated source code part of the "main" source code, others prefer to keep it apart. There are essentially these ideas behind each approach:
There isn't really a generally preferred way. Both have their advantages.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With