So, let's consider a general Spring boot
application, which uses JOOQ
for database database access, and Flyway
for database migration. The project uses gradle
for dependency management.
I want the following things:
gradle build
task. So, we see wrong order of tasks execution.I have a very similar setup, but resorted to manual action to generate Jooq classes. I need them for development, so it makes no sense for me to delay the generation till target environment.
I decided to run a local dB for development purposes. I run it in docker, but this is a detail in the entire setup.
When I have a new migration, I run it with flyway grade plugin against the local dB. Then I regenerate Jooq classes with grade Jooq plugin.
When the app is deployed in the target environment, I rely on flyway to run migration on startup. I have matching Jooq classes packaged, so everything works smoothly.