Co-Authored-By: Claude Sonnet 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_017ic4b7h4ZNF4BDUpJk3Zou
160 lines
5.5 KiB
XML
160 lines
5.5 KiB
XML
<?xml version="1.0" encoding="UTF-8"?>
|
|
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
|
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
|
<modelVersion>4.0.0</modelVersion>
|
|
|
|
<parent>
|
|
<groupId>org.springframework.boot</groupId>
|
|
<artifactId>spring-boot-starter-parent</artifactId>
|
|
<version>4.2.0</version>
|
|
</parent>
|
|
|
|
<groupId>com.ankurm</groupId>
|
|
<artifactId>jooq-demo</artifactId>
|
|
<version>1.0.0</version>
|
|
<packaging>jar</packaging>
|
|
|
|
<properties>
|
|
<java.version>25</java.version>
|
|
<maven.compiler.release>25</maven.compiler.release>
|
|
<!-- Where scripts/codegen.sh points the code generator. Only used by the "codegen" profile. -->
|
|
<codegen.jdbc.url>jdbc:postgresql://localhost:55432/bookshop</codegen.jdbc.url>
|
|
</properties>
|
|
|
|
<dependencies>
|
|
<dependency>
|
|
<groupId>org.springframework.boot</groupId>
|
|
<artifactId>spring-boot-starter-jooq</artifactId>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>org.springframework.boot</groupId>
|
|
<artifactId>spring-boot-starter-flyway</artifactId>
|
|
</dependency>
|
|
<!-- Flyway 10+ ships database support as separate modules; without this: "Unsupported Database: PostgreSQL 17.12" -->
|
|
<dependency>
|
|
<groupId>org.flywaydb</groupId>
|
|
<artifactId>flyway-database-postgresql</artifactId>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>org.postgresql</groupId>
|
|
<artifactId>postgresql</artifactId>
|
|
<scope>runtime</scope>
|
|
</dependency>
|
|
|
|
<dependency>
|
|
<groupId>org.springframework.boot</groupId>
|
|
<artifactId>spring-boot-starter-jooq-test</artifactId>
|
|
<scope>test</scope>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>org.springframework.boot</groupId>
|
|
<artifactId>spring-boot-starter-flyway-test</artifactId>
|
|
<scope>test</scope>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>org.springframework.boot</groupId>
|
|
<artifactId>spring-boot-testcontainers</artifactId>
|
|
<scope>test</scope>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>org.testcontainers</groupId>
|
|
<artifactId>testcontainers-postgresql</artifactId>
|
|
<scope>test</scope>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>org.testcontainers</groupId>
|
|
<artifactId>testcontainers-junit-jupiter</artifactId>
|
|
<scope>test</scope>
|
|
</dependency>
|
|
<!-- The generator itself, used by the drift test to regenerate into a temp dir and diff -->
|
|
<dependency>
|
|
<groupId>org.jooq</groupId>
|
|
<artifactId>jooq-codegen</artifactId>
|
|
<scope>test</scope>
|
|
</dependency>
|
|
</dependencies>
|
|
|
|
<build>
|
|
<plugins>
|
|
<plugin>
|
|
<groupId>org.springframework.boot</groupId>
|
|
<artifactId>spring-boot-maven-plugin</artifactId>
|
|
</plugin>
|
|
</plugins>
|
|
</build>
|
|
|
|
<profiles>
|
|
<!-- mvn -Pcodegen flyway:migrate jooq-codegen:generate (driven by scripts/codegen.sh) -->
|
|
<profile>
|
|
<id>codegen</id>
|
|
<build>
|
|
<plugins>
|
|
<plugin>
|
|
<groupId>org.flywaydb</groupId>
|
|
<artifactId>flyway-maven-plugin</artifactId>
|
|
<version>${flyway.version}</version>
|
|
<configuration>
|
|
<url>${codegen.jdbc.url}</url>
|
|
<user>bookshop</user>
|
|
<password>bookshop</password>
|
|
<locations>
|
|
<location>filesystem:src/main/resources/db/migration</location>
|
|
</locations>
|
|
</configuration>
|
|
<dependencies>
|
|
<dependency>
|
|
<groupId>org.flywaydb</groupId>
|
|
<artifactId>flyway-database-postgresql</artifactId>
|
|
<version>${flyway.version}</version>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>org.postgresql</groupId>
|
|
<artifactId>postgresql</artifactId>
|
|
<version>${postgresql.version}</version>
|
|
</dependency>
|
|
</dependencies>
|
|
</plugin>
|
|
<plugin>
|
|
<groupId>org.jooq</groupId>
|
|
<artifactId>jooq-codegen-maven</artifactId>
|
|
<version>${jooq.version}</version>
|
|
<dependencies>
|
|
<dependency>
|
|
<groupId>org.postgresql</groupId>
|
|
<artifactId>postgresql</artifactId>
|
|
<version>${postgresql.version}</version>
|
|
</dependency>
|
|
</dependencies>
|
|
<configuration>
|
|
<jdbc>
|
|
<url>${codegen.jdbc.url}</url>
|
|
<user>bookshop</user>
|
|
<password>bookshop</password>
|
|
</jdbc>
|
|
<generator>
|
|
<database>
|
|
<name>org.jooq.meta.postgres.PostgresDatabase</name>
|
|
<inputSchema>public</inputSchema>
|
|
<excludes>flyway_schema_history</excludes>
|
|
</database>
|
|
<generate>
|
|
<pojos>true</pojos>
|
|
<pojosAsJavaRecordClasses>true</pojosAsJavaRecordClasses>
|
|
<daos>false</daos>
|
|
<generatedAnnotation>false</generatedAnnotation>
|
|
<deprecated>false</deprecated>
|
|
</generate>
|
|
<target>
|
|
<packageName>com.ankurm.jooq.generated</packageName>
|
|
<directory>src/main/java</directory>
|
|
</target>
|
|
</generator>
|
|
</configuration>
|
|
</plugin>
|
|
</plugins>
|
|
</build>
|
|
</profile>
|
|
</profiles>
|
|
</project>
|