<?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>io.zeko</groupId>
    <artifactId>zeko-sql-builder</artifactId>
    <version>1.2.6</version>
    <packaging>jar</packaging>

    <name>${project.groupId}:${project.artifactId}</name>
    <description>
        Zeko SQL Builder is a high-performance lightweight SQL library written for Kotlin language. It is designed to be flexible, portable, and fun to use. This library provides handy SQL wrapping DSL and a RDB client which is an abstraction on top on JDBC (currently supports HikariCP and Vert.x JDBC driver client)
    </description>
    <url>https://github.com/darkredz/Zeko-SQL-Builder</url>

    <!-- License for the project, pick a License from opensource.org -->
    <licenses>
        <license>
            <name>Apache License, Version 2.0</name>
            <url>https://www.apache.org/licenses/LICENSE-2.0</url>
            <distribution>repo</distribution>
        </license>
    </licenses>

    <!-- Contact for developers on project -->
    <developers>
        <developer>
            <name>Leng Sheng Hong</name>
            <email>darkredz@gmail.com</email>
            <organization>Github</organization>
            <!-- URL for Organization, URL to your github profile work well here -->
            <organizationUrl>https://github.com/darkredz</organizationUrl>
            <timezone>UTC+08:00</timezone>
        </developer>
    </developers>

    <!-- Source Control Information, Github Stuff -->
    <scm>
        <!-- Should be format scm:git:git or scm:git:https -->
        <connection>scm:git:https://github.com/darkredz/Zeko-SQL-Builder.git</connection>
        <developerConnection>scm:git:ssh://github.com/darkredz/Zeko-SQL-Builder.git</developerConnection>
        <url>https://github.com/darkredz/Zeko-SQL-Builder</url>
      <tag>1.2.6</tag>
  </scm>

    <distributionManagement>
        <snapshotRepository>
            <id>ossrh</id>
            <url>https://oss.sonatype.org/content/repositories/snapshots</url>
        </snapshotRepository>
        <repository>
            <id>ossrh</id>
            <url>https://oss.sonatype.org/service/local/staging/deploy/maven2/
            </url>
        </repository>
    </distributionManagement>

    <repositories>
        <repository>
            <id>mvnrepository</id>
            <url>http://mvnrepository.com/artifact/</url>
        </repository>
        <repository>
            <id>jcenter</id>
            <url>https://jcenter.bintray.com/</url>
        </repository>
        <repository>
            <id>spek-dev</id>
            <url>https://dl.bintray.com/spekframework/spek-dev</url>
        </repository>
    </repositories>

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

    <properties>
        <kotlin.version>1.4.10</kotlin.version>
        <vertx.version>4.0.0</vertx.version>
        <spek.version>2.0.9</spek.version>
        <jupiter.version>5.2.0</jupiter.version>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <github.global.server>github</github.global.server>
        <version.maven-compiler-plugin>3.6.0</version.maven-compiler-plugin>
        <version.maven-surefire-plugin>2.19.1</version.maven-surefire-plugin>
        <version.maven-resources-plugin>3.0.1</version.maven-resources-plugin>
        <version.maven-source-plugin>3.0.1</version.maven-source-plugin>
        <version.maven-javadoc-plugin>2.10.4</version.maven-javadoc-plugin>
        <version.nexus-staging-maven-plugin>1.6.7</version.nexus-staging-maven-plugin>
        <version.maven-release-plugin>2.5.3</version.maven-release-plugin>
        <version.maven-scm-provider-gitexe>1.9.5</version.maven-scm-provider-gitexe>
        <version.jacoco-maven-plugin>0.7.7.201606060606</version.jacoco-maven-plugin>
        <version.coveralls-maven-plugin>4.3.0</version.coveralls-maven-plugin>
        <version.maven-site-plugin>3.5.1</version.maven-site-plugin>
        <version.maven-pmd-plugin>3.0.1</version.maven-pmd-plugin>
        <version.findbugs-maven-plugin>3.0.1</version.findbugs-maven-plugin>
        <version.maven-changelog-plugin>2.3</version.maven-changelog-plugin>
        <version.taglist-maven-plugin>2.4</version.taglist-maven-plugin>
        <version.maven-project-info-reports-plugin>2.8</version.maven-project-info-reports-plugin>
        <version.maven-checkstyle-plugin>2.10</version.maven-checkstyle-plugin>
        <version.cobertura-maven-plugin>2.6</version.cobertura-maven-plugin>
        <version.maven-surefire-report-plugin>2.18.1</version.maven-surefire-report-plugin>
        <version.maven-jxr-plugin>2.5</version.maven-jxr-plugin>
        <version.maven-gpg-plugin>1.6</version.maven-gpg-plugin>
        <version.maven-deploy-plugin>2.8.2</version.maven-deploy-plugin>
        <version.maven-scm-provider-gitexe>1.9.5</version.maven-scm-provider-gitexe>
    </properties>

    <dependencies>
        <dependency>
            <groupId>org.jetbrains.kotlin</groupId>
            <artifactId>kotlin-stdlib</artifactId>
            <version>${kotlin.version}</version>
        </dependency>
        <dependency>
            <groupId>org.jetbrains.kotlin</groupId>
            <artifactId>kotlin-reflect</artifactId>
            <version>${kotlin.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.jetbrains.kotlin</groupId>
            <artifactId>kotlin-test</artifactId>
            <version>${kotlin.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>io.vertx</groupId>
            <artifactId>vertx-core</artifactId>
            <version>${vertx.version}</version>
        </dependency>
        <dependency>
            <groupId>joda-time</groupId>
            <artifactId>joda-time</artifactId>
            <version>2.9.7</version>
        </dependency>
        <dependency>
            <groupId>io.vertx</groupId>
            <artifactId>vertx-jdbc-client</artifactId>
            <version>${vertx.version}</version>
        </dependency>
        <dependency>
            <groupId>com.github.jasync-sql</groupId>
            <artifactId>jasync-postgresql</artifactId>
            <version>1.1.5</version>
        </dependency>
        <dependency>
            <groupId>com.github.jasync-sql</groupId>
            <artifactId>jasync-mysql</artifactId>
            <version>1.1.5</version>
        </dependency>
        <dependency>
            <groupId>io.zeko</groupId>
            <artifactId>zeko-data-mapper</artifactId>
            <version>1.6.2</version>
        </dependency>
        <dependency>
            <groupId>com.fasterxml.jackson.core</groupId>
            <artifactId>jackson-databind</artifactId>
            <version>2.9.10.3</version>
        </dependency>
        <dependency>
            <groupId>com.zaxxer</groupId>
            <artifactId>HikariCP</artifactId>
            <version>3.4.5</version>
        </dependency>
        <dependency>
            <groupId>io.vertx</groupId>
            <artifactId>vertx-jdbc-client</artifactId>
            <version>${vertx.version}</version>
        </dependency>
        <dependency>
            <groupId>io.vertx</groupId>
            <artifactId>vertx-lang-kotlin</artifactId>
            <version>${vertx.version}</version>
        </dependency>
        <dependency>
            <groupId>org.jetbrains.kotlin</groupId>
            <artifactId>kotlin-stdlib-jdk8</artifactId>
            <version>${kotlin.version}</version>
            <scope>compile</scope>
        </dependency>
        <dependency>
            <groupId>org.spekframework.spek2</groupId>
            <artifactId>spek-dsl-jvm</artifactId>
            <version>${spek.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.spekframework.spek2</groupId>
            <artifactId>spek-runner-junit5</artifactId>
            <version>${spek.version}</version>
            <scope>test</scope>
        </dependency>
    </dependencies>

    <profiles>
        <!-- GPG Signature on release -->
        <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>${version.maven-gpg-plugin}</version>
                        <executions>
                            <execution>
                                <id>sign-artifacts</id>
                                <phase>verify</phase>
                                <goals>
                                    <goal>sign</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>

    <build>
        <sourceDirectory>src/main/kotlin</sourceDirectory>
        <testSourceDirectory>src/test/kotlin</testSourceDirectory>

        <plugins>
            <plugin>
                <artifactId>maven-surefire-plugin</artifactId>
                <version>2.22.0</version>
                <dependencies>
                    <dependency>
                        <groupId>org.junit.platform</groupId>
                        <artifactId>junit-platform-surefire-provider</artifactId>
                        <version>1.2.0</version>
                    </dependency>
                    <dependency>
                        <groupId>org.junit.jupiter</groupId>
                        <artifactId>junit-jupiter-engine</artifactId>
                        <version>${jupiter.version}</version>
                    </dependency>
                </dependencies>
                <configuration>
                    <includes>
                        <include>**/*Spec.*</include>
                    </includes>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.jetbrains.kotlin</groupId>
                <artifactId>kotlin-maven-plugin</artifactId>
                <version>${kotlin.version}</version>
                <executions>
                    <execution>
                        <id>compile</id>
                        <phase>compile</phase>
                        <goals>
                            <goal>compile</goal>
                        </goals>
                    </execution>
                    <execution>
                        <id>test-compile</id>
                        <phase>test-compile</phase>
                        <goals>
                            <goal>test-compile</goal>
                        </goals>
                    </execution>
                </executions>
                <configuration>
                    <jvmTarget>1.8</jvmTarget>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-jar-plugin</artifactId>
                <version>2.6</version>
                <configuration>
                    <archive>
                        <manifest>
                            <addClasspath>true</addClasspath>
                        </manifest>
                    </archive>
                </configuration>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>${version.maven-compiler-plugin}</version>
                <configuration>
                    <encoding>UTF-8</encoding>
                    <source>1.8</source>
                    <target>1.8</target>
                    <showDeprecation>true</showDeprecation>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-resources-plugin</artifactId>
                <version>${version.maven-resources-plugin}</version>
                <configuration>
                    <encoding>UTF-8</encoding>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-source-plugin</artifactId>
                <version>${version.maven-source-plugin}</version>
                <configuration>
                    <excludes>
                        <exclude>**/*.jar</exclude>
                    </excludes>
                </configuration>
                <executions>
                    <execution>
                        <id>attach-sources</id>
                        <goals>
                            <goal>jar</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-javadoc-plugin</artifactId>
                <version>${version.maven-javadoc-plugin}</version>
                <configuration>
                    <encoding>UTF-8</encoding>
                </configuration>
                <executions>
                    <execution>
                        <id>attach-javadoc</id>
                        <goals>
                            <goal>jar</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.jetbrains.dokka</groupId>
                <artifactId>dokka-maven-plugin</artifactId>
                <version>0.10.1</version>
                <executions>
                    <execution>
                        <phase>package</phase>
                        <goals>
                            <goal>javadocJar</goal>
                        </goals>
                    </execution>
                </executions>
                <configuration>
                    <sourceDirectories>
                        <dir>src/main/kotlin</dir>
                    </sourceDirectories>
                </configuration>
            </plugin>
            <plugin>
                <artifactId>maven-deploy-plugin</artifactId>
                <version>${version.maven-deploy-plugin}</version>
                <executions>
                    <execution>
                        <id>default-deploy</id>
                        <phase>deploy</phase>
                        <goals>
                            <goal>deploy</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.sonatype.plugins</groupId>
                <artifactId>nexus-staging-maven-plugin</artifactId>
                <version>${version.nexus-staging-maven-plugin}</version>
                <extensions>true</extensions>
                <configuration>
                    <serverId>ossrh</serverId>
                    <nexusUrl>https://oss.sonatype.org/</nexusUrl>
                    <autoReleaseAfterClose>true</autoReleaseAfterClose>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-release-plugin</artifactId>
                <version>${version.maven-release-plugin}</version>
                <configuration>
                    <localCheckout>true</localCheckout>
                    <pushChanges>false</pushChanges>
                    <mavenExecutorId>forked-path</mavenExecutorId>
                    <arguments>-Dgpg.passphrase=${gpg.passphrase}</arguments>
                </configuration>
                <dependencies>
                    <dependency>
                        <groupId>org.apache.maven.scm</groupId>
                        <artifactId>maven-scm-provider-gitexe</artifactId>
                        <version>${version.maven-scm-provider-gitexe}</version>
                    </dependency>
                </dependencies>
            </plugin>
        </plugins>
    </build>

</project>
