How to make jooq auto generator to run using liquibase script and then liquibase migration on spring boot startup instead of mvn clean compile?
I want jooq auto generator to run on basis of liquibase schema and then I want liquibase migration to run on spring boot startup but currently it runs on running mvn clean compile. I want the logs like "Acquired Change Lock" to appear after Application startup and not on mvn clean compile.
This is the pom.xml excerpt:
<plugin>
<groupId>org.liquibase</groupId>
<artifactId>liquibase-maven-plugin</artifactId>
<version>3.4.1</version>
<executions>
<execution>
<phase>generate-resources</phase>
<configuration>
<propertyFile>src/main/resources/liquibase.properties</propertyFile>
<changeLogFile>src/main/resources/liquibase-outputChangeLog.xml</changeLogFile>
<driver>org.postgresql.Driver</driver>
</configuration>
<goals>
<goal>update</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.jooq</groupId>
<artifactId>jooq-codegen-maven</artifactId>
<version>3.13.4</version>
<executions>
<execution>
<phase>process-resources</phase>
<goals>
<goal>generate</goal>
</goals>
</execution>
</executions>
<dependencies>
<dependency>
<groupId>org.postgresql</groupId>
<artifactId>postgresql</artifactId>
<version>42.2.12</version>
</dependency>
</dependencies>
<configuration xmlns="http://www.jooq.org/xsd/jooq-codegen-3.16.3.xsd">
<jdbc>
<driver>org.postgresql.Driver</driver>
<url>${spring.datasource.url}</url>
<user>${spring.datasource.username}</user>
<password>${spring.datasource.password}</password>
</jdbc>
<generator>
<database>
<name>org.jooq.meta.postgres.PostgresDatabase</name>
<includes>.*</includes>
<excludes></excludes>
<inputSchema>public</inputSchema>
</database>
<target>
<packageName>com.slb.pps.azure.jooqGenerated</packageName>
<directory>target/generated-sources/jooq</directory>
</target>
</generator>
</configuration>
</plugin>
Please help me debug this. Let me know if any other information is needed.