<?xml version="1.0" encoding="UTF-8"?>
<!--
~   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" 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>
        <artifactId>basepom-oss</artifactId>
        <groupId>org.basepom</groupId>
        <version>27</version>
    </parent>

    <groupId>org.jdbi</groupId>
    <artifactId>jdbi3-parent</artifactId>
    <version>3.5.1</version>
    <packaging>pom</packaging>
    <name>jdbi3 Parent</name>
    <description>Jdbi is designed to provide convenient tabular data access in
        Java(tm). It uses the Java collections framework for query
        results, provides a convenient means of externalizing sql
        statements, and provides named parameter support for any database
        being used.</description>
    <url>http://jdbi.org/</url>

    <licenses>
        <license>
            <name>Apache License 2.0</name>
            <url>http://www.apache.org/licenses/LICENSE-2.0.html</url>
            <distribution>repo</distribution>
        </license>
    </licenses>

    <modules>
        <module>core</module>
        <module>sqlobject</module>
        <module>stringtemplate4</module>
        <module>commons-text</module>
        <module>freemarker</module>
        <module>guava</module>
        <module>jodatime2</module>
        <module>jpa</module>
        <module>postgres</module>
        <module>spring4</module>
        <module>docs</module>
        <module>kotlin</module>
        <module>kotlin-sqlobject</module>
        <module>bom</module>
        <module>noparameters</module>
        <module>vavr</module>
        <module>sqlite</module>
        <module>testing</module>
    </modules>

    <scm>
        <connection>scm:git:git://github.com/jdbi/jdbi.git</connection>
        <developerConnection>scm:git:git@github.com:jdbi/jdbi.git</developerConnection>
        <tag>v3.5.1</tag>
        <url>https://github.com/jdbi/jdbi/</url>
    </scm>

    <properties>

        <basepom.check.fail-all>true</basepom.check.fail-all>
        <basepom.maven.version>3.2.5</basepom.maven.version>

        <basepom.release.profiles>basepom.oss-release,oracle</basepom.release.profiles>
        <basepom.test.fork-count>4</basepom.test.fork-count>
        <basepom.test.reuse-vm>true</basepom.test.reuse-vm>
        <basepom.test.timeout>240</basepom.test.timeout>

        <dep.antlr.version>3.4</dep.antlr.version>
        <dep.checkstyle.version>8.10</dep.checkstyle.version>
        <dep.dokka.version>0.9.17</dep.dokka.version>
        <dep.jetbrainsAnnotations.version>13.0</dep.jetbrainsAnnotations.version>
        <dep.kotlin.version>1.2.31</dep.kotlin.version>
        <dep.oracle.version>12.1.0.2</dep.oracle.version>
        <dep.plugin.checkstyle.version>3.0.0</dep.plugin.checkstyle.version>
        <dep.plugin.pmd.version>3.9.0</dep.plugin.pmd.version>
        <dep.plugin.sortpom.version>2.8.0</dep.plugin.sortpom.version>
        <dep.pmd.version>6.0.1</dep.pmd.version>
        <dep.slf4j.version>1.7.25</dep.slf4j.version>
        <dep.spring.version>4.2.4.RELEASE</dep.spring.version>
        <kotlin.compiler.jvmTarget>1.8</kotlin.compiler.jvmTarget>
        <project.build.targetJdk>1.8</project.build.targetJdk>
    </properties>

    <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>org.jdbi</groupId>
                <artifactId>jdbi3-core</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>org.jdbi</groupId>
                <artifactId>jdbi3-core</artifactId>
                <version>${project.version}</version>
                <classifier>tests</classifier>
            </dependency>

            <dependency>
                <groupId>org.jdbi</groupId>
                <artifactId>jdbi3-commons-text</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>org.jdbi</groupId>
                <artifactId>jdbi3-freemarker</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>org.jdbi</groupId>
                <artifactId>jdbi3-guava</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>org.jdbi</groupId>
                <artifactId>jdbi3-jodatime2</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>org.jdbi</groupId>
                <artifactId>jdbi3-jpa</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>org.jdbi</groupId>
                <artifactId>jdbi3-kotlin</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>org.jdbi</groupId>
                <artifactId>jdbi3-kotlin-sqlobject</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>org.jdbi</groupId>
                <artifactId>jdbi3-oracle12</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>org.jdbi</groupId>
                <artifactId>jdbi3-postgres</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>org.jdbi</groupId>
                <artifactId>jdbi3-postgres</artifactId>
                <version>${project.version}</version>
                <classifier>tests</classifier>
            </dependency>
            <dependency>
                <groupId>org.jdbi</groupId>
                <artifactId>jdbi3-spring4</artifactId>
                <version>${project.version}</version>
                <exclusions>
                    <exclusion>
                        <artifactId>commons-logging</artifactId>
                        <groupId>commons-logging</groupId>
                    </exclusion>
                </exclusions>
            </dependency>
            <dependency>
                <groupId>org.jdbi</groupId>
                <artifactId>jdbi3-sqlite</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>org.jdbi</groupId>
                <artifactId>jdbi3-sqlobject</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>org.jdbi</groupId>
                <artifactId>jdbi3-sqlobject</artifactId>
                <version>${project.version}</version>
                <classifier>tests</classifier>
            </dependency>
            <dependency>
                <groupId>org.jdbi</groupId>
                <artifactId>jdbi3-stringtemplate4</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>org.jdbi</groupId>
                <artifactId>jdbi3-testing</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>org.jdbi</groupId>
                <artifactId>jdbi3-vavr</artifactId>
                <version>${project.version}</version>
            </dependency>

            <dependency>
                <groupId>com.google.guava</groupId>
                <artifactId>guava</artifactId>
                <version>21.0</version>
            </dependency>
            <dependency>
                <groupId>io.vavr</groupId>
                <artifactId>vavr</artifactId>
                <version>0.9.1</version>
            </dependency>

            <dependency>
                <groupId>net.jodah</groupId>
                <artifactId>expiringmap</artifactId>
                <version>0.5.6</version>
            </dependency>

            <dependency>
                <groupId>org.antlr</groupId>
                <artifactId>antlr-runtime</artifactId>
                <version>${dep.antlr.version}</version>
            </dependency>

            <dependency>
                <groupId>org.springframework</groupId>
                <artifactId>spring-jdbc</artifactId>
                <version>${dep.spring.version}</version>
            </dependency>

            <dependency>
                <groupId>org.springframework</groupId>
                <artifactId>spring-beans</artifactId>
                <version>${dep.spring.version}</version>
            </dependency>

            <dependency>
                <groupId>org.springframework</groupId>
                <artifactId>spring-tx</artifactId>
                <version>${dep.spring.version}</version>
            </dependency>

            <dependency>
                <groupId>org.springframework</groupId>
                <artifactId>spring-context</artifactId>
                <version>${dep.spring.version}</version>
            </dependency>

            <dependency>
                <groupId>org.apache.commons</groupId>
                <artifactId>commons-jexl</artifactId>
                <version>2.1.1</version>
                <exclusions>
                    <exclusion>
                        <artifactId>commons-logging</artifactId>
                        <groupId>commons-logging</groupId>
                    </exclusion>
                </exclusions>
            </dependency>

            <dependency>
                <groupId>org.springframework</groupId>
                <artifactId>spring-test</artifactId>
                <version>${dep.spring.version}</version>
            </dependency>

            <dependency>
                <groupId>com.h2database</groupId>
                <artifactId>h2</artifactId>
                <version>1.3.173</version>
            </dependency>

            <dependency>
                <groupId>org.hsqldb</groupId>
                <artifactId>hsqldb</artifactId>
                <version>2.3.2</version>
            </dependency>

            <dependency>
                <groupId>org.postgresql</groupId>
                <artifactId>postgresql</artifactId>
                <version>42.2.2</version>
            </dependency>

            <dependency>
                <groupId>com.opentable.components</groupId>
                <artifactId>otj-pg-embedded</artifactId>
                <version>0.11.3</version>
            </dependency>

            <dependency>
                <groupId>com.oracle.jdbc</groupId>
                <artifactId>ojdbc7</artifactId>
                <version>${dep.oracle.version}</version>
            </dependency>
            <dependency>
                <groupId>com.oracle.jdbc</groupId>
                <artifactId>oraclepki</artifactId>
                <version>${dep.oracle.version}</version>
            </dependency>

            <dependency>
                <groupId>org.slf4j</groupId>
                <artifactId>slf4j-api</artifactId>
                <version>${dep.slf4j.version}</version>
            </dependency>
            <dependency>
                <groupId>org.slf4j</groupId>
                <artifactId>slf4j-simple</artifactId>
                <version>${dep.slf4j.version}</version>
            </dependency>

            <dependency>
                <groupId>junit</groupId>
                <artifactId>junit</artifactId>
                <version>4.12</version>
            </dependency>

            <dependency>
                <groupId>org.mockito</groupId>
                <artifactId>mockito-core</artifactId>
                <version>2.18.3</version>
            </dependency>

            <dependency>
                <groupId>org.assertj</groupId>
                <artifactId>assertj-core</artifactId>
                <version>3.11.1</version>
            </dependency>

            <dependency>
                <groupId>org.assertj</groupId>
                <artifactId>assertj-guava</artifactId>
                <version>3.2.0</version>
            </dependency>

            <dependency>
                <groupId>org.jetbrains</groupId>
                <artifactId>annotations</artifactId>
                <version>${dep.jetbrainsAnnotations.version}</version>
            </dependency>

            <dependency>
                <groupId>org.jetbrains.kotlin</groupId>
                <artifactId>kotlin-stdlib</artifactId>
                <version>${dep.kotlin.version}</version>
            </dependency>

            <dependency>
                <groupId>org.jetbrains.kotlin</groupId>
                <artifactId>kotlin-reflect</artifactId>
                <version>${dep.kotlin.version}</version>
            </dependency>

            <dependency>
                <groupId>org.jetbrains.kotlin</groupId>
                <artifactId>kotlin-test</artifactId>
                <version>${dep.kotlin.version}</version>
            </dependency>

            <dependency>
                <groupId>org.jetbrains.kotlin</groupId>
                <artifactId>kotlin-test-junit</artifactId>
                <version>${dep.kotlin.version}</version>
            </dependency>

            <dependency>
                <groupId>com.nhaarman</groupId>
                <artifactId>mockito-kotlin</artifactId>
                <version>1.3.0</version>
            </dependency>

            <dependency>
                <groupId>org.apache.commons</groupId>
                <artifactId>commons-text</artifactId>
                <version>1.3</version>
            </dependency>

            <!-- commons-text 1.3 wants 3.5, but otj-pg-embedded 0.11.3 wants 3.7 -->
            <dependency>
                <groupId>org.apache.commons</groupId>
                <artifactId>commons-lang3</artifactId>
                <version>3.7</version>
            </dependency>

            <dependency>
                <groupId>org.xerial</groupId>
                <artifactId>sqlite-jdbc</artifactId>
                <version>3.8.11.2</version>
            </dependency>

            <dependency>
                <groupId>org.antlr</groupId>
                <artifactId>stringtemplate</artifactId>
                <version>4.0.2</version>
                <exclusions>
                    <exclusion>
                        <artifactId>antlr-runtime</artifactId>
                        <groupId>org.antlr</groupId>
                    </exclusion>
                </exclusions>
            </dependency>

            <dependency>
                <groupId>javax.annotation</groupId>
                <artifactId>javax.annotation-api</artifactId>
                <version>1.3.1</version>
            </dependency>

            <dependency>
                <groupId>javax.persistence</groupId>
                <artifactId>persistence-api</artifactId>
                <version>1.0.2</version>
            </dependency>

            <dependency>
                <groupId>joda-time</groupId>
                <artifactId>joda-time</artifactId>
                <version>2.9.3</version>
            </dependency>

            <dependency>
                <groupId>org.freemarker</groupId>
                <artifactId>freemarker</artifactId>
                <version>2.3.28</version>
            </dependency>

            <dependency>
                <groupId>com.github.spotbugs</groupId>
                <artifactId>spotbugs-annotations</artifactId>
                <version>${dep.plugin.spotbugs.version}</version>
                <scope>provided</scope>
                <optional>true</optional>
            </dependency>

            <dependency>
                <groupId>com.google.code.findbugs</groupId>
                <artifactId>jsr305</artifactId>
                <version>3.0.2</version>
                <scope>provided</scope>
                <optional>true</optional>
            </dependency>
        </dependencies>
    </dependencyManagement>

    <dependencies>
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-simple</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.assertj</groupId>
            <artifactId>assertj-core</artifactId>
            <scope>test</scope>
        </dependency>
    </dependencies>

    <pluginRepositories>
        <pluginRepository>
            <id>jcenter</id>
            <name>JCenter</name>
            <url>https://jcenter.bintray.com/</url>
        </pluginRepository>
    </pluginRepositories>

    <build>
        <pluginManagement>
            <plugins>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-release-plugin</artifactId>
                    <configuration>
                        <tagNameFormat>v@{project.version}</tagNameFormat>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-compiler-plugin</artifactId>
                    <configuration>
                        <source>${project.build.targetJdk}</source>
                        <target>${project.build.targetJdk}</target>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>com.mycila</groupId>
                    <artifactId>license-maven-plugin</artifactId>
                    <configuration>
                        <excludes>
                            <exclude>src/build/*</exclude>
                        </excludes>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>org.jetbrains.dokka</groupId>
                    <artifactId>dokka-maven-plugin</artifactId>
                    <version>${dep.dokka.version}</version>
                    <configuration>
                        <jdkVersion>8</jdkVersion>
                    </configuration>
                </plugin>
                <plugin>
                    <!-- Fixes missing plugin during CI builds -->
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-jar-plugin</artifactId>
                </plugin>
                <plugin>
                    <groupId>org.antlr</groupId>
                    <artifactId>antlr3-maven-plugin</artifactId>
                    <version>${dep.antlr.version}</version>
                </plugin>
                <plugin>
                    <groupId>org.eclipse.m2e</groupId>
                    <artifactId>lifecycle-mapping</artifactId>
                    <version>1.0.0</version>
                </plugin>
                <plugin>
                    <groupId>org.jetbrains.kotlin</groupId>
                    <artifactId>kotlin-maven-plugin</artifactId>
                    <version>${dep.kotlin.version}</version>
                </plugin>
                <plugin>
                    <groupId>org.asciidoctor</groupId>
                    <artifactId>asciidoctor-maven-plugin</artifactId>
                    <version>1.5.3</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-scm-publish-plugin</artifactId>
                    <version>1.1</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-toolchains-plugin</artifactId>
                    <version>1.1</version>
                </plugin>
                <plugin>
                    <groupId>com.github.ekryd.sortpom</groupId>
                    <artifactId>sortpom-maven-plugin</artifactId>
                    <version>${dep.plugin.sortpom.version}</version>
                    <configuration>
                        <createBackupFile>false</createBackupFile>
                        <expandEmptyElements>false</expandEmptyElements>
                        <keepBlankLines>true</keepBlankLines>
                        <lineSeparator>\n</lineSeparator>
                        <nrOfIndentSpace>4</nrOfIndentSpace>
                        <sortDependencies>scope</sortDependencies>
                        <sortProperties>true</sortProperties>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-pmd-plugin</artifactId>
                    <configuration>
                        <linkXRef>false</linkXRef>
                        <analysisCache>true</analysisCache>
                        <verbose>true</verbose>
                        <rulesets>
                            <ruleset>${maven.multiModuleProjectDirectory}/src/build/pmd.xml</ruleset>
                        </rulesets>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-checkstyle-plugin</artifactId>
                    <configuration>
                        <configLocation>${maven.multiModuleProjectDirectory}/src/build/checkstyle.xml</configLocation>
                        <suppressionsLocation>${maven.multiModuleProjectDirectory}/src/build/checkstyle-suppress.xml</suppressionsLocation>
                        <sourceDirectories>${project.build.sourceDirectory},${project.build.testSourceDirectory}</sourceDirectories>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>com.github.spotbugs</groupId>
                    <artifactId>spotbugs-maven-plugin</artifactId>
                    <configuration combine.children="append">
                        <includeFilterFile>${maven.multiModuleProjectDirectory}/src/build/spotbugs-include.xml</includeFilterFile>
                        <excludeFilterFile>${maven.multiModuleProjectDirectory}/src/build/spotbugs-exclude.xml</excludeFilterFile>
                    </configuration>
                </plugin>
            </plugins>
        </pluginManagement>
        <plugins>
            <plugin>
                <groupId>com.github.ekryd.sortpom</groupId>
                <artifactId>sortpom-maven-plugin</artifactId>
                <executions>
                    <execution>
                        <phase>compile</phase>
                        <goals>
                            <goal>sort</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-pmd-plugin</artifactId>
                <executions>
                    <execution>
                        <phase>test</phase>
                        <goals>
                            <goal>check</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-checkstyle-plugin</artifactId>
                <executions>
                    <execution>
                        <phase>test</phase>
                        <goals>
                            <goal>check</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-enforcer-plugin</artifactId>
                <executions>
                    <execution>
                        <id>enforce-jdbi</id>
                        <goals>
                            <goal>enforce</goal>
                        </goals>
                        <configuration>
                            <rules>
                                <!-- Ensure consistency -->
                                <dependencyConvergence />
                                <requireJavaVersion>
                                    <!-- Java 8 min -->
                                    <version>[1.8,)</version>
                                </requireJavaVersion>
                            </rules>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>

    <profiles>
        <profile>
            <id>jdk8</id>
            <activation>
                <jdk>[1.8,1.9)</jdk>
            </activation>
            <build>
                <pluginManagement>
                    <plugins>
                        <plugin>
                            <groupId>org.apache.maven.plugins</groupId>
                            <artifactId>maven-toolchains-plugin</artifactId>
                            <configuration>
                                <toolchains>
                                    <jdk>
                                        <version>1.8</version>
                                        <vendor>oracle</vendor>
                                    </jdk>
                                </toolchains>
                            </configuration>
                        </plugin>
                    </plugins>
                </pluginManagement>
            </build>
        </profile>
        <profile>
            <id>jdk9</id>
            <activation>
                <jdk>[1.9,)</jdk>
            </activation>
            <build>
                <pluginManagement>
                    <plugins>
                        <plugin>
                            <groupId>org.apache.maven.plugins</groupId>
                            <artifactId>maven-toolchains-plugin</artifactId>
                            <configuration>
                                <toolchains>
                                    <jdk>
                                        <version>1.9</version>
                                        <vendor>oracle</vendor>
                                    </jdk>
                                </toolchains>
                            </configuration>
                        </plugin>
                        <plugin>
                            <groupId>org.apache.maven.plugins</groupId>
                            <artifactId>maven-dependency-plugin</artifactId>
                            <dependencies>
                                <dependency>
                                    <groupId>org.ow2.asm</groupId>
                                    <artifactId>asm</artifactId>
                                    <version>6.1</version>
                                </dependency>
                            </dependencies>
                        </plugin>
                        <plugin>
                            <groupId>org.apache.maven.plugins</groupId>
                            <artifactId>maven-surefire-plugin</artifactId>
                            <version>2.21.0</version>
                        </plugin>
                    </plugins>
                </pluginManagement>
            </build>
            <properties>
                <basepom.check.skip-coverage>true</basepom.check.skip-coverage>
                <basepom.check.skip-pmd>true</basepom.check.skip-pmd>
                <basepom.check.skip-spotbugs>true</basepom.check.skip-spotbugs>
                <project.build.targetJdk>9</project.build.targetJdk>
            </properties>
        </profile>
        <profile>
            <id>toolchains</id>
            <activation>
                <property>
                    <name>toolchain</name>
                </property>
            </activation>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-toolchains-plugin</artifactId>
                        <executions>
                            <execution>
                                <goals>
                                    <goal>toolchain</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
        <profile>
            <id>oracle</id>
            <activation>
                <file>
                    <exists>${maven.multiModuleProjectDirectory}/.build-oracle</exists>
                </file>
            </activation>
            <modules>
                <module>oracle12</module>
            </modules>
            <repositories>
                <repository>
                    <releases>
                        <enabled>true</enabled>
                        <updatePolicy>always</updatePolicy>
                    </releases>
                    <id>maven.oracle.com</id>
                    <name>oracle-maven-repo</name>
                    <url>https://maven.oracle.com</url>
                    <layout>default</layout>
                </repository>
            </repositories>
        </profile>
    </profiles>
</project>
