114 lines
4.1 KiB
XML
114 lines
4.1 KiB
XML
<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.jooq</groupId>
|
|
<artifactId>jooq-examples</artifactId>
|
|
<version>3.17.0-SNAPSHOT</version>
|
|
</parent>
|
|
|
|
<artifactId>jooq-flyway-example</artifactId>
|
|
<name>jOOQ Flyway Example</name>
|
|
|
|
<licenses>
|
|
<license>
|
|
<name>Apache License, Version 2.0</name>
|
|
<url>http://www.jooq.org/inc/LICENSE.txt</url>
|
|
<distribution>repo</distribution>
|
|
</license>
|
|
</licenses>
|
|
|
|
<properties>
|
|
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
|
<org.springframework.version>3.2.6.RELEASE</org.springframework.version>
|
|
|
|
<db.url>jdbc:h2:~/jooq-flyway-example-2</db.url>
|
|
<db.username>sa</db.username>
|
|
</properties>
|
|
|
|
<dependencies>
|
|
|
|
<!-- Database access -->
|
|
<dependency>
|
|
<groupId>org.jooq</groupId>
|
|
<artifactId>jooq</artifactId>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>com.h2database</groupId>
|
|
<artifactId>h2</artifactId>
|
|
</dependency>
|
|
|
|
<!-- Testing -->
|
|
<dependency>
|
|
<groupId>junit</groupId>
|
|
<artifactId>junit</artifactId>
|
|
<scope>test</scope>
|
|
</dependency>
|
|
</dependencies>
|
|
|
|
<build>
|
|
<plugins>
|
|
<plugin>
|
|
<groupId>org.apache.maven.plugins</groupId>
|
|
<artifactId>maven-compiler-plugin</artifactId>
|
|
</plugin>
|
|
|
|
<plugin>
|
|
<groupId>org.flywaydb</groupId>
|
|
<artifactId>flyway-maven-plugin</artifactId>
|
|
<version>8.3.0</version>
|
|
<executions>
|
|
<execution>
|
|
<phase>generate-sources</phase>
|
|
<goals>
|
|
<goal>migrate</goal>
|
|
</goals>
|
|
</execution>
|
|
</executions>
|
|
<configuration>
|
|
<url>${db.url}</url>
|
|
<user>${db.username}</user>
|
|
<locations>
|
|
<location>filesystem:src/main/resources/db/migration</location>
|
|
</locations>
|
|
</configuration>
|
|
</plugin>
|
|
|
|
<plugin>
|
|
<groupId>org.jooq</groupId>
|
|
<artifactId>jooq-codegen-maven</artifactId>
|
|
|
|
<executions>
|
|
<execution>
|
|
<id>java-generator</id>
|
|
<phase>generate-sources</phase>
|
|
<goals>
|
|
<goal>generate</goal>
|
|
</goals>
|
|
|
|
<configuration>
|
|
<jdbc>
|
|
<url>${db.url}</url>
|
|
<user>${db.username}</user>
|
|
</jdbc>
|
|
<generator>
|
|
<database>
|
|
<includes>.*</includes>
|
|
<inputSchema>FLYWAY_TEST</inputSchema>
|
|
<catalogVersionProvider>SELECT :schema_name || '_' || MAX("version") FROM "flyway_schema_history"</catalogVersionProvider>
|
|
<schemaVersionProvider>SELECT :schema_name || '_' || MAX("version") FROM "flyway_schema_history"</schemaVersionProvider>
|
|
</database>
|
|
<target>
|
|
<packageName>org.jooq.example.flyway.j.db.h2</packageName>
|
|
<directory>target/generated-sources/jooq-h2-java</directory>
|
|
</target>
|
|
</generator>
|
|
</configuration>
|
|
</execution>
|
|
</executions>
|
|
</plugin>
|
|
</plugins>
|
|
</build>
|
|
</project> |