<!--
  ~ Copyright (C) Red Gate Software Ltd 2010-2021
  ~ Copyright 2022 The MigrateDB contributors
  ~
  ~ Licensed under the Apache License, Version 2.0 (the "License");
  ~ you may not use this file except in compliance with the License.
  ~ You may obtain a copy of the License at
  ~
  ~         http://www.apache.org/licenses/LICENSE-2.0
  ~
  ~ Unless required by applicable law or agreed to in writing, software
  ~ distributed under the License is distributed on an "AS IS" BASIS,
  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  ~ See the License for the specific language governing permissions and
  ~ limitations under the License.
  -->
<project xmlns="http://maven.apache.org/POM/4.0.0">
    <modelVersion>4.0.0</modelVersion>
    <groupId>de.unentscheidbar</groupId>
    <artifactId>migratedb</artifactId>
    <version>0.2.0</version>
    <packaging>pom</packaging>
    <name>MigrateDB</name>
    <description>MigrateDB: Database Migrations, Easy and Free.</description>
    <url>https://github.com/daniel-huss/migratedb</url>

    <licenses>
        <license>
            <name>Apache License, Version 2.0</name>
            <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
        </license>
    </licenses>

    <scm>
        <url>${gitRepository.browsableUrl}</url>
        <connection>scm:git:${gitRepository.url}</connection>
        <developerConnection>scm:git:${gitRepository.url}</developerConnection>
    </scm>

    <developers>
        <developer>
            <name>Daniel Huss</name>
            <url>https://github.com/daniel-huss/</url>
        </developer>
    </developers>

    <modules>
        <module>migratedb-testlib</module>
        <module>migratedb-core</module>
        <module>migratedb-scanner</module>
        <module>migratedb-commandline</module>
        <module>migratedb-integration-tests</module>
        <module>migratedb-maven-plugin</module>
        <module>migratedb-gradle-plugin</module>
        <module>migratedb-test-report-aggregator</module>
    </modules>

    <distributionManagement>
        <snapshotRepository>
            <id>${snapshotRepository.id}</id>
            <name>${snapshotRepository.name}</name>
            <!--suppress UnresolvedMavenProperty -->
            <url>${snapshotRepository.url}</url>
        </snapshotRepository>
        <repository>
            <id>${releaseRepository.id}</id>
            <name>${releaseRepository.name}</name>
            <!--suppress UnresolvedMavenProperty -->
            <url>${releaseRepository.url}</url>
        </repository>
    </distributionManagement>

    <properties>
        <gitRepository.browsableUrl>https://unentscheidbar.de/gitea/hussdl/migratedb</gitRepository.browsableUrl>
        <gitRepository.url>https://unentscheidbar.de/gitea/hussdl/migratedb.git</gitRepository.url>

        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <project.build.outputTimestamp>2022-06-17T01:36:39Z</project.build.outputTimestamp><!-- for reproducible builds -->
        <project.build.generatedSources.directory>${project.build.directory}/generated-sources/codegen
        </project.build.generatedSources.directory>

        <version.aether-provider>3.3.9</version.aether-provider>
        <version.aether>1.1.0</version.aether>
        <version.android>4.1.1.4</version.android>
        <version.apiguardian>1.1.2</version.apiguardian>
        <version.checkerframework>3.21.2</version.checkerframework>
        <version.commons-codec>1.15</version.commons-codec>
        <version.commons-io>2.11.0</version.commons-io>
        <version.commons-logging>1.2</version.commons-logging>
        <version.groovy>3.0.9</version.groovy>
        <version.gson>2.9.0</version.gson>
        <version.h2.latest>2.1.210</version.h2.latest>
        <version.java>11</version.java>
        <version.jimfs>1.2</version.jimfs>
        <version.jqwik>1.6.5</version.jqwik>
        <version.jtds>1.3.1</version.jtds>
        <version.junit>5.8.2</version.junit>
        <version.kotest>5.1.0</version.kotest>
        <version.kotlin>1.7.0</version.kotlin>
        <version.logback>1.2.8</version.logback>
        <version.maven-api>3.8.4</version.maven-api>
        <version.p6spy>3.9.1</version.p6spy>
        <version.slf4j>1.7.30</version.slf4j>
        <version.spring-jdbc>4.3.30.RELEASE</version.spring-jdbc>
        <version.testcontainers>1.17.1</version.testcontainers>
        <version.jacoco>0.8.8</version.jacoco>
    </properties>

    <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>org.testcontainers</groupId>
                <artifactId>testcontainers-bom</artifactId>
                <version>${version.testcontainers}</version>
                <type>pom</type>
                <scope>import</scope>
            </dependency>
            <dependency>
                <groupId>org.junit</groupId>
                <artifactId>junit-bom</artifactId>
                <version>${version.junit}</version>
                <type>pom</type>
                <scope>import</scope>
            </dependency>
            <dependency>
                <groupId>org.jetbrains.kotlin</groupId>
                <artifactId>kotlin-bom</artifactId>
                <version>${version.kotlin}</version>
                <type>pom</type>
                <scope>import</scope>
            </dependency>
            <dependency>
                <groupId>org.apiguardian</groupId>
                <artifactId>apiguardian-api</artifactId>
                <version>${version.apiguardian}</version>
            </dependency>
            <dependency>
                <groupId>org.checkerframework</groupId>
                <artifactId>checker-qual</artifactId>
                <version>${version.checkerframework}</version>
            </dependency>
            <dependency>
                <groupId>org.codehaus.groovy</groupId>
                <artifactId>groovy-ant</artifactId>
                <version>${version.groovy}</version>
            </dependency>
            <dependency>
                <groupId>com.google.android</groupId>
                <artifactId>android</artifactId>
                <version>${version.android}</version>
            </dependency>
            <dependency>
                <groupId>commons-logging</groupId>
                <artifactId>commons-logging</artifactId>
                <version>${version.commons-logging}</version>
            </dependency>
            <dependency>
                <groupId>org.slf4j</groupId>
                <artifactId>slf4j-api</artifactId>
                <version>${version.slf4j}</version>
            </dependency>
            <dependency>
                <groupId>ch.qos.logback</groupId>
                <artifactId>logback-classic</artifactId>
                <version>${version.logback}</version>
            </dependency>
            <dependency>
                <groupId>io.kotest</groupId>
                <artifactId>kotest-assertions-core-jvm</artifactId>
                <version>${version.kotest}</version>
            </dependency>
            <dependency>
                <groupId>org.slf4j</groupId>
                <artifactId>jul-to-slf4j</artifactId>
                <version>${version.slf4j}</version>
            </dependency>
            <dependency>
                <groupId>net.jqwik</groupId>
                <artifactId>jqwik-kotlin</artifactId>
                <version>${version.jqwik}</version>
            </dependency>
            <dependency>
                <groupId>commons-io</groupId>
                <artifactId>commons-io</artifactId>
                <version>${version.commons-io}</version>
            </dependency>
            <dependency>
                <groupId>org.eclipse.aether</groupId>
                <artifactId>aether-impl</artifactId>
                <version>${version.aether}</version>
            </dependency>
            <dependency>
                <groupId>org.apache.maven</groupId>
                <artifactId>maven-aether-provider</artifactId>
                <version>${version.aether-provider}</version>
            </dependency>
            <dependency>
                <groupId>org.eclipse.aether</groupId>
                <artifactId>aether-connector-basic</artifactId>
                <version>${version.aether}</version>
            </dependency>
            <dependency>
                <groupId>org.eclipse.aether</groupId>
                <artifactId>aether-transport-file</artifactId>
                <version>${version.aether}</version>
            </dependency>
            <dependency>
                <groupId>org.eclipse.aether</groupId>
                <artifactId>aether-transport-http</artifactId>
                <version>${version.aether}</version>
            </dependency>
            <dependency>
                <groupId>com.google.jimfs</groupId>
                <artifactId>jimfs</artifactId>
                <version>${version.jimfs}</version>
            </dependency>
            <dependency>
                <groupId>org.springframework</groupId>
                <artifactId>spring-jdbc</artifactId>
                <version>${version.spring-jdbc}</version>
            </dependency>
        </dependencies>
    </dependencyManagement>

    <build>
        <pluginManagement>
            <plugins>
                <plugin>
                    <groupId>org.codehaus.gmavenplus</groupId>
                    <artifactId>gmavenplus-plugin</artifactId>
                    <version>1.13.1</version>
                    <executions>
                        <execution>
                            <!-- In child modules, bind this to a phase like generate-sources to run code generation -->
                            <id>codegen</id>
                            <inherited>true</inherited>
                            <phase>none</phase>
                            <goals>
                                <goal>execute</goal>
                            </goals>
                            <configuration>
                                <scripts>
                                    <script>file://localhost/${project.basedir}/src/build/codegen.groovy</script>
                                </scripts>
                            </configuration>
                        </execution>
                    </executions>
                </plugin>
                <plugin>
                    <artifactId>kotlin-maven-plugin</artifactId>
                    <groupId>org.jetbrains.kotlin</groupId>
                    <version>${version.kotlin}</version>
                    <executions>
                        <execution>
                            <inherited>true</inherited>
                            <id>compile</id>
                            <goals>
                                <goal>compile</goal>
                            </goals>
                            <configuration>
                                <sourceDirs>
                                    <sourceDir>${project.build.sourceDirectory}</sourceDir>
                                </sourceDirs>
                            </configuration>
                        </execution>
                        <execution>
                            <inherited>true</inherited>
                            <id>test-compile</id>
                            <goals>
                                <goal>test-compile</goal>
                            </goals>
                            <configuration>
                                <sourceDirs>
                                    <sourceDir>${project.build.testSourceDirectory}</sourceDir>
                                </sourceDirs>
                            </configuration>
                        </execution>
                    </executions>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-compiler-plugin</artifactId>
                    <version>3.8.1</version>
                    <configuration>
                        <source>${version.java}</source>
                        <target>${version.java}</target>
                        <encoding>${project.build.sourceEncoding}</encoding>
                    </configuration>
                    <executions>
                        <execution>
                            <id>default-compile</id>
                            <phase>none</phase>
                        </execution>
                        <execution>
                            <id>default-testCompile</id>
                            <phase>none</phase>
                        </execution>
                        <execution>
                            <id>java-compile</id>
                            <phase>compile</phase>
                            <goals>
                                <goal>compile</goal>
                            </goals>
                        </execution>
                        <execution>
                            <id>java-test-compile</id>
                            <phase>test-compile</phase>
                            <goals>
                                <goal>testCompile</goal>
                            </goals>
                        </execution>
                    </executions>
                </plugin>
                <plugin>
                    <artifactId>maven-assembly-plugin</artifactId>
                    <version>3.3.0</version>
                </plugin>
                <plugin>
                    <artifactId>maven-install-plugin</artifactId>
                    <version>3.0.0-M1</version>
                </plugin>
                <plugin>
                    <artifactId>maven-deploy-plugin</artifactId>
                    <version>3.0.0-M2</version>
                    <configuration>
                        <deployAtEnd>true</deployAtEnd>
                        <retryFailedDeploymentCount>2</retryFailedDeploymentCount>
                    </configuration>
                </plugin>
                <plugin>
                    <artifactId>maven-jar-plugin</artifactId>
                    <version>3.2.0</version>
                </plugin>
                <plugin>
                    <artifactId>maven-surefire-plugin</artifactId>
                    <version>3.0.0-M6</version>
                    <configuration>
                        <excludes combine.children="override">
                            <!-- No need to exclude anything -->
                        </excludes>
                    </configuration>
                </plugin>
                <plugin>
                    <artifactId>maven-failsafe-plugin</artifactId>
                    <version>3.0.0-M6</version>
                    <executions>
                        <execution>
                            <goals>
                                <goal>integration-test</goal>
                                <goal>verify</goal>
                            </goals>
                        </execution>
                    </executions>
                </plugin>
                <plugin>
                    <groupId>org.apache.felix</groupId>
                    <artifactId>maven-bundle-plugin</artifactId>
                    <version>5.1.3</version>
                </plugin>
                <plugin>
                    <artifactId>maven-dependency-plugin</artifactId>
                    <version>3.2.0</version>
                </plugin>
                <plugin>
                    <artifactId>maven-plugin-plugin</artifactId>
                    <version>3.6.1</version>
                </plugin>
                <plugin>
                    <groupId>org.codehaus.plexus</groupId>
                    <artifactId>plexus-maven-plugin</artifactId>
                    <version>1.3.8</version>
                </plugin>
                <plugin>
                    <groupId>org.codehaus.mojo</groupId>
                    <artifactId>build-helper-maven-plugin</artifactId>
                    <version>3.2.0</version>
                </plugin>
                <plugin>
                    <artifactId>maven-resources-plugin</artifactId>
                    <version>3.2.0</version>
                    <configuration>
                        <encoding>${project.build.sourceEncoding}</encoding>
                        <nonFilteredFileExtensions>
                            <nonFilteredFileExtension>nofilter</nonFilteredFileExtension>
                        </nonFilteredFileExtensions>
                    </configuration>
                    <executions>
                        <execution>
                            <!-- Bind this execution ID to generate-resources in child modules that are deployed to
                                 Maven Central, so LICENSE will be present in every jar. -->
                            <id>copy-license</id>
                            <goals>
                                <goal>copy-resources</goal>
                            </goals>
                            <inherited>true</inherited>
                            <phase>none</phase>
                            <configuration>
                                <resources>
                                    <resource>
                                        <directory>..</directory>
                                        <includes>
                                            <include>LICENSE</include>
                                        </includes>
                                    </resource>
                                </resources>
                                <outputDirectory>${project.build.outputDirectory}/META-INF</outputDirectory>
                            </configuration>
                        </execution>
                    </executions>
                </plugin>
                <plugin>
                    <groupId>org.codehaus.mojo</groupId>
                    <artifactId>versions-maven-plugin</artifactId>
                    <version>2.10.0</version>
                    <configuration>
                        <generateBackupPoms>false</generateBackupPoms>
                    </configuration>
                </plugin>
                <plugin>
                    <artifactId>maven-javadoc-plugin</artifactId>
                    <version>3.4.0</version>
                    <configuration>
                        <encoding>${project.build.sourceEncoding}</encoding>
                        <breakiterator>true</breakiterator>
                        <detectOfflineLinks>false</detectOfflineLinks>
                        <locale>en</locale>
                        <notimestamp>true</notimestamp>
                        <skip>true</skip><!-- Only "needed" when deploying to Maven Central -->
                    </configuration>
                </plugin>
            </plugins>
        </pluginManagement>
        <plugins>
            <plugin>
                <artifactId>maven-source-plugin</artifactId>
                <version>3.2.1</version>
                <executions>
                    <execution>
                        <id>attach-sources</id>
                        <phase>verify</phase>
                        <goals>
                            <goal>jar-no-fork</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <artifactId>maven-gpg-plugin</artifactId>
                <version>3.0.1</version>
                <executions>
                    <execution>
                        <id>sign-artifacts</id>
                        <phase>verify</phase>
                        <goals>
                            <goal>sign</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.jacoco</groupId>
                <artifactId>jacoco-maven-plugin</artifactId>
                <version>${version.jacoco}</version>
                <executions>
                    <execution>
                        <goals>
                            <goal>prepare-agent</goal>
                            <goal>prepare-agent-integration</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>

    <dependencies>
        <dependency>
            <!-- This is just for code generation during the build -->
            <groupId>org.codehaus.groovy</groupId>
            <artifactId>groovy-ant</artifactId>
            <scope>test</scope>
        </dependency>
    </dependencies>

    <profiles>
        <profile>
            <id>mavenCentral</id>
            <properties>
                <snapshotRepository.id>ossrh</snapshotRepository.id>
                <snapshotRepository.name>Maven Central Snapshots (Staging)</snapshotRepository.name>
                <snapshotRepository.url>https://s01.oss.sonatype.org/content/repositories/snapshots
                </snapshotRepository.url>

                <releaseRepository.id>ossrh</releaseRepository.id>
                <releaseRepository.name>Maven Central Releases (Staging)</releaseRepository.name>
                <releaseRepository.url>https://s01.oss.sonatype.org/service/local/staging/deploy/maven2
                </releaseRepository.url>
            </properties>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.sonatype.plugins</groupId>
                        <artifactId>nexus-staging-maven-plugin</artifactId>
                        <version>1.6.12</version>
                        <extensions>true</extensions>
                        <configuration>
                            <serverId>ossrh</serverId>
                            <nexusUrl>https://s01.oss.sonatype.org/</nexusUrl>
                            <autoReleaseAfterClose>false</autoReleaseAfterClose>
                        </configuration>
                    </plugin>
                    <plugin>
                        <artifactId>maven-javadoc-plugin</artifactId>
                        <executions>
                            <execution>
                                <goals>
                                    <goal>javadoc-no-fork</goal>
                                    <goal>jar</goal>
                                </goals>
                                <phase>process-classes</phase>
                            </execution>
                        </executions>
                        <configuration>
                            <skip>false</skip>
                        </configuration>
                    </plugin>
                    <plugin>
                        <artifactId>maven-gpg-plugin</artifactId>
                        <configuration>
                            <skip>false</skip>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>
</project>
