<?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>

    <groupId>com.github.sabomichal</groupId>
    <artifactId>jooq-meta-postgres-flyway</artifactId>
    <version>1.0.9</version>

    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    </properties>

    <dependencies>
        <dependency>
            <groupId>org.jooq</groupId>
            <artifactId>jooq-meta</artifactId>
            <version>3.16.6</version>
        </dependency>
        <dependency>
            <groupId>org.flywaydb</groupId>
            <artifactId>flyway-core</artifactId>
            <version>9.2.2</version>
        </dependency>
        <dependency>
            <groupId>org.testcontainers</groupId>
            <artifactId>postgresql</artifactId>
            <version>1.17.3</version>
        </dependency>
        <dependency>
            <groupId>org.postgresql</groupId>
            <artifactId>postgresql</artifactId>
            <version>42.5.0</version>
        </dependency>
    </dependencies>

    <build>
        <pluginManagement>
            <plugins>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-compiler-plugin</artifactId>
                    <version>3.10.1</version>
                    <configuration>
                        <release>8</release>
                        <debug>true</debug>
                        <optimize>true</optimize>
                        <showDeprecation>true</showDeprecation>
                        <showWarnings>true</showWarnings>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-jar-plugin</artifactId>
                    <version>3.2.2</version>
                    <configuration>
                        <archive>
                            <index>true</index>
                            <addMavenDescriptor>false</addMavenDescriptor>
                            <compress>true</compress>
                            <manifestEntries>
                                <Build-Date>${buildNumber}</Build-Date>
                                <Maven-Version>${maven.version}</Maven-Version>
                            </manifestEntries>
                        </archive>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-source-plugin</artifactId>
                    <version>3.2.1</version>
                    <configuration>
                        <archive>
                            <index>true</index>
                            <addMavenDescriptor>false</addMavenDescriptor>
                            <compress>true</compress>
                            <manifestEntries>
                                <Build-Date>${buildNumber}</Build-Date>
                                <Maven-Version>${maven.version}</Maven-Version>
                            </manifestEntries>
                        </archive>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>org.codehaus.mojo</groupId>
                    <artifactId>build-helper-maven-plugin</artifactId>
                    <version>3.3.0</version>
                    <executions>
                        <execution>
                            <id>default-maven-version</id>
                            <phase>initialize</phase>
                            <goals>
                                <goal>maven-version</goal>
                            </goals>
                        </execution>
                        <execution>
                            <id>default-timestamp-property</id>
                            <phase>initialize</phase>
                            <goals>
                                <goal>timestamp-property</goal>
                            </goals>
                            <configuration>
                                <name>buildNumber</name>
                                <locale>en</locale>
                                <pattern>yyyy-MM-dd'T'HH:mm:ssZ</pattern>
                            </configuration>
                        </execution>
                        <execution>
                            <id>default-attach-artifact</id>
                            <inherited>false</inherited>
                            <phase>prepare-package</phase>
                            <goals>
                                <goal>attach-artifact</goal>
                            </goals>
                            <configuration>
                                <artifacts>
                                    <artifact>
                                        <file>${basedir}/LICENSE</file>
                                        <classifier>license</classifier>
                                        <type>txt</type>
                                    </artifact>
                                </artifacts>
                            </configuration>
                        </execution>
                    </executions>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-release-plugin</artifactId>
                    <version>2.5.3</version>
                </plugin>
            </plugins>
        </pluginManagement>
        <plugins>
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>build-helper-maven-plugin</artifactId>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-release-plugin</artifactId>
                <configuration>
                    <arguments>-Dgpg.passphrase=${gpg.passphrase}</arguments>
                </configuration>
            </plugin>
        </plugins>
    </build>

    <profiles>
        <profile>
            <id>release-sign-artifacts</id>
            <activation>
                <property>
                    <name>performRelease</name>
                    <value>true</value>
                </property>
            </activation>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-gpg-plugin</artifactId>
                        <version>3.0.1</version>
                        <configuration>
                            <passphrase>${gpg.passphrase}</passphrase>
                        </configuration>
                        <executions>
                            <execution>
                                <id>sign-artifacts</id>
                                <phase>verify</phase>
                                <goals>
                                    <goal>sign</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>

    <name>jooq-meta-postgres-flyway</name>
    <description>jOOQ code generation meta database spinning up the PostgreSQL database using docker image and migrating its schema using Flyway</description>
    <url>https://github.com/sabomichal/jooq-meta-postgres-flyway</url>
    <inceptionYear>2020</inceptionYear>

    <issueManagement>
        <system>GitHub</system>
        <url>https://github.com/sabomichal/jooq-meta-postgres-flyway/issues</url>
    </issueManagement>

    <licenses>
        <license>
            <name>Apache License 2.0</name>
            <url>https://opensource.org/licenses/Apache-2.0</url>
            <distribution>repo</distribution>
        </license>
    </licenses>

    <developers>
        <developer>
            <id>sabo</id>
            <name>Michal Sabo</name>
            <email>sabo.michal@gmail.com</email>
        </developer>
    </developers>

    <scm>
        <connection>scm:git:https://github.com/sabomichal/jooq-meta-postgres-flyway.git</connection>
        <developerConnection>scm:git:git@github.com:sabomichal/jooq-meta-postgres-flyway.git</developerConnection>
        <url>https://github.com/sabomichal/jooq-meta-postgres-flyway</url>
        <tag>v1.0.9</tag>
    </scm>

    <distributionManagement>
        <snapshotRepository>
            <id>sonatype-nexus-snapshots</id>
            <name>Sonatype Nexus snapshot repository</name>
            <url>https://oss.sonatype.org/content/repositories/snapshots</url>
        </snapshotRepository>
        <repository>
            <id>sonatype-nexus-staging</id>
            <name>Sonatype Nexus release repository</name>
            <url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
        </repository>
    </distributionManagement>

</project>