203 lines
7.7 KiB
XML
203 lines
7.7 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>
|
|
|
|
<groupId>org.jooq</groupId>
|
|
<artifactId>jooq-flyway-example</artifactId>
|
|
<version>1.0</version>
|
|
<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>
|
|
<org.jooq.version>3.12.0-SNAPSHOT</org.jooq.version>
|
|
<org.h2.version>1.4.199</org.h2.version>
|
|
<scala.version>2.12.8</scala.version>
|
|
|
|
<db.url>jdbc:h2:~/flyway-test</db.url>
|
|
<db.username>sa</db.username>
|
|
</properties>
|
|
|
|
<dependencies>
|
|
|
|
<!-- Database access -->
|
|
<dependency>
|
|
<groupId>org.jooq</groupId>
|
|
<artifactId>jooq</artifactId>
|
|
<version>${org.jooq.version}</version>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>com.h2database</groupId>
|
|
<artifactId>h2</artifactId>
|
|
<version>${org.h2.version}</version>
|
|
</dependency>
|
|
|
|
<!-- Logging -->
|
|
<dependency>
|
|
<groupId>org.apache.logging.log4j</groupId>
|
|
<artifactId>log4j-slf4j-impl</artifactId>
|
|
<version>2.11.0</version>
|
|
</dependency>
|
|
|
|
<!-- Run Scala tests -->
|
|
<dependency>
|
|
<groupId>org.scala-lang</groupId>
|
|
<artifactId>scala-library</artifactId>
|
|
<version>${scala.version}</version>
|
|
<scope>provided</scope>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>org.scala-lang</groupId>
|
|
<artifactId>scala-compiler</artifactId>
|
|
<version>${scala.version}</version>
|
|
<scope>test</scope>
|
|
</dependency>
|
|
|
|
<!-- Testing -->
|
|
<dependency>
|
|
<groupId>junit</groupId>
|
|
<artifactId>junit</artifactId>
|
|
<version>4.12</version>
|
|
<scope>test</scope>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>org.scalatest</groupId>
|
|
<artifactId>scalatest_2.12</artifactId>
|
|
<version>3.0.4</version>
|
|
<scope>test</scope>
|
|
</dependency>
|
|
</dependencies>
|
|
|
|
<build>
|
|
<plugins>
|
|
<plugin>
|
|
<groupId>org.apache.maven.plugins</groupId>
|
|
<artifactId>maven-compiler-plugin</artifactId>
|
|
<version>3.8.0</version>
|
|
<configuration>
|
|
<fork>true</fork>
|
|
<maxmem>1024m</maxmem>
|
|
<meminitial>256m</meminitial>
|
|
<encoding>UTF-8</encoding>
|
|
|
|
<release>11</release>
|
|
|
|
|
|
<!-- IntelliJ needs these https://youtrack.jetbrains.com/issue/IDEA-195472 -->
|
|
<source>11</source>
|
|
<target>11</target>
|
|
|
|
<debug>true</debug>
|
|
<debuglevel>lines,vars,source</debuglevel>
|
|
</configuration>
|
|
</plugin>
|
|
|
|
<!-- The Scala compiler plugin -->
|
|
<plugin>
|
|
<groupId>org.scala-tools</groupId>
|
|
<artifactId>maven-scala-plugin</artifactId>
|
|
<version>2.15.2</version>
|
|
<executions>
|
|
<execution>
|
|
<goals>
|
|
<goal>compile</goal>
|
|
<goal>testCompile</goal>
|
|
</goals>
|
|
</execution>
|
|
</executions>
|
|
</plugin>
|
|
|
|
<plugin>
|
|
<groupId>org.flywaydb</groupId>
|
|
<artifactId>flyway-maven-plugin</artifactId>
|
|
<version>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>
|
|
<version>${org.jooq.version}</version>
|
|
|
|
<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 "schema_version"</catalogVersionProvider>
|
|
<schemaVersionProvider>SELECT :schema_name || '_' || MAX("version") FROM "schema_version"</schemaVersionProvider>
|
|
</database>
|
|
<target>
|
|
<packageName>org.jooq.example.flyway.j.db.h2</packageName>
|
|
<directory>target/generated-sources/jooq-h2-java</directory>
|
|
</target>
|
|
</generator>
|
|
</configuration>
|
|
</execution>
|
|
|
|
<execution>
|
|
<id>scala-generator</id>
|
|
<phase>generate-sources</phase>
|
|
<goals>
|
|
<goal>generate</goal>
|
|
</goals>
|
|
|
|
<configuration>
|
|
<jdbc>
|
|
<url>${db.url}</url>
|
|
<user>${db.username}</user>
|
|
</jdbc>
|
|
<generator>
|
|
<name>org.jooq.codegen.ScalaGenerator</name>
|
|
<database>
|
|
<includes>.*</includes>
|
|
<inputSchema>FLYWAY_TEST</inputSchema>
|
|
<schemaVersionProvider>SELECT :schema_name || '_' || MAX("version") FROM "schema_version"</schemaVersionProvider>
|
|
</database>
|
|
<target>
|
|
<packageName>org.jooq.example.flyway.s.db.h2</packageName>
|
|
<directory>target/generated-sources/jooq-h2-scala</directory>
|
|
</target>
|
|
</generator>
|
|
</configuration>
|
|
</execution>
|
|
</executions>
|
|
</plugin>
|
|
</plugins>
|
|
</build>
|
|
</project> |